From d1654b803f23a77e01ead7ab50ee3fdea931ae5a Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Sun, 6 May 2012 22:14:13 +0800 Subject: ARM: mxs: enable pinctrl dummy states 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 --- arch/arm/mach-mxs/include/mach/common.h | 2 ++ arch/arm/mach-mxs/mach-apx4devkit.c | 2 ++ arch/arm/mach-mxs/mach-m28evk.c | 2 ++ arch/arm/mach-mxs/mach-mx23evk.c | 2 ++ arch/arm/mach-mxs/mach-mx28evk.c | 2 ++ arch/arm/mach-mxs/mach-stmp378x_devb.c | 2 ++ arch/arm/mach-mxs/mach-tx28.c | 2 ++ arch/arm/mach-mxs/mm.c | 11 +++++++++++ 8 files changed, 25 insertions(+) (limited to 'arch/arm/mach-mxs') diff --git a/arch/arm/mach-mxs/include/mach/common.h b/arch/arm/mach-mxs/include/mach/common.h index c50c3ea28a9d..8d88399b73ef 100644 --- a/arch/arm/mach-mxs/include/mach/common.h +++ b/arch/arm/mach-mxs/include/mach/common.h @@ -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); diff --git a/arch/arm/mach-mxs/mach-apx4devkit.c b/arch/arm/mach-mxs/mach-apx4devkit.c index 48a7fab571a6..5e90b9dcdef8 100644 --- a/arch/arm/mach-mxs/mach-apx4devkit.c +++ b/arch/arm/mach-mxs/mach-apx4devkit.c @@ -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)); diff --git a/arch/arm/mach-mxs/mach-m28evk.c b/arch/arm/mach-mxs/mach-m28evk.c index 06d79963611c..4c00c879b893 100644 --- a/arch/arm/mach-mxs/mach-m28evk.c +++ b/arch/arm/mach-mxs/mach-m28evk.c @@ -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(); diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c index 5ea1c57d2606..e7272a41939d 100644 --- a/arch/arm/mach-mxs/mach-mx23evk.c +++ b/arch/arm/mach-mxs/mach-mx23evk.c @@ -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(); diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c index e386c142f93c..da4610ebe9e6 100644 --- a/arch/arm/mach-mxs/mach-mx28evk.c +++ b/arch/arm/mach-mxs/mach-mx28evk.c @@ -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(); diff --git a/arch/arm/mach-mxs/mach-stmp378x_devb.c b/arch/arm/mach-mxs/mach-stmp378x_devb.c index a626c07b8713..6548965e4a76 100644 --- a/arch/arm/mach-mxs/mach-stmp378x_devb.c +++ b/arch/arm/mach-mxs/mach-stmp378x_devb.c @@ -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)); diff --git a/arch/arm/mach-mxs/mach-tx28.c b/arch/arm/mach-mxs/mach-tx28.c index 2c0862e655ee..8837029de1a4 100644 --- a/arch/arm/mach-mxs/mach-tx28.c +++ b/arch/arm/mach-mxs/mach-tx28.c @@ -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)); diff --git a/arch/arm/mach-mxs/mm.c b/arch/arm/mach-mxs/mm.c index 50af5ceebf6d..67a384edcf5b 100644 --- a/arch/arm/mach-mxs/mm.c +++ b/arch/arm/mach-mxs/mm.c @@ -13,6 +13,7 @@ #include #include +#include #include @@ -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(); +} -- cgit v1.2.3-55-g7522 From a0f5e3631b07cabf624e7d818df76d47d9d21017 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Sun, 6 May 2012 23:13:13 +0800 Subject: ARM: mxs: enable pinctrl support Signed-off-by: Shawn Guo --- arch/arm/Kconfig | 1 + arch/arm/mach-mxs/Kconfig | 2 ++ 2 files changed, 3 insertions(+) (limited to 'arch/arm/mach-mxs') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cf006d40342c..c67494fc05a7 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -469,6 +469,7 @@ config ARCH_MXS select CLKDEV_LOOKUP select CLKSRC_MMIO select HAVE_CLK_PREPARE + select PINCTRL help Support for Freescale MXS-based family of processors diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index c57f9964a713..07d5383d68ee 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig @@ -9,11 +9,13 @@ config SOC_IMX23 bool select CPU_ARM926T select HAVE_PWM + select PINCTRL_IMX23 config SOC_IMX28 bool select CPU_ARM926T select HAVE_PWM + select PINCTRL_IMX28 comment "MXS platforms:" -- cgit v1.2.3-55-g7522