All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
@ 2013-02-22 11:51 Shawn Guo
  2013-02-22 11:51 ` [PATCH v2 1/3] ARM: dts: imx: use pre-processor for device trees Shawn Guo
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Shawn Guo @ 2013-02-22 11:51 UTC (permalink / raw)
  To: linux-arm-kernel

Changes since v1:
 * Remove the absolute path of imxXX-pinfunc.h in binding doc
 * Remove the pin id from PIN_FUNC_ID/macro

Shawn Guo (3):
  ARM: dts: imx: use pre-processor for device trees
  ARM: dts: imx: replace magic number with pin function name
  pinctrl: imx: move hard-coding data into device tree

 .../bindings/pinctrl/fsl,imx-pinctrl.txt           |    6 +-
 .../bindings/pinctrl/fsl,imx35-pinctrl.txt         |  955 +--------
 .../bindings/pinctrl/fsl,imx51-pinctrl.txt         |  759 +------
 .../bindings/pinctrl/fsl,imx53-pinctrl.txt         | 1174 +---------
 .../bindings/pinctrl/fsl,imx6q-pinctrl.txt         | 1596 +-------------
 .../{imx25-karo-tx25.dts => imx25-karo-tx25.dtsp}  |    2 +-
 .../arm/boot/dts/{imx25-pdk.dts => imx25-pdk.dtsp} |    2 +-
 arch/arm/boot/dts/{imx25.dtsi => imx25.dtsip}      |    2 +-
 .../boot/dts/{imx27-apf27.dts => imx27-apf27.dtsp} |    2 +-
 .../arm/boot/dts/{imx27-pdk.dts => imx27-pdk.dtsp} |    2 +-
 ...hytec-phycore.dts => imx27-phytec-phycore.dtsp} |    2 +-
 arch/arm/boot/dts/{imx27.dtsi => imx27.dtsip}      |    2 +-
 .../arm/boot/dts/{imx31-bug.dts => imx31-bug.dtsp} |    2 +-
 arch/arm/boot/dts/{imx31.dtsi => imx31.dtsip}      |    2 +-
 arch/arm/boot/dts/imx35-pinfunc.h                  |  970 +++++++++
 .../boot/dts/{imx51-apf51.dts => imx51-apf51.dtsp} |    2 +-
 .../dts/{imx51-babbage.dts => imx51-babbage.dtsp}  |   16 +-
 arch/arm/boot/dts/imx51-pinfunc.h                  |  773 +++++++
 arch/arm/boot/dts/{imx51.dtsi => imx51.dtsip}      |  247 +--
 .../arm/boot/dts/{imx53-ard.dts => imx53-ard.dtsp} |   70 +-
 .../arm/boot/dts/{imx53-evk.dts => imx53-evk.dtsp} |   18 +-
 arch/arm/boot/dts/imx53-mba53.dts                  |  129 --
 arch/arm/boot/dts/imx53-mba53.dtsp                 |  135 ++
 arch/arm/boot/dts/imx53-pinfunc.h                  | 1189 ++++++++++
 .../arm/boot/dts/{imx53-qsb.dts => imx53-qsb.dtsp} |   22 +-
 .../arm/boot/dts/{imx53-smd.dts => imx53-smd.dtsp} |   16 +-
 .../dts/{imx53-tqma53.dtsi => imx53-tqma53.dtsip}  |   32 +-
 arch/arm/boot/dts/{imx53.dtsi => imx53.dtsip}      |  207 +-
 arch/arm/boot/dts/{imx6dl.dtsi => imx6dl.dtsip}    |    0
 .../boot/dts/{imx6q-arm2.dts => imx6q-arm2.dtsp}   |    8 +-
 arch/arm/boot/dts/imx6q-pinfunc.h                  | 1529 +++++++++++++
 .../{imx6q-sabreauto.dts => imx6q-sabreauto.dtsp}  |    6 +-
 .../{imx6q-sabrelite.dts => imx6q-sabrelite.dtsp}  |   18 +-
 .../dts/{imx6q-sabresd.dts => imx6q-sabresd.dtsp}  |   14 +-
 arch/arm/boot/dts/imx6q.dtsi                       |  302 ---
 arch/arm/boot/dts/imx6q.dtsip                      |  303 +++
 arch/arm/boot/dts/{imx6qdl.dtsi => imx6qdl.dtsip}  |    2 +-
 drivers/pinctrl/pinctrl-imx.c                      |  120 +-
 drivers/pinctrl/pinctrl-imx.h                      |   13 +-
 drivers/pinctrl/pinctrl-imx35.c                    | 1524 +++----------
 drivers/pinctrl/pinctrl-imx51.c                    | 1252 +++--------
 drivers/pinctrl/pinctrl-imx53.c                    | 1579 ++------------
 drivers/pinctrl/pinctrl-imx6q.c                    | 2263 +++-----------------
 43 files changed, 6284 insertions(+), 10983 deletions(-)
 rename arch/arm/boot/dts/{imx25-karo-tx25.dts => imx25-karo-tx25.dtsp} (96%)
 rename arch/arm/boot/dts/{imx25-pdk.dts => imx25-pdk.dtsp} (96%)
 rename arch/arm/boot/dts/{imx25.dtsi => imx25.dtsip} (99%)
 rename arch/arm/boot/dts/{imx27-apf27.dts => imx27-apf27.dtsp} (98%)
 rename arch/arm/boot/dts/{imx27-pdk.dts => imx27-pdk.dtsp} (96%)
 rename arch/arm/boot/dts/{imx27-phytec-phycore.dts => imx27-phytec-phycore.dtsp} (98%)
 rename arch/arm/boot/dts/{imx27.dtsi => imx27.dtsip} (99%)
 rename arch/arm/boot/dts/{imx31-bug.dts => imx31-bug.dtsp} (96%)
 rename arch/arm/boot/dts/{imx31.dtsi => imx31.dtsip} (98%)
 create mode 100644 arch/arm/boot/dts/imx35-pinfunc.h
 rename arch/arm/boot/dts/{imx51-apf51.dts => imx51-apf51.dtsp} (97%)
 rename arch/arm/boot/dts/{imx51-babbage.dts => imx51-babbage.dtsp} (94%)
 create mode 100644 arch/arm/boot/dts/imx51-pinfunc.h
 rename arch/arm/boot/dts/{imx51.dtsi => imx51.dtsip} (61%)
 rename arch/arm/boot/dts/{imx53-ard.dts => imx53-ard.dtsp} (55%)
 rename arch/arm/boot/dts/{imx53-evk.dts => imx53-evk.dtsp} (82%)
 delete mode 100644 arch/arm/boot/dts/imx53-mba53.dts
 create mode 100644 arch/arm/boot/dts/imx53-mba53.dtsp
 create mode 100644 arch/arm/boot/dts/imx53-pinfunc.h
 rename arch/arm/boot/dts/{imx53-qsb.dts => imx53-qsb.dtsp} (89%)
 rename arch/arm/boot/dts/{imx53-smd.dts => imx53-smd.dtsp} (88%)
 rename arch/arm/boot/dts/{imx53-tqma53.dtsi => imx53-tqma53.dtsip} (75%)
 rename arch/arm/boot/dts/{imx53.dtsi => imx53.dtsip} (69%)
 rename arch/arm/boot/dts/{imx6dl.dtsi => imx6dl.dtsip} (100%)
 rename arch/arm/boot/dts/{imx6q-arm2.dts => imx6q-arm2.dtsp} (90%)
 create mode 100644 arch/arm/boot/dts/imx6q-pinfunc.h
 rename arch/arm/boot/dts/{imx6q-sabreauto.dts => imx6q-sabreauto.dtsp} (88%)
 rename arch/arm/boot/dts/{imx6q-sabrelite.dts => imx6q-sabrelite.dtsp} (87%)
 rename arch/arm/boot/dts/{imx6q-sabresd.dts => imx6q-sabresd.dtsp} (84%)
 delete mode 100644 arch/arm/boot/dts/imx6q.dtsi
 create mode 100644 arch/arm/boot/dts/imx6q.dtsip
 rename arch/arm/boot/dts/{imx6qdl.dtsi => imx6qdl.dtsip} (99%)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 1/3] ARM: dts: imx: use pre-processor for device trees
  2013-02-22 11:51 [PATCH v2 0/3] Get rid of big array from imx pinctrl driver Shawn Guo
@ 2013-02-22 11:51 ` Shawn Guo
  2013-02-25  8:17 ` [PATCH v2 0/3] Get rid of big array from imx pinctrl driver Sascha Hauer
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 22+ messages in thread
From: Shawn Guo @ 2013-02-22 11:51 UTC (permalink / raw)
  To: linux-arm-kernel

Enable C pre-processing on imx device trees. This allows future use
of defining names for various constants, to increase the readability
of the device tree sources.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
---
 .../{imx25-karo-tx25.dts => imx25-karo-tx25.dtsp}  |    2 +-
 .../arm/boot/dts/{imx25-pdk.dts => imx25-pdk.dtsp} |    2 +-
 arch/arm/boot/dts/{imx25.dtsi => imx25.dtsip}      |    2 +-
 .../boot/dts/{imx27-apf27.dts => imx27-apf27.dtsp} |    2 +-
 .../arm/boot/dts/{imx27-pdk.dts => imx27-pdk.dtsp} |    2 +-
 ...hytec-phycore.dts => imx27-phytec-phycore.dtsp} |    2 +-
 arch/arm/boot/dts/{imx27.dtsi => imx27.dtsip}      |    2 +-
 .../arm/boot/dts/{imx31-bug.dts => imx31-bug.dtsp} |    2 +-
 arch/arm/boot/dts/{imx31.dtsi => imx31.dtsip}      |    2 +-
 .../boot/dts/{imx51-apf51.dts => imx51-apf51.dtsp} |    2 +-
 .../dts/{imx51-babbage.dts => imx51-babbage.dtsp}  |    2 +-
 arch/arm/boot/dts/{imx51.dtsi => imx51.dtsip}      |    2 +-
 .../arm/boot/dts/{imx53-ard.dts => imx53-ard.dtsp} |    2 +-
 .../arm/boot/dts/{imx53-evk.dts => imx53-evk.dtsp} |    2 +-
 .../boot/dts/{imx53-mba53.dts => imx53-mba53.dtsp} |    2 +-
 .../arm/boot/dts/{imx53-qsb.dts => imx53-qsb.dtsp} |    2 +-
 .../arm/boot/dts/{imx53-smd.dts => imx53-smd.dtsp} |    2 +-
 .../dts/{imx53-tqma53.dtsi => imx53-tqma53.dtsip}  |    2 +-
 arch/arm/boot/dts/{imx53.dtsi => imx53.dtsip}      |    2 +-
 arch/arm/boot/dts/{imx6dl.dtsi => imx6dl.dtsip}    |    0
 .../boot/dts/{imx6q-arm2.dts => imx6q-arm2.dtsp}   |    2 +-
 .../{imx6q-sabreauto.dts => imx6q-sabreauto.dtsp}  |    2 +-
 .../{imx6q-sabrelite.dts => imx6q-sabrelite.dtsp}  |    2 +-
 .../dts/{imx6q-sabresd.dts => imx6q-sabresd.dtsp}  |    2 +-
 arch/arm/boot/dts/{imx6q.dtsi => imx6q.dtsip}      |    2 +-
 arch/arm/boot/dts/{imx6qdl.dtsi => imx6qdl.dtsip}  |    2 +-
 26 files changed, 25 insertions(+), 25 deletions(-)
 rename arch/arm/boot/dts/{imx25-karo-tx25.dts => imx25-karo-tx25.dtsp} (96%)
 rename arch/arm/boot/dts/{imx25-pdk.dts => imx25-pdk.dtsp} (96%)
 rename arch/arm/boot/dts/{imx25.dtsi => imx25.dtsip} (99%)
 rename arch/arm/boot/dts/{imx27-apf27.dts => imx27-apf27.dtsp} (98%)
 rename arch/arm/boot/dts/{imx27-pdk.dts => imx27-pdk.dtsp} (96%)
 rename arch/arm/boot/dts/{imx27-phytec-phycore.dts => imx27-phytec-phycore.dtsp} (98%)
 rename arch/arm/boot/dts/{imx27.dtsi => imx27.dtsip} (99%)
 rename arch/arm/boot/dts/{imx31-bug.dts => imx31-bug.dtsp} (96%)
 rename arch/arm/boot/dts/{imx31.dtsi => imx31.dtsip} (98%)
 rename arch/arm/boot/dts/{imx51-apf51.dts => imx51-apf51.dtsp} (97%)
 rename arch/arm/boot/dts/{imx51-babbage.dts => imx51-babbage.dtsp} (99%)
 rename arch/arm/boot/dts/{imx51.dtsi => imx51.dtsip} (99%)
 rename arch/arm/boot/dts/{imx53-ard.dts => imx53-ard.dtsp} (99%)
 rename arch/arm/boot/dts/{imx53-evk.dts => imx53-evk.dtsp} (99%)
 rename arch/arm/boot/dts/{imx53-mba53.dts => imx53-mba53.dtsp} (98%)
 rename arch/arm/boot/dts/{imx53-qsb.dts => imx53-qsb.dtsp} (99%)
 rename arch/arm/boot/dts/{imx53-smd.dts => imx53-smd.dtsp} (99%)
 rename arch/arm/boot/dts/{imx53-tqma53.dtsi => imx53-tqma53.dtsip} (99%)
 rename arch/arm/boot/dts/{imx53.dtsi => imx53.dtsip} (99%)
 rename arch/arm/boot/dts/{imx6dl.dtsi => imx6dl.dtsip} (100%)
 rename arch/arm/boot/dts/{imx6q-arm2.dts => imx6q-arm2.dtsp} (98%)
 rename arch/arm/boot/dts/{imx6q-sabreauto.dts => imx6q-sabreauto.dtsp} (98%)
 rename arch/arm/boot/dts/{imx6q-sabrelite.dts => imx6q-sabrelite.dtsp} (99%)
 rename arch/arm/boot/dts/{imx6q-sabresd.dts => imx6q-sabresd.dtsp} (98%)
 rename arch/arm/boot/dts/{imx6q.dtsi => imx6q.dtsip} (99%)
 rename arch/arm/boot/dts/{imx6qdl.dtsi => imx6qdl.dtsip} (99%)

diff --git a/arch/arm/boot/dts/imx25-karo-tx25.dts b/arch/arm/boot/dts/imx25-karo-tx25.dtsp
similarity index 96%
rename from arch/arm/boot/dts/imx25-karo-tx25.dts
rename to arch/arm/boot/dts/imx25-karo-tx25.dtsp
index 1a9d049..3dbe775 100644
--- a/arch/arm/boot/dts/imx25-karo-tx25.dts
+++ b/arch/arm/boot/dts/imx25-karo-tx25.dtsp
@@ -10,7 +10,7 @@
  */
 
 /dts-v1/;
-/include/ "imx25.dtsi"
+#include "imx25.dtsip"
 
 / {
 	model = "Ka-Ro TX25";
diff --git a/arch/arm/boot/dts/imx25-pdk.dts b/arch/arm/boot/dts/imx25-pdk.dtsp
similarity index 96%
rename from arch/arm/boot/dts/imx25-pdk.dts
rename to arch/arm/boot/dts/imx25-pdk.dtsp
index a02a860..8064b76 100644
--- a/arch/arm/boot/dts/imx25-pdk.dts
+++ b/arch/arm/boot/dts/imx25-pdk.dtsp
@@ -10,7 +10,7 @@
  */
 
 /dts-v1/;
-/include/ "imx25.dtsi"
+#include "imx25.dtsip"
 
 / {
 	model = "Freescale i.MX25 Product Development Kit";
diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsip
similarity index 99%
rename from arch/arm/boot/dts/imx25.dtsi
rename to arch/arm/boot/dts/imx25.dtsip
index 94f3305..d2550e0 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsip
@@ -9,7 +9,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
 
 / {
 	aliases {
diff --git a/arch/arm/boot/dts/imx27-apf27.dts b/arch/arm/boot/dts/imx27-apf27.dtsp
similarity index 98%
rename from arch/arm/boot/dts/imx27-apf27.dts
rename to arch/arm/boot/dts/imx27-apf27.dtsp
index b464c80..59f276f 100644
--- a/arch/arm/boot/dts/imx27-apf27.dts
+++ b/arch/arm/boot/dts/imx27-apf27.dtsp
@@ -13,7 +13,7 @@
  */
 
 /dts-v1/;
-/include/ "imx27.dtsi"
+#include "imx27.dtsip"
 
 / {
 	model = "Armadeus Systems APF27 module";
diff --git a/arch/arm/boot/dts/imx27-pdk.dts b/arch/arm/boot/dts/imx27-pdk.dtsp
similarity index 96%
rename from arch/arm/boot/dts/imx27-pdk.dts
rename to arch/arm/boot/dts/imx27-pdk.dtsp
index 41cd110..fe5f609 100644
--- a/arch/arm/boot/dts/imx27-pdk.dts
+++ b/arch/arm/boot/dts/imx27-pdk.dtsp
@@ -10,7 +10,7 @@
  */
 
 /dts-v1/;
-/include/ "imx27.dtsi"
+#include "imx27.dtsip"
 
 / {
 	model = "Freescale i.MX27 Product Development Kit";
diff --git a/arch/arm/boot/dts/imx27-phytec-phycore.dts b/arch/arm/boot/dts/imx27-phytec-phycore.dtsp
similarity index 98%
rename from arch/arm/boot/dts/imx27-phytec-phycore.dts
rename to arch/arm/boot/dts/imx27-phytec-phycore.dtsp
index 53b0ec0..924097a 100644
--- a/arch/arm/boot/dts/imx27-phytec-phycore.dts
+++ b/arch/arm/boot/dts/imx27-phytec-phycore.dtsp
@@ -10,7 +10,7 @@
  */
 
 /dts-v1/;
-/include/ "imx27.dtsi"
+#include "imx27.dtsip"
 
 / {
 	model = "Phytec pcm038";
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsip
similarity index 99%
rename from arch/arm/boot/dts/imx27.dtsi
rename to arch/arm/boot/dts/imx27.dtsip
index 5a82cb5..324130f 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsip
@@ -9,7 +9,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
 
 / {
 	aliases {
diff --git a/arch/arm/boot/dts/imx31-bug.dts b/arch/arm/boot/dts/imx31-bug.dtsp
similarity index 96%
rename from arch/arm/boot/dts/imx31-bug.dts
rename to arch/arm/boot/dts/imx31-bug.dtsp
index 9ac6f6b..8e26e91 100644
--- a/arch/arm/boot/dts/imx31-bug.dts
+++ b/arch/arm/boot/dts/imx31-bug.dtsp
@@ -10,7 +10,7 @@
  */
 
 /dts-v1/;
-/include/ "imx31.dtsi"
+#include "imx31.dtsip"
 
 / {
 	model = "Buglabs i.MX31 Bug 1.x";
diff --git a/arch/arm/boot/dts/imx31.dtsi b/arch/arm/boot/dts/imx31.dtsip
similarity index 98%
rename from arch/arm/boot/dts/imx31.dtsi
rename to arch/arm/boot/dts/imx31.dtsip
index 454c2d1..aa488ac 100644
--- a/arch/arm/boot/dts/imx31.dtsi
+++ b/arch/arm/boot/dts/imx31.dtsip
@@ -9,7 +9,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
 
 / {
 	aliases {
diff --git a/arch/arm/boot/dts/imx51-apf51.dts b/arch/arm/boot/dts/imx51-apf51.dtsp
similarity index 97%
rename from arch/arm/boot/dts/imx51-apf51.dts
rename to arch/arm/boot/dts/imx51-apf51.dtsp
index 92d3a66..4ef88fc 100644
--- a/arch/arm/boot/dts/imx51-apf51.dts
+++ b/arch/arm/boot/dts/imx51-apf51.dtsp
@@ -15,7 +15,7 @@
  */
 
 /dts-v1/;
-/include/ "imx51.dtsi"
+#include "imx51.dtsip"
 
 / {
 	model = "Armadeus Systems APF51 module";
diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dtsp
similarity index 99%
rename from arch/arm/boot/dts/imx51-babbage.dts
rename to arch/arm/boot/dts/imx51-babbage.dtsp
index aab6e43..965a8c8 100644
--- a/arch/arm/boot/dts/imx51-babbage.dts
+++ b/arch/arm/boot/dts/imx51-babbage.dtsp
@@ -11,7 +11,7 @@
  */
 
 /dts-v1/;
-/include/ "imx51.dtsi"
+#include "imx51.dtsip"
 
 / {
 	model = "Freescale i.MX51 Babbage Board";
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsip
similarity index 99%
rename from arch/arm/boot/dts/imx51.dtsi
rename to arch/arm/boot/dts/imx51.dtsip
index fcf035b..606a167 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsip
@@ -10,7 +10,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
 
 / {
 	aliases {
diff --git a/arch/arm/boot/dts/imx53-ard.dts b/arch/arm/boot/dts/imx53-ard.dtsp
similarity index 99%
rename from arch/arm/boot/dts/imx53-ard.dts
rename to arch/arm/boot/dts/imx53-ard.dtsp
index e049fd0..78425a4 100644
--- a/arch/arm/boot/dts/imx53-ard.dts
+++ b/arch/arm/boot/dts/imx53-ard.dtsp
@@ -11,7 +11,7 @@
  */
 
 /dts-v1/;
-/include/ "imx53.dtsi"
+#include "imx53.dtsip"
 
 / {
 	model = "Freescale i.MX53 Automotive Reference Design Board";
diff --git a/arch/arm/boot/dts/imx53-evk.dts b/arch/arm/boot/dts/imx53-evk.dtsp
similarity index 99%
rename from arch/arm/boot/dts/imx53-evk.dts
rename to arch/arm/boot/dts/imx53-evk.dtsp
index 85a89b5..20fa799 100644
--- a/arch/arm/boot/dts/imx53-evk.dts
+++ b/arch/arm/boot/dts/imx53-evk.dtsp
@@ -11,7 +11,7 @@
  */
 
 /dts-v1/;
-/include/ "imx53.dtsi"
+#include "imx53.dtsip"
 
 / {
 	model = "Freescale i.MX53 Evaluation Kit";
diff --git a/arch/arm/boot/dts/imx53-mba53.dts b/arch/arm/boot/dts/imx53-mba53.dtsp
similarity index 98%
rename from arch/arm/boot/dts/imx53-mba53.dts
rename to arch/arm/boot/dts/imx53-mba53.dtsp
index 468c0a1..e7bde54 100644
--- a/arch/arm/boot/dts/imx53-mba53.dts
+++ b/arch/arm/boot/dts/imx53-mba53.dtsp
@@ -11,7 +11,7 @@
  */
 
 /dts-v1/;
-/include/ "imx53-tqma53.dtsi"
+#include "imx53-tqma53.dtsip"
 
 / {
 	model = "TQ MBa53 starter kit";
diff --git a/arch/arm/boot/dts/imx53-qsb.dts b/arch/arm/boot/dts/imx53-qsb.dtsp
similarity index 99%
rename from arch/arm/boot/dts/imx53-qsb.dts
rename to arch/arm/boot/dts/imx53-qsb.dtsp
index 05cc562..37fc83c 100644
--- a/arch/arm/boot/dts/imx53-qsb.dts
+++ b/arch/arm/boot/dts/imx53-qsb.dtsp
@@ -11,7 +11,7 @@
  */
 
 /dts-v1/;
-/include/ "imx53.dtsi"
+#include "imx53.dtsip"
 
 / {
 	model = "Freescale i.MX53 Quick Start Board";
diff --git a/arch/arm/boot/dts/imx53-smd.dts b/arch/arm/boot/dts/imx53-smd.dtsp
similarity index 99%
rename from arch/arm/boot/dts/imx53-smd.dts
rename to arch/arm/boot/dts/imx53-smd.dtsp
index 995554c..c429f44 100644
--- a/arch/arm/boot/dts/imx53-smd.dts
+++ b/arch/arm/boot/dts/imx53-smd.dtsp
@@ -11,7 +11,7 @@
  */
 
 /dts-v1/;
-/include/ "imx53.dtsi"
+#include "imx53.dtsip"
 
 / {
 	model = "Freescale i.MX53 Smart Mobile Reference Design Board";
diff --git a/arch/arm/boot/dts/imx53-tqma53.dtsi b/arch/arm/boot/dts/imx53-tqma53.dtsip
similarity index 99%
rename from arch/arm/boot/dts/imx53-tqma53.dtsi
rename to arch/arm/boot/dts/imx53-tqma53.dtsip
index 8278ec5..af24cb4 100644
--- a/arch/arm/boot/dts/imx53-tqma53.dtsi
+++ b/arch/arm/boot/dts/imx53-tqma53.dtsip
@@ -10,7 +10,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-/include/ "imx53.dtsi"
+#include "imx53.dtsip"
 
 / {
 	model = "TQ TQMa53";
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsip
similarity index 99%
rename from arch/arm/boot/dts/imx53.dtsi
rename to arch/arm/boot/dts/imx53.dtsip
index d05aa21..baea3b5 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsip
@@ -10,7 +10,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
 
 / {
 	aliases {
diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsip
similarity index 100%
rename from arch/arm/boot/dts/imx6dl.dtsi
rename to arch/arm/boot/dts/imx6dl.dtsip
diff --git a/arch/arm/boot/dts/imx6q-arm2.dts b/arch/arm/boot/dts/imx6q-arm2.dtsp
similarity index 98%
rename from arch/arm/boot/dts/imx6q-arm2.dts
rename to arch/arm/boot/dts/imx6q-arm2.dtsp
index 53eb241..3028f96 100644
--- a/arch/arm/boot/dts/imx6q-arm2.dts
+++ b/arch/arm/boot/dts/imx6q-arm2.dtsp
@@ -11,7 +11,7 @@
  */
 
 /dts-v1/;
-/include/ "imx6q.dtsi"
+#include "imx6q.dtsip"
 
 / {
 	model = "Freescale i.MX6 Quad Armadillo2 Board";
diff --git a/arch/arm/boot/dts/imx6q-sabreauto.dts b/arch/arm/boot/dts/imx6q-sabreauto.dtsp
similarity index 98%
rename from arch/arm/boot/dts/imx6q-sabreauto.dts
rename to arch/arm/boot/dts/imx6q-sabreauto.dtsp
index 656d489..4063b90 100644
--- a/arch/arm/boot/dts/imx6q-sabreauto.dts
+++ b/arch/arm/boot/dts/imx6q-sabreauto.dtsp
@@ -11,7 +11,7 @@
  */
 
 /dts-v1/;
-/include/ "imx6q.dtsi"
+#include "imx6q.dtsip"
 
 / {
 	model = "Freescale i.MX6 Quad SABRE Automotive Board";
diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dtsp
similarity index 99%
rename from arch/arm/boot/dts/imx6q-sabrelite.dts
rename to arch/arm/boot/dts/imx6q-sabrelite.dtsp
index 2ce355c..c6a7737 100644
--- a/arch/arm/boot/dts/imx6q-sabrelite.dts
+++ b/arch/arm/boot/dts/imx6q-sabrelite.dtsp
@@ -11,7 +11,7 @@
  */
 
 /dts-v1/;
-/include/ "imx6q.dtsi"
+#include "imx6q.dtsip"
 
 / {
 	model = "Freescale i.MX6 Quad SABRE Lite Board";
diff --git a/arch/arm/boot/dts/imx6q-sabresd.dts b/arch/arm/boot/dts/imx6q-sabresd.dtsp
similarity index 98%
rename from arch/arm/boot/dts/imx6q-sabresd.dts
rename to arch/arm/boot/dts/imx6q-sabresd.dtsp
index bafaccd..306d101 100644
--- a/arch/arm/boot/dts/imx6q-sabresd.dts
+++ b/arch/arm/boot/dts/imx6q-sabresd.dtsp
@@ -11,7 +11,7 @@
  */
 
 /dts-v1/;
-/include/ "imx6q.dtsi"
+#include "imx6q.dtsip"
 
 / {
 	model = "Freescale i.MX6Q SABRE Smart Device Board";
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsip
similarity index 99%
rename from arch/arm/boot/dts/imx6q.dtsi
rename to arch/arm/boot/dts/imx6q.dtsip
index 0125250..5ca905c 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsip
@@ -8,7 +8,7 @@
  *
  */
 
-/include/ "imx6qdl.dtsi"
+#include "imx6qdl.dtsip"
 
 / {
 	cpus {
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsip
similarity index 99%
rename from arch/arm/boot/dts/imx6qdl.dtsi
rename to arch/arm/boot/dts/imx6qdl.dtsip
index 8f34a3cd..52b156f 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsip
@@ -10,7 +10,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
 
 / {
 	aliases {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-02-22 11:51 [PATCH v2 0/3] Get rid of big array from imx pinctrl driver Shawn Guo
  2013-02-22 11:51 ` [PATCH v2 1/3] ARM: dts: imx: use pre-processor for device trees Shawn Guo
