]> git.karo-electronics.de Git - linux-beck.git/commit
pinctrl: imx: move hard-coding data into device tree
authorShawn Guo <shawn.guo@linaro.org>
Wed, 20 Feb 2013 02:32:52 +0000 (10:32 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Tue, 9 Apr 2013 14:52:50 +0000 (22:52 +0800)
commite16415313c9b00b1adc313e85c2c8a81febe0b98
treeb1e804b1bb647f3984036d9f9befbe53023bc519
parent36dffd8f49bc1364998db81bee739ea4574d88f7
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>
29 files changed:
Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/fsl,imx35-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/fsl,imx51-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/fsl,imx53-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/fsl,imx6q-pinctrl.txt
arch/arm/boot/dts/imx35-pinfunc.h [new file with mode: 0644]
arch/arm/boot/dts/imx51-babbage.dts
arch/arm/boot/dts/imx51-pinfunc.h [new file with mode: 0644]
arch/arm/boot/dts/imx51.dtsi
arch/arm/boot/dts/imx53-ard.dts
arch/arm/boot/dts/imx53-evk.dts
arch/arm/boot/dts/imx53-mba53.dts
arch/arm/boot/dts/imx53-pinfunc.h [new file with mode: 0644]
arch/arm/boot/dts/imx53-qsb.dts
arch/arm/boot/dts/imx53-smd.dts
arch/arm/boot/dts/imx53-tqma53.dtsi
arch/arm/boot/dts/imx53.dtsi
arch/arm/boot/dts/imx6q-arm2.dts
arch/arm/boot/dts/imx6q-pinfunc.h [new file with mode: 0644]
arch/arm/boot/dts/imx6q-sabreauto.dts
arch/arm/boot/dts/imx6q-sabrelite.dts
arch/arm/boot/dts/imx6q-sabresd.dts
arch/arm/boot/dts/imx6q.dtsi
drivers/pinctrl/pinctrl-imx.c
drivers/pinctrl/pinctrl-imx.h
drivers/pinctrl/pinctrl-imx35.c
drivers/pinctrl/pinctrl-imx51.c
drivers/pinctrl/pinctrl-imx53.c
drivers/pinctrl/pinctrl-imx6q.c