ARM: mxs: enable pinctrl dummy states
authorShawn Guo <shawn.guo@linaro.org>
Sun, 6 May 2012 14:14:13 +0000 (22:14 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Tue, 8 May 2012 15:05:17 +0000 (23:05 +0800)
The mxs pinctrl driver will only support DT probe.  That said, the mxs
device drivers can only get pinctrl state from pinctrl subsystem when
the drivers get probed from device tree.

Before converting the whole mxs platform support over to device tree,
we need to enable pinctrl dummy states for those non-DT board files
to ensure the pinctrl API adopted by mxs device drivers will work for
both DT and non-DT probe.

Instead of calling pinctrl_provide_dummies() directly in every board
file, the patch introduces soc specific calls mx23_soc_init() and
mx28_soc_init() for boards' .init_machine hook to invoke, so that
any soc specific setup for non-DT boot only can be added there.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
arch/arm/mach-mxs/include/mach/common.h
arch/arm/mach-mxs/mach-apx4devkit.c
arch/arm/mach-mxs/mach-m28evk.c
arch/arm/mach-mxs/mach-mx23evk.c
arch/arm/mach-mxs/mach-mx28evk.c
arch/arm/mach-mxs/mach-stmp378x_devb.c
arch/arm/mach-mxs/mach-tx28.c
arch/arm/mach-mxs/mm.c

index c50c3ea28a9d843d3e84cab939a9371ed11c7221..8d88399b73eff893651d829917bc1ec0bc6e07ba 100644 (file)
@@ -19,11 +19,13 @@ extern void mxs_timer_init(struct clk *, int);
 extern void mxs_restart(char, const char *);
 extern int mxs_saif_clkmux_select(unsigned int clkmux);
 
+extern void mx23_soc_init(void);
 extern int mx23_register_gpios(void);
 extern int mx23_clocks_init(void);
 extern void mx23_map_io(void);
 extern void mx23_init_irq(void);
 
+extern void mx28_soc_init(void);
 extern int mx28_register_gpios(void);
 extern int mx28_clocks_init(void);
 extern void mx28_map_io(void);
index 48a7fab571a6e186f5859dac9bcedae0da39d76e..5e90b9dcdef8789e10d71d2a8500604d53e57eeb 100644 (file)
@@ -207,6 +207,8 @@ static int apx4devkit_phy_fixup(struct phy_device *phy)
 
 static void __init apx4devkit_init(void)
 {
+       mx28_soc_init();
+
        mxs_iomux_setup_multiple_pads(apx4devkit_pads,
                        ARRAY_SIZE(apx4devkit_pads));
 
index 06d79963611ca0e4c0c174ad5a979280fc78b4e1..4c00c879b893b492a19685934c9c801b3165023d 100644 (file)
@@ -319,6 +319,8 @@ static struct mxs_mmc_platform_data m28evk_mmc_pdata[] __initdata = {
 
 static void __init m28evk_init(void)
 {
+       mx28_soc_init();
+
        mxs_iomux_setup_multiple_pads(m28evk_pads, ARRAY_SIZE(m28evk_pads));
 
        mx28_add_duart();
index 5ea1c57d2606dce6a7c94bc270a53b41ea4232ef..e7272a41939d6c4cb233c85473f7656112c99645 100644 (file)
@@ -141,6 +141,8 @@ static void __init mx23evk_init(void)
 {
        int ret;
 
+       mx23_soc_init();
+
        mxs_iomux_setup_multiple_pads(mx23evk_pads, ARRAY_SIZE(mx23evk_pads));
 
        mx23_add_duart();
index e386c142f93c3f48286b5266e48fd56af788b63b..da4610ebe9e6deafa4dd6097404c6db14918f960 100644 (file)
@@ -413,6 +413,8 @@ static void __init mx28evk_init(void)
 {
        int ret;
 
+       mx28_soc_init();
+
        mxs_iomux_setup_multiple_pads(mx28evk_pads, ARRAY_SIZE(mx28evk_pads));
 
        mx28_add_duart();
index a626c07b8713c46235eac72e3a1ef3dda9abdd0e..6548965e4a76326c28de6b7a1eed845e5e9bc40c 100644 (file)
@@ -85,6 +85,8 @@ static void __init stmp378x_dvb_init(void)
 {
        int ret;
 
+       mx23_soc_init();
+
        mxs_iomux_setup_multiple_pads(stmp378x_dvb_pads,
                        ARRAY_SIZE(stmp378x_dvb_pads));
 
index 2c0862e655ee9022f5a4b39276d9286c66f8047a..8837029de1a478b11737f96540305fe893979029 100644 (file)
@@ -146,6 +146,8 @@ static struct mxs_mmc_platform_data tx28_mmc0_pdata __initdata = {
 
 static void __init tx28_stk5v3_init(void)
 {
+       mx28_soc_init();
+
        mxs_iomux_setup_multiple_pads(tx28_stk5v3_pads,
                        ARRAY_SIZE(tx28_stk5v3_pads));
 
index 50af5ceebf6d26b48f3cf13e30227b9014da980a..67a384edcf5b8f794a6dcf463aef37a48cdce1af 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <linux/mm.h>
 #include <linux/init.h>
+#include <linux/pinctrl/machine.h>
 
 #include <asm/mach/map.h>
 
@@ -61,3 +62,13 @@ void __init mx28_init_irq(void)
 {
        icoll_init_irq();
 }
+
+void __init mx23_soc_init(void)
+{
+       pinctrl_provide_dummies();
+}
+
+void __init mx28_soc_init(void)
+{
+       pinctrl_provide_dummies();
+}
This page took 0.030274 seconds and 5 git commands to generate.