@ 2013-02-25  8:17 ` Sascha Hauer
  2013-02-25 13:33   ` Shawn Guo
       [not found] ` <1361533888-18073-4-git-send-email-shawn.guo@linaro.org>
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 22+ messages in thread
From: Sascha Hauer @ 2013-02-25  8:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 22, 2013 at 07:51:25PM +0800, Shawn Guo wrote:
> Changes since v1:
>  * Remove the absolute path of imxXX-pinfunc.h in binding doc
>  * Remove the pin id from PIN_FUNC_ID/macro
> 
> Shawn Guo (3):
>   ARM: dts: imx: use pre-processor for device trees
>   ARM: dts: imx: replace magic number with pin function name
>   pinctrl: imx: move hard-coding data into device tree

Looks good to me. The patches are really *huge*. Does it make sense to
make 2/3 and 3/3 a single patch to make the churn smaller?

Sascha

> 
>  .../bindings/pinctrl/fsl,imx-pinctrl.txt           |    6 +-
>  .../bindings/pinctrl/fsl,imx35-pinctrl.txt         |  955 +--------
>  .../bindings/pinctrl/fsl,imx51-pinctrl.txt         |  759 +------
>  .../bindings/pinctrl/fsl,imx53-pinctrl.txt         | 1174 +---------
>  .../bindings/pinctrl/fsl,imx6q-pinctrl.txt         | 1596 +-------------
>  .../{imx25-karo-tx25.dts => imx25-karo-tx25.dtsp}  |    2 +-
>  .../arm/boot/dts/{imx25-pdk.dts => imx25-pdk.dtsp} |    2 +-
>  arch/arm/boot/dts/{imx25.dtsi => imx25.dtsip}      |    2 +-
>  .../boot/dts/{imx27-apf27.dts => imx27-apf27.dtsp} |    2 +-
>  .../arm/boot/dts/{imx27-pdk.dts => imx27-pdk.dtsp} |    2 +-
>  ...hytec-phycore.dts => imx27-phytec-phycore.dtsp} |    2 +-
>  arch/arm/boot/dts/{imx27.dtsi => imx27.dtsip}      |    2 +-
>  .../arm/boot/dts/{imx31-bug.dts => imx31-bug.dtsp} |    2 +-
>  arch/arm/boot/dts/{imx31.dtsi => imx31.dtsip}      |    2 +-
>  arch/arm/boot/dts/imx35-pinfunc.h                  |  970 +++++++++
>  .../boot/dts/{imx51-apf51.dts => imx51-apf51.dtsp} |    2 +-
>  .../dts/{imx51-babbage.dts => imx51-babbage.dtsp}  |   16 +-
>  arch/arm/boot/dts/imx51-pinfunc.h                  |  773 +++++++
>  arch/arm/boot/dts/{imx51.dtsi => imx51.dtsip}      |  247 +--
>  .../arm/boot/dts/{imx53-ard.dts => imx53-ard.dtsp} |   70 +-
>  .../arm/boot/dts/{imx53-evk.dts => imx53-evk.dtsp} |   18 +-
>  arch/arm/boot/dts/imx53-mba53.dts                  |  129 --
>  arch/arm/boot/dts/imx53-mba53.dtsp                 |  135 ++
>  arch/arm/boot/dts/imx53-pinfunc.h                  | 1189 ++++++++++
>  .../arm/boot/dts/{imx53-qsb.dts => imx53-qsb.dtsp} |   22 +-
>  .../arm/boot/dts/{imx53-smd.dts => imx53-smd.dtsp} |   16 +-
>  .../dts/{imx53-tqma53.dtsi => imx53-tqma53.dtsip}  |   32 +-
>  arch/arm/boot/dts/{imx53.dtsi => imx53.dtsip}      |  207 +-
>  arch/arm/boot/dts/{imx6dl.dtsi => imx6dl.dtsip}    |    0
>  .../boot/dts/{imx6q-arm2.dts => imx6q-arm2.dtsp}   |    8 +-
>  arch/arm/boot/dts/imx6q-pinfunc.h                  | 1529 +++++++++++++
>  .../{imx6q-sabreauto.dts => imx6q-sabreauto.dtsp}  |    6 +-
>  .../{imx6q-sabrelite.dts => imx6q-sabrelite.dtsp}  |   18 +-
>  .../dts/{imx6q-sabresd.dts => imx6q-sabresd.dtsp}  |   14 +-
>  arch/arm/boot/dts/imx6q.dtsi                       |  302 ---
>  arch/arm/boot/dts/imx6q.dtsip                      |  303 +++
>  arch/arm/boot/dts/{imx6qdl.dtsi => imx6qdl.dtsip}  |    2 +-
>  drivers/pinctrl/pinctrl-imx.c                      |  120 +-
>  drivers/pinctrl/pinctrl-imx.h                      |   13 +-
>  drivers/pinctrl/pinctrl-imx35.c                    | 1524 +++----------
>  drivers/pinctrl/pinctrl-imx51.c                    | 1252 +++--------
>  drivers/pinctrl/pinctrl-imx53.c                    | 1579 ++------------
>  drivers/pinctrl/pinctrl-imx6q.c                    | 2263 +++-----------------
>  43 files changed, 6284 insertions(+), 10983 deletions(-)
>  rename arch/arm/boot/dts/{imx25-karo-tx25.dts => imx25-karo-tx25.dtsp} (96%)
>  rename arch/arm/boot/dts/{imx25-pdk.dts => imx25-pdk.dtsp} (96%)
>  rename arch/arm/boot/dts/{imx25.dtsi => imx25.dtsip} (99%)
>  rename arch/arm/boot/dts/{imx27-apf27.dts => imx27-apf27.dtsp} (98%)
>  rename arch/arm/boot/dts/{imx27-pdk.dts => imx27-pdk.dtsp} (96%)
>  rename arch/arm/boot/dts/{imx27-phytec-phycore.dts => imx27-phytec-phycore.dtsp} (98%)
>  rename arch/arm/boot/dts/{imx27.dtsi => imx27.dtsip} (99%)
>  rename arch/arm/boot/dts/{imx31-bug.dts => imx31-bug.dtsp} (96%)
>  rename arch/arm/boot/dts/{imx31.dtsi => imx31.dtsip} (98%)
>  create mode 100644 arch/arm/boot/dts/imx35-pinfunc.h
>  rename arch/arm/boot/dts/{imx51-apf51.dts => imx51-apf51.dtsp} (97%)
>  rename arch/arm/boot/dts/{imx51-babbage.dts => imx51-babbage.dtsp} (94%)
>  create mode 100644 arch/arm/boot/dts/imx51-pinfunc.h
>  rename arch/arm/boot/dts/{imx51.dtsi => imx51.dtsip} (61%)
>  rename arch/arm/boot/dts/{imx53-ard.dts => imx53-ard.dtsp} (55%)
>  rename arch/arm/boot/dts/{imx53-evk.dts => imx53-evk.dtsp} (82%)
>  delete mode 100644 arch/arm/boot/dts/imx53-mba53.dts
>  create mode 100644 arch/arm/boot/dts/imx53-mba53.dtsp
>  create mode 100644 arch/arm/boot/dts/imx53-pinfunc.h
>  rename arch/arm/boot/dts/{imx53-qsb.dts => imx53-qsb.dtsp} (89%)
>  rename arch/arm/boot/dts/{imx53-smd.dts => imx53-smd.dtsp} (88%)
>  rename arch/arm/boot/dts/{imx53-tqma53.dtsi => imx53-tqma53.dtsip} (75%)
>  rename arch/arm/boot/dts/{imx53.dtsi => imx53.dtsip} (69%)
>  rename arch/arm/boot/dts/{imx6dl.dtsi => imx6dl.dtsip} (100%)
>  rename arch/arm/boot/dts/{imx6q-arm2.dts => imx6q-arm2.dtsp} (90%)
>  create mode 100644 arch/arm/boot/dts/imx6q-pinfunc.h
>  rename arch/arm/boot/dts/{imx6q-sabreauto.dts => imx6q-sabreauto.dtsp} (88%)
>  rename arch/arm/boot/dts/{imx6q-sabrelite.dts => imx6q-sabrelite.dtsp} (87%)
>  rename arch/arm/boot/dts/{imx6q-sabresd.dts => imx6q-sabresd.dtsp} (84%)
>  delete mode 100644 arch/arm/boot/dts/imx6q.dtsi
>  create mode 100644 arch/arm/boot/dts/imx6q.dtsip
>  rename arch/arm/boot/dts/{imx6qdl.dtsi => imx6qdl.dtsip} (99%)
> 
> -- 
> 1.7.9.5
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-02-25  8:17 ` [PATCH v2 0/3] Get rid of big array from imx pinctrl driver Sascha Hauer
@ 2013-02-25 13:33   ` Shawn Guo
  2013-03-01  0:55     ` Linus Walleij
  0 siblings, 1 reply; 22+ messages in thread
