aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/dts/imx51-babbage.dts
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-02-19 21:32:52 -0500
committerShawn Guo <shawn.guo@linaro.org>2013-04-09 10:52:50 -0400
commite16415313c9b00b1adc313e85c2c8a81febe0b98 (patch)
treeb1e804b1bb647f3984036d9f9befbe53023bc519 /arch/arm/boot/dts/imx51-babbage.dts
parent36dffd8f49bc1364998db81bee739ea4574d88f7 (diff)
pinctrl: imx: move hard-coding data into device tree
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. As a bonus point of the change, those arbitrary magic numbers standing for particular PIN_FUNC_ID in device tree sources are now replaced by macros to improve the readability of dts files. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/boot/dts/imx51-babbage.dts')
-rw-r--r--arch/arm/boot/dts/imx51-babbage.dts14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
index 054db3b8f83f..6dd9486c755b 100644
--- a/arch/arm/boot/dts/imx51-babbage.dts
+++ b/arch/arm/boot/dts/imx51-babbage.dts
@@ -222,13 +222,13 @@
222 hog { 222 hog {
223 pinctrl_hog: hoggrp { 223 pinctrl_hog: hoggrp {
224 fsl,pins = < 224 fsl,pins = <
225 694 0x20d5 /* MX51_PAD_GPIO1_0__SD1_CD */ 225 MX51_PAD_GPIO1_0__SD1_CD 0x20d5
226 697 0x20d5 /* MX51_PAD_GPIO1_1__SD1_WP */ 226 MX51_PAD_GPIO1_1__SD1_WP 0x20d5
227 737 0x100 /* MX51_PAD_GPIO1_5__GPIO1_5 */ 227 MX51_PAD_GPIO1_5__GPIO1_5 0x100
228 740 0x100 /* MX51_PAD_GPIO1_6__GPIO1_6 */ 228 MX51_PAD_GPIO1_6__GPIO1_6 0x100
229 121 0x5 /* MX51_PAD_EIM_A27__GPIO2_21 */ 229 MX51_PAD_EIM_A27__GPIO2_21 0x5
230 402 0x85 /* MX51_PAD_CSPI1_SS0__GPIO4_24 */ 230 MX51_PAD_CSPI1_SS0__GPIO4_24 0x85
231 405 0x85 /* MX51_PAD_CSPI1_SS1__GPIO4_25 */ 231 MX51_PAD_CSPI1_SS1__GPIO4_25 0x85
232 >; 232 >;
233 }; 233 };
234 }; 234 };