From: Shawn Guo @ 2013-02-25 13:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 25, 2013 at 09:17:01AM +0100, Sascha Hauer wrote:
> On Fri, Feb 22, 2013 at 07:51:25PM +0800, Shawn Guo wrote:
> > Changes since v1:
> >  * Remove the absolute path of imxXX-pinfunc.h in binding doc
> >  * Remove the pin id from PIN_FUNC_ID/macro
> > 
> > Shawn Guo (3):
> >   ARM: dts: imx: use pre-processor for device trees
> >   ARM: dts: imx: replace magic number with pin function name
> >   pinctrl: imx: move hard-coding data into device tree
> 
> Looks good to me. The patches are really *huge*. Does it make sense to
> make 2/3 and 3/3 a single patch to make the churn smaller?
> 
Yeah, no problem, as we need to have them go through the same tree
anyway.  I just squashed the two patches into one.

Linus,

May I have your ACK on the pinctrl driver changes?  I would like to
have the series go via IMX tree for 3.10.

Shawn

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 3/3] pinctrl: imx: move hard-coding data into device tree
       [not found] ` <1361533888-18073-4-git-send-email-shawn.guo@linaro.org>
@ 2013-02-26  9:13   ` Dong Aisheng
  0 siblings, 0 replies; 22+ messages in thread
From: Dong Aisheng @ 2013-02-26  9:13 UTC (permalink / raw)
  To: linux-arm-kernel

On 22 February 2013 19:51, Shawn Guo <shawn.guo@linaro.org> wrote:
> Currently, all imx pinctrl drivers maintain a big array of struct
> imx_pin_reg which hard-codes data like register offset and mux mode
> setting for each pin function.  Every time a new imx SoC support is
> added, we need to add such a big mount of data.  With moving to single
> kernel build, it's only matter of time to be blamed on memory consuming.
>
> With DTC pre-processor support in place, the patch moves all these data
> into device tree by redefining the PIN_FUNC_ID in imxXX-pinfunc.h and
> changing the PIN_FUNC_ID parsing code a little bit.
>
> The pin id gets re-numbered based on mux register offset, or config
> register offset if the pin has no mux register, so that kernel can
> identify the pin id from register offsets provided by device tree.

This looks ok to me.

> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
........
> + * The pin function ID is a tuple of
> + * <mux_reg conf_reg input_reg mux_mode input_val>
> + */
> +#define MX6Q_PAD_SD2_DAT1__USDHC2_DAT1                 0x04c 0x360 0x000 0x0 0x0
> +#define MX6Q_PAD_SD2_DAT1__ECSPI5_SS0                  0x04c 0x360 0x834 0x1 0x0
> +#define MX6Q_PAD_SD2_DAT1__WEIM_WEIM_CS_2              0x04c 0x360 0x000 0x2 0x0

Is there any special reason we change the register order comparing to iomux-v3?
How did you generate this new table?

>  static struct of_device_id imx53_pinctrl_of_match[] = {
> diff --git a/drivers/pinctrl/pinctrl-imx6q.c b/drivers/pinctrl/pinctrl-imx6q.c
> index 663346b..74ea946 100644
> --- a/drivers/pinctrl/pinctrl-imx6q.c
> +++ b/drivers/pinctrl/pinctrl-imx6q.c
> @@ -23,1935 +23,256 @@
>  #include "pinctrl-imx.h"
>
>  enum imx6q_pads {
....
> +       MX6Q_PAD_JTAG_TDI = 417,
> +       MX6Q_PAD_JTAG_TCK = 418,
> +       MX6Q_PAD_JTAG_TDO = 419,

Ideally even for this table, we may also do not need it.
Because the pin id defined here actually is dynamically calculated by
mux_reg/config_reg offset.
If that, why can't we also define the pinctrl_pin_desc dynamically and
register it into the core?
However, it may need the pinctrl core to provide register a single pin
function to driver.
Since it does not affect the binding itself, i'm ok it may be
discussed or done in the future
in a separate patch.

Besides above minor comments, this binding improvement patch is ok to me.
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>

Regards
Dong Aisheng

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 2/3] ARM: dts: imx: replace magic number with pin function name
       [not found] ` <1361533888-18073-3-git-send-email-shawn.guo@linaro.org>
@ 2013-03-01  0:45   ` Linus Walleij
  0 siblings, 0 replies; 22+ messages in thread
From: Linus Walleij @ 2013-03-01  0:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 22, 2013 at 12:51 PM, Shawn Guo <shawn.guo@linaro.org> wrote:

> This turns the imx pin function number defined by binding document
> into #define constants in header which can be used in dts and handled
> by pre-processor to improve the readability of device tree sources.
>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Acked-by: Dong Aisheng <dong.aisheng@linaro.org>

I agree and wanted this to be fixed all the time, so
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-02-25 13:33   ` Shawn Guo
@ 2013-03-01  0:55     ` Linus Walleij
  0 siblings, 0 replies; 22+ messages in thread
From: Linus Walleij @ 2013-03-01  0:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 25, 2013 at 2:33 PM, Shawn Guo <shawn.guo@linaro.org> wrote:

> May I have your ACK on the pinctrl driver changes?  I would like to
> have the series go via IMX tree for 3.10.

Of course. Looking great.

Acked-by: Linus Walleij <linus.walleij@linaro.org>

For the pinctrl parts.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-02-22 11:51 [PATCH v2 0/3] Get rid of big array from imx pinctrl driver Shawn Guo
                   ` (3 preceding siblings ...)
       [not found] ` <1361533888-18073-3-git-send-email-shawn.guo@linaro.org>
@ 2013-03-01  1:24 ` Olof Johansson
  2013-03-01  1:33   ` Shawn Guo
  2013-03-04  6:36   ` Shawn Guo
  2013-04-06 20:21 ` Fabio Estevam
  5 siblings, 2 replies; 22+ messages in thread
From: Olof Johansson @ 2013-03-01  1:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 22, 2013 at 3:51 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> Changes since v1:
>  * Remove the absolute path of imxXX-pinfunc.h in binding doc
>  * Remove the pin id from PIN_FUNC_ID/macro
>
> Shawn Guo (3):
>   ARM: dts: imx: use pre-processor for device trees
>   ARM: dts: imx: replace magic number with pin function name
>   pinctrl: imx: move hard-coding data into device tree

These patches were too large to make it out on any mailing list. I'm
guessing only the people who were recipients of them saw them.

Please figure out a way to post your work in a way that it can be reviewed.



-Olof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-03-01  1:24 ` [PATCH v2 0/3] Get rid of big array from imx pinctrl driver Olof Johansson
@ 2013-03-01  1:33   ` Shawn Guo
  2013-03-04  6:36   ` Shawn Guo
  1 sibling, 0 replies; 22+ messages in thread
From: Shawn Guo @ 2013-03-01  1:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Feb 28, 2013 at 05:24:21PM -0800, Olof Johansson wrote:
> On Fri, Feb 22, 2013 at 3:51 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> > Changes since v1:
> >  * Remove the absolute path of imxXX-pinfunc.h in binding doc
> >  * Remove the pin id from PIN_FUNC_ID/macro
> >
> > Shawn Guo (3):
> >   ARM: dts: imx: use pre-processor for device trees
> >   ARM: dts: imx: replace magic number with pin function name
> >   pinctrl: imx: move hard-coding data into device tree
> 
> These patches were too large to make it out on any mailing list. I'm
> guessing only the people who were recipients of them saw them.
> 
> Please figure out a way to post your work in a way that it can be reviewed.
> 
Yeah, I will publish a branch after v3.9-rc1 is available.

Shawn

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-03-01  1:24 ` [PATCH v2 0/3] Get rid of big array from imx pinctrl driver Olof Johansson
  2013-03-01  1:33   ` Shawn Guo
@ 2013-03-04  6:36   ` Shawn Guo
  1 sibling, 0 replies; 22+ messages in thread
From: Shawn Guo @ 2013-03-04  6:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Feb 28, 2013 at 05:24:21PM -0800, Olof Johansson wrote:
> On Fri, Feb 22, 2013 at 3:51 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> > Changes since v1:
> >  * Remove the absolute path of imxXX-pinfunc.h in binding doc
> >  * Remove the pin id from PIN_FUNC_ID/macro
> >
> > Shawn Guo (3):
> >   ARM: dts: imx: use pre-processor for device trees
> >   ARM: dts: imx: replace magic number with pin function name
> >   pinctrl: imx: move hard-coding data into device tree
> 
> These patches were too large to make it out on any mailing list. I'm
> guessing only the people who were recipients of them saw them.
> 
> Please figure out a way to post your work in a way that it can be reviewed.

I just merged patches #2 and #3 into one to make the diff stat a little
smaller, as per Sascha's suggestion, and push out the patches to branch
blow.

 git://git.linaro.org/people/shawnguo/linux-2.6.git imx/dt

Shawn

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-02-22 11:51 [PATCH v2 0/3] Get rid of big array from imx pinctrl driver Shawn Guo
                   ` (4 preceding siblings ...)
  2013-03-01  1:24 ` [PATCH v2 0/3] Get rid of big array from imx pinctrl driver Olof Johansson
@ 2013-04-06 20:21 ` Fabio Estevam
  2013-04-07  7:10   ` Shawn Guo
  5 siblings, 1 reply; 22+ messages in thread
From: Fabio Estevam @ 2013-04-06 20:21 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Shawn,

On Fri, Feb 22, 2013 at 8:51 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> Changes since v1:
>  * Remove the absolute path of imxXX-pinfunc.h in binding doc
>  * Remove the pin id from PIN_FUNC_ID/macro
>
> Shawn Guo (3):
>   ARM: dts: imx: use pre-processor for device trees
>   ARM: dts: imx: replace magic number with pin function name
>   pinctrl: imx: move hard-coding data into device tree

The last patch breaks audio on mx6qsabrelite: after a aplay command
the processor hangs.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-04-06 20:21 ` Fabio Estevam
@ 2013-04-07  7:10   ` Shawn Guo
  2013-04-07 13:53     ` Fabio Estevam
  2013-04-07 19:56     ` Fabio Estevam
  0 siblings, 2 replies; 22+ messages in thread
From: Shawn Guo @ 2013-04-07  7:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 06, 2013 at 05:21:37PM -0300, Fabio Estevam wrote:
> Hi Shawn,
> 
> On Fri, Feb 22, 2013 at 8:51 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> > Changes since v1:
> >  * Remove the absolute path of imxXX-pinfunc.h in binding doc
> >  * Remove the pin id from PIN_FUNC_ID/macro
> >
> > Shawn Guo (3):
> >   ARM: dts: imx: use pre-processor for device trees
> >   ARM: dts: imx: replace magic number with pin function name
> >   pinctrl: imx: move hard-coding data into device tree
> 
> The last patch breaks audio on mx6qsabrelite: after a aplay command
> the processor hangs.

Thanks for spotting it, Fabio.

There is indeed a bug with the patch.  The select input register should
not be defined in imx_pin_reg, because the same pad may have multiple
select input registers for different mux setting values.  So it should
be something defined with pin group.  The following code change should
fix the problem.

I just rebuilt imx/dt branch with the problem fixed and also had the
branch based on Stephen Warren's for-3.10/dtc-cpp-chroot-std-headers
branch so avoid all those dts files renaming.

Shawn

--8<----

diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c
index 479ceb6..b83be7c 100644
--- a/drivers/pinctrl/pinctrl-imx.c
+++ b/drivers/pinctrl/pinctrl-imx.c
@@ -198,6 +198,7 @@ static int imx_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector,
 	const struct imx_pinctrl_soc_info *info = ipctl->info;
 	const struct imx_pin_reg *pin_reg;
 	const unsigned *pins, *mux, *input_val;
+	u16 *input_reg;
 	unsigned int npins, pin_id;
 	int i;
 
@@ -209,6 +210,7 @@ static int imx_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector,
 	npins = info->groups[group].npins;
 	mux = info->groups[group].mux_mode;
 	input_val = info->groups[group].input_val;
+	input_reg = info->groups[group].input_reg;
 
 	WARN_ON(!pins || !npins || !mux || !input_val);
 
@@ -230,11 +232,11 @@ static int imx_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector,
 			pin_reg->mux_reg, mux[i]);
 
 		/* some pins also need select input setting, set it if found */
-		if (pin_reg->input_reg) {
-			writel(input_val[i], ipctl->base + pin_reg->input_reg);
+		if (input_reg[i]) {
+			writel(input_val[i], ipctl->base + input_reg[i]);
 			dev_dbg(ipctl->dev,
 				"==>select_input: offset 0x%x val 0x%x\n",
-				pin_reg->input_reg, input_val[i]);
+				input_reg[i], input_val[i]);
 		}
 	}
 
@@ -411,6 +413,8 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
 				GFP_KERNEL);
 	grp->mux_mode = devm_kzalloc(info->dev, grp->npins * sizeof(unsigned int),
 				GFP_KERNEL);
+	grp->input_reg = devm_kzalloc(info->dev, grp->npins * sizeof(u16),
+				GFP_KERNEL);
 	grp->input_val = devm_kzalloc(info->dev, grp->npins * sizeof(unsigned int),
 				GFP_KERNEL);
 	grp->configs = devm_kzalloc(info->dev, grp->npins * sizeof(unsigned long),
@@ -424,7 +428,7 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
 		grp->pins[i] = pin_id;
 		pin_reg->mux_reg = mux_reg;
 		pin_reg->conf_reg = conf_reg;
-		pin_reg->input_reg = be32_to_cpu(*list++);
+		grp->input_reg[i] = be32_to_cpu(*list++);
 		grp->mux_mode[i] = be32_to_cpu(*list++);
 		grp->input_val[i] = be32_to_cpu(*list++);
 
diff --git a/drivers/pinctrl/pinctrl-imx.h b/drivers/pinctrl/pinctrl-imx.h
index 4749b0a..1f27f24 100644
--- a/drivers/pinctrl/pinctrl-imx.h
+++ b/drivers/pinctrl/pinctrl-imx.h
@@ -26,6 +26,8 @@ struct platform_device;
  *	elements in .pins so we can iterate over that array
  * @mux_mode: the mux mode for each pin in this group. The size of this
  *	array is the same as pins.
+ * @input_reg: select input register offset for this mux if any
+ *	0 if no select input setting needed.
  * @input_val: the select input value for each pin in this group. The size of
  *	this array is the same as pins.
  * @configs: the config for each pin in this group. The size of this
@@ -36,6 +38,7 @@ struct imx_pin_group {
 	unsigned int *pins;
 	unsigned npins;
 	unsigned int *mux_mode;
+	u16 *input_reg;
 	unsigned int *input_val;
 	unsigned long *configs;
 };
@@ -56,13 +59,10 @@ struct imx_pmx_func {
  * struct imx_pin_reg - describe a pin reg map
  * @mux_reg: mux register offset
  * @conf_reg: config register offset
- * @input_reg: select input register offset for this mux if any
- *  0 if no select input setting needed.
  */
 struct imx_pin_reg {
 	u16 mux_reg;
 	u16 conf_reg;
-	u16 input_reg;
 };
 
 struct imx_pinctrl_soc_info {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-04-07  7:10   ` Shawn Guo
@ 2013-04-07 13:53     ` Fabio Estevam
  2013-04-07 14:26       ` Shawn Guo
  2013-04-07 19:56     ` Fabio Estevam
  1 sibling, 1 reply; 22+ messages in thread
From: Fabio Estevam @ 2013-04-07 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 7, 2013 at 4:10 AM, Shawn Guo <shawn.guo@linaro.org> wrote:

> Thanks for spotting it, Fabio.
>
> There is indeed a bug with the patch.  The select input register should
> not be defined in imx_pin_reg, because the same pad may have multiple
> select input registers for different mux setting values.  So it should
> be something defined with pin group.  The following code change should
> fix the problem.
>
> I just rebuilt imx/dt branch with the problem fixed and also had the
> branch based on Stephen Warren's for-3.10/dtc-cpp-chroot-std-headers
> branch so avoid all those dts files renaming.

With this change the audmux input registers are set and I can get
audio functional again.

I still see a different issue though:

In 3.6-rc5 we get:

imx6q-pinctrl 20e0000.iomuxc: maps: function i2c1 group i2c1grp-1 num 3
imx6q-pinctrl 20e0000.iomuxc: enable function i2c1 group i2c1grp-1
imx6q-pinctrl 20e0000.iomuxc: write: offset 0xa4 val 0x16
imx6q-pinctrl 20e0000.iomuxc: ==>select_input: offset 0x898 val 0x0
imx6q-pinctrl 20e0000.iomuxc: write: offset 0xc4 val 0x11
imx6q-pinctrl 20e0000.iomuxc: ==>select_input: offset 0x89c val 0x0
imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_D21
imx6q-pinctrl 20e0000.iomuxc: write: offset 0x3b8 val 0x1b8b1
imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_D28
imx6q-pinctrl 20e0000.iomuxc: write: offset 0x3d8 val 0x1b8b1

,but we get the following on your branch:

imx6q-pinctrl 20e0000.iomuxc: maps: function i2c1 group i2c1grp-1 num 3
imx6q-pinctrl 20e0000.iomuxc: enable function i2c1 group i2c1grp-1
imx6q-pinctrl 20e0000.iomuxc: write: offset 0xa4 val 0x16
imx6q-pinctrl 20e0000.iomuxc: ==>select_input: offset 0x898 val 0x0
imx6q-pinctrl 20e0000.iomuxc: write: offset 0xc4 val 0x11
imx6q-pinctrl 20e0000.iomuxc: ==>select_input: offset 0x89c val 0x0
imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_A17
imx6q-pinctrl 20e0000.iomuxc: write: offset 0x3b8 val 0x1b8b1
imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_EB1
imx6q-pinctrl 20e0000.iomuxc: write: offset 0x3d8 val 0x1b8b1

The pin name passed in the 'pinconf set pin' line is wrong.

On 3.6-rc5 MX6Q_PAD_EIM_D21 is number 22 and MX6Q_PAD_EIM_A17 is 41.

On your branch: MX6Q_PAD_EIM_D21 is 41 and MX6Q_PAD_EIM_A17 is 60

So this offset of 19 is causing troubles and I can see that you added
this offset  in the enum:

enum imx6q_pads {
	MX6Q_PAD_SD2_DAT1 = 19,
	MX6Q_PAD_SD2_DAT2 = 20,
	MX6Q_PAD_SD2_DAT0 = 21,
	MX6Q_PAD_RGMII_TXC = 22,
	MX6Q_PAD_RGMII_TD0 = 23,
	MX6Q_PAD_RGMII_TD1 = 24,
	MX6Q_PAD_RGMII_TD2 = 25,

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-04-07 13:53     ` Fabio Estevam
@ 2013-04-07 14:26       ` Shawn Guo
  2013-04-07 14:32         ` Fabio Estevam
  0 siblings, 1 reply; 22+ messages in thread
From: Shawn Guo @ 2013-04-07 14:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 07, 2013 at 10:53:33AM -0300, Fabio Estevam wrote:
> On Sun, Apr 7, 2013 at 4:10 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> 
> > Thanks for spotting it, Fabio.
> >
> > There is indeed a bug with the patch.  The select input register should
> > not be defined in imx_pin_reg, because the same pad may have multiple
> > select input registers for different mux setting values.  So it should
> > be something defined with pin group.  The following code change should
> > fix the problem.
> >
> > I just rebuilt imx/dt branch with the problem fixed and also had the
> > branch based on Stephen Warren's for-3.10/dtc-cpp-chroot-std-headers
> > branch so avoid all those dts files renaming.
> 
> With this change the audmux input registers are set and I can get
> audio functional again.
> 
> I still see a different issue though:
> 
That's expected, as the pin ID gets re-numbered based on offset of
mux/conf register, so that we can determine the pin ID at runtime and
avoid encoding it in device tree.

Shawn

> In 3.6-rc5 we get:
> 
> imx6q-pinctrl 20e0000.iomuxc: maps: function i2c1 group i2c1grp-1 num 3
> imx6q-pinctrl 20e0000.iomuxc: enable function i2c1 group i2c1grp-1
> imx6q-pinctrl 20e0000.iomuxc: write: offset 0xa4 val 0x16
> imx6q-pinctrl 20e0000.iomuxc: ==>select_input: offset 0x898 val 0x0
> imx6q-pinctrl 20e0000.iomuxc: write: offset 0xc4 val 0x11
> imx6q-pinctrl 20e0000.iomuxc: ==>select_input: offset 0x89c val 0x0
> imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_D21
> imx6q-pinctrl 20e0000.iomuxc: write: offset 0x3b8 val 0x1b8b1
> imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_D28
> imx6q-pinctrl 20e0000.iomuxc: write: offset 0x3d8 val 0x1b8b1
> 
> ,but we get the following on your branch:
> 
> imx6q-pinctrl 20e0000.iomuxc: maps: function i2c1 group i2c1grp-1 num 3
> imx6q-pinctrl 20e0000.iomuxc: enable function i2c1 group i2c1grp-1
> imx6q-pinctrl 20e0000.iomuxc: write: offset 0xa4 val 0x16
> imx6q-pinctrl 20e0000.iomuxc: ==>select_input: offset 0x898 val 0x0
> imx6q-pinctrl 20e0000.iomuxc: write: offset 0xc4 val 0x11
> imx6q-pinctrl 20e0000.iomuxc: ==>select_input: offset 0x89c val 0x0
> imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_A17
> imx6q-pinctrl 20e0000.iomuxc: write: offset 0x3b8 val 0x1b8b1
> imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_EB1
> imx6q-pinctrl 20e0000.iomuxc: write: offset 0x3d8 val 0x1b8b1
> 
> The pin name passed in the 'pinconf set pin' line is wrong.
> 
> On 3.6-rc5 MX6Q_PAD_EIM_D21 is number 22 and MX6Q_PAD_EIM_A17 is 41.
> 
> On your branch: MX6Q_PAD_EIM_D21 is 41 and MX6Q_PAD_EIM_A17 is 60
> 
> So this offset of 19 is causing troubles and I can see that you added
> this offset  in the enum:
> 
> enum imx6q_pads {
> 	MX6Q_PAD_SD2_DAT1 = 19,
> 	MX6Q_PAD_SD2_DAT2 = 20,
> 	MX6Q_PAD_SD2_DAT0 = 21,
> 	MX6Q_PAD_RGMII_TXC = 22,
> 	MX6Q_PAD_RGMII_TD0 = 23,
> 	MX6Q_PAD_RGMII_TD1 = 24,
> 	MX6Q_PAD_RGMII_TD2 = 25,

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-04-07 14:26       ` Shawn Guo
@ 2013-04-07 14:32         ` Fabio Estevam
  2013-04-07 14:33           ` Fabio Estevam
  2013-04-08  6:09           ` Shawn Guo
  0 siblings, 2 replies; 22+ messages in thread
From: Fabio Estevam @ 2013-04-07 14:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 7, 2013 at 11:26 AM, Shawn Guo <shawn.guo@linaro.org> wrote:

> That's expected, as the pin ID gets re-numbered based on offset of
> mux/conf register, so that we can determine the pin ID at runtime and
> avoid encoding it in device tree.

but debug messages seems buggy now:

Prior to the patch we had:

imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_D21

and now we have:

imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_A17

MX6Q_PAD_EIM_A17 has nothing to do with I2C, so we should print
MX6Q_PAD_EIM_A17 when we are actually configuring MX6Q_PAD_EIM_D21.

Also, where does the 19 offset in the  imx6q_pads enum come from?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-04-07 14:32         ` Fabio Estevam
@ 2013-04-07 14:33           ` Fabio Estevam
  2013-04-08  6:09           ` Shawn Guo
  1 sibling, 0 replies; 22+ messages in thread
From: Fabio Estevam @ 2013-04-07 14:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 7, 2013 at 11:32 AM, Fabio Estevam <festevam@gmail.com> wrote:
> On Sun, Apr 7, 2013 at 11:26 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
>
>> That's expected, as the pin ID gets re-numbered based on offset of
>> mux/conf register, so that we can determine the pin ID at runtime and
>> avoid encoding it in device tree.
>
> but debug messages seems buggy now:
>
> Prior to the patch we had:
>
> imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_D21
>
> and now we have:
>
> imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_A17
>
> MX6Q_PAD_EIM_A17 has nothing to do with I2C, so we should print
/s/should/should not/

> MX6Q_PAD_EIM_A17 when we are actually configuring MX6Q_PAD_EIM_D21.
>
> Also, where does the 19 offset in the  imx6q_pads enum come from?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-04-07  7:10   ` Shawn Guo
  2013-04-07 13:53     ` Fabio Estevam
@ 2013-04-07 19:56     ` Fabio Estevam
  2013-04-07 21:52       ` Fabio Estevam
  1 sibling, 1 reply; 22+ messages in thread
From: Fabio Estevam @ 2013-04-07 19:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 7, 2013 at 4:10 AM, Shawn Guo <shawn.guo@linaro.org> wrote:

> I just rebuilt imx/dt branch with the problem fixed and also had the
> branch based on Stephen Warren's for-3.10/dtc-cpp-chroot-std-headers
> branch so avoid all those dts files renaming.

Does imx6dl boot for you in your updated imx/dt branch?

It used to boot previously, but after the update it no longer boots.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-04-07 19:56     ` Fabio Estevam
@ 2013-04-07 21:52       ` Fabio Estevam
  2013-04-08  2:20         ` Shawn Guo
  0 siblings, 1 reply; 22+ messages in thread
From: Fabio Estevam @ 2013-04-07 21:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 7, 2013 at 4:56 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Sun, Apr 7, 2013 at 4:10 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
>
>> I just rebuilt imx/dt branch with the problem fixed and also had the
>> branch based on Stephen Warren's for-3.10/dtc-cpp-chroot-std-headers
>> branch so avoid all those dts files renaming.
>
> Does imx6dl boot for you in your updated imx/dt branch?
>
> It used to boot previously, but after the update it no longer boots.

Your updated branch missed:

[PATCH 3/6] ARM: imx: add initial imx6dl support

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-04-07 21:52       ` Fabio Estevam
@ 2013-04-08  2:20         ` Shawn Guo
  0 siblings, 0 replies; 22+ messages in thread
From: Shawn Guo @ 2013-04-08  2:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 07, 2013 at 06:52:11PM -0300, Fabio Estevam wrote:
> On Sun, Apr 7, 2013 at 4:56 PM, Fabio Estevam <festevam@gmail.com> wrote:
> > On Sun, Apr 7, 2013 at 4:10 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> >
> >> I just rebuilt imx/dt branch with the problem fixed and also had the
> >> branch based on Stephen Warren's for-3.10/dtc-cpp-chroot-std-headers
> >> branch so avoid all those dts files renaming.
> >
> > Does imx6dl boot for you in your updated imx/dt branch?
> >
> > It used to boot previously, but after the update it no longer boots.
> 
> Your updated branch missed:
> 
> [PATCH 3/6] ARM: imx: add initial imx6dl support

It's never been on imx/dt branch but imx/soc.  So for-next can be used
to boot imx6dl.

Shawn

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-04-07 14:32         ` Fabio Estevam
  2013-04-07 14:33           ` Fabio Estevam
@ 2013-04-08  6:09           ` Shawn Guo
  2013-04-09  8:36             ` Linus Walleij
  1 sibling, 1 reply; 22+ messages in thread
From: Shawn Guo @ 2013-04-08  6:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 07, 2013 at 11:32:45AM -0300, Fabio Estevam wrote:
> On Sun, Apr 7, 2013 at 11:26 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> 
> > That's expected, as the pin ID gets re-numbered based on offset of
> > mux/conf register, so that we can determine the pin ID at runtime and
> > avoid encoding it in device tree.
> 
> but debug messages seems buggy now:
> 
Yes, you are right.  The change attached below should fix the problem.
I am fixing it up for all imx pinctrl drivers on imx/dt branch.

> Prior to the patch we had:
> 
> imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_D21
> 
> and now we have:
> 
> imx6q-pinctrl 20e0000.iomuxc: pinconf set pin MX6Q_PAD_EIM_A17
> 
> MX6Q_PAD_EIM_A17 has nothing to do with I2C, so we should print
> MX6Q_PAD_EIM_A17 when we are actually configuring MX6Q_PAD_EIM_D21.
> 
> Also, where does the 19 offset in the  imx6q_pads enum come from?

We choose to have the pin ID simply calculated from register offset.
For example, the mux register offset for MX6Q_PAD_SD2_DAT1 is 0x4c, and
the ID would be 0x4c / 4 = 19.

Shawn

--8<-----

diff --git a/drivers/pinctrl/pinctrl-imx6q.c b/drivers/pinctrl/pinctrl-imx6q.c
index f00f532..76dd9c4 100644
--- a/drivers/pinctrl/pinctrl-imx6q.c
+++ b/drivers/pinctrl/pinctrl-imx6q.c
@@ -23,6 +23,25 @@
 #include "pinctrl-imx.h"
 
 enum imx6q_pads {
+	MX6Q_PAD_RESERVE0 = 0,
+	MX6Q_PAD_RESERVE1 = 1,
+	MX6Q_PAD_RESERVE2 = 2,
+	MX6Q_PAD_RESERVE3 = 3,
+	MX6Q_PAD_RESERVE4 = 4,
+	MX6Q_PAD_RESERVE5 = 5,
+	MX6Q_PAD_RESERVE6 = 6,
+	MX6Q_PAD_RESERVE7 = 7,
+	MX6Q_PAD_RESERVE8 = 8,
+	MX6Q_PAD_RESERVE9 = 9,
+	MX6Q_PAD_RESERVE10 = 10,
+	MX6Q_PAD_RESERVE11 = 11,
+	MX6Q_PAD_RESERVE12 = 12,
+	MX6Q_PAD_RESERVE13 = 13,
+	MX6Q_PAD_RESERVE14 = 14,
+	MX6Q_PAD_RESERVE15 = 15,
+	MX6Q_PAD_RESERVE16 = 16,
+	MX6Q_PAD_RESERVE17 = 17,
+	MX6Q_PAD_RESERVE18 = 18,
 	MX6Q_PAD_SD2_DAT1 = 19,
 	MX6Q_PAD_SD2_DAT2 = 20,
 	MX6Q_PAD_SD2_DAT0 = 21,
@@ -224,6 +243,25 @@ enum imx6q_pads {
 
 /* Pad names for the pinmux subsystem */
 static const struct pinctrl_pin_desc imx6q_pinctrl_pads[] = {
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE0),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE1),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE2),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE3),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE4),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE5),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE6),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE7),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE8),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE9),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE10),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE11),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE12),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE13),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE14),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE15),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE16),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE17),
+	IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE18),
 	IMX_PINCTRL_PIN(MX6Q_PAD_SD2_DAT1),
 	IMX_PINCTRL_PIN(MX6Q_PAD_SD2_DAT2),
 	IMX_PINCTRL_PIN(MX6Q_PAD_SD2_DAT0),

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-04-08  6:09           ` Shawn Guo
@ 2013-04-09  8:36             ` Linus Walleij
  2013-04-09 11:57               ` Shawn Guo
  0 siblings, 1 reply; 22+ messages in thread
From: Linus Walleij @ 2013-04-09  8:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 8, 2013 at 8:09 AM, Shawn Guo <shawn.guo@linaro.org> wrote:

> --8<-----
>
> diff --git a/drivers/pinctrl/pinctrl-imx6q.c b/drivers/pinctrl/pinctrl-imx6q.c
> index f00f532..76dd9c4 100644
> --- a/drivers/pinctrl/pinctrl-imx6q.c
> +++ b/drivers/pinctrl/pinctrl-imx6q.c

Acked-by. I trust you to fix up and merge the outcome of this Shawn...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 0/3] Get rid of big array from imx pinctrl driver
  2013-04-09  8:36             ` Linus Walleij
@ 2013-04-09 11:57               ` Shawn Guo
  0 siblings, 0 replies; 22+ messages in thread
From: Shawn Guo @ 2013-04-09 11:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Apr 09, 2013 at 10:36:59AM +0200, Linus Walleij wrote:
> On Mon, Apr 8, 2013 at 8:09 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> 
> > --8<-----
> >
> > diff --git a/drivers/pinctrl/pinctrl-imx6q.c b/drivers/pinctrl/pinctrl-imx6q.c
> > index f00f532..76dd9c4 100644
> > --- a/drivers/pinctrl/pinctrl-imx6q.c
> > +++ b/drivers/pinctrl/pinctrl-imx6q.c
> 
> Acked-by. I trust you to fix up and merge the outcome of this Shawn...

Thanks, Linus.  Thanks to Fabio too for noticing the bugs.

Shawn

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2013-04-09 11:57 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-22 11:51 [PATCH v2 0/3] Get rid of big array from imx pinctrl driver Shawn Guo
2013-02-22 11:51 ` [PATCH v2 1/3] ARM: dts: imx: use pre-processor for device trees Shawn Guo
2013-02-25  8:17 ` [PATCH v2 0/3] Get rid of big array from imx pinctrl driver Sascha Hauer
2013-02-25 13:33   ` Shawn Guo
2013-03-01  0:55     ` Linus Walleij
     [not found] ` <1361533888-18073-4-git-send-email-shawn.guo@linaro.org>
2013-02-26  9:13   ` [PATCH v2 3/3] pinctrl: imx: move hard-coding data into device tree Dong Aisheng
     [not found] ` <1361533888-18073-3-git-send-email-shawn.guo@linaro.org>
2013-03-01  0:45   ` [PATCH v2 2/3] ARM: dts: imx: replace magic number with pin function name Linus Walleij
2013-03-01  1:24 ` [PATCH v2 0/3] Get rid of big array from imx pinctrl driver Olof Johansson
2013-03-01  1:33   ` Shawn Guo
2013-03-04  6:36   ` Shawn Guo
2013-04-06 20:21 ` Fabio Estevam
2013-04-07  7:10   ` Shawn Guo
2013-04-07 13:53     ` Fabio Estevam
2013-04-07 14:26       ` Shawn Guo
2013-04-07 14:32         ` Fabio Estevam
2013-04-07 14:33           ` Fabio Estevam
2013-04-08  6:09           ` Shawn Guo
2013-04-09  8:36             ` Linus Walleij
2013-04-09 11:57               ` Shawn Guo
2013-04-07 19:56     ` Fabio Estevam
2013-04-07 21:52       ` Fabio Estevam
2013-04-08  2:20         ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.