Skip to content

Commit

Permalink
ARM: mxs: enable pinctrl dummy states
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn Guo committed May 8, 2012
1 parent a2aa65a commit d1654b8
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-mxs/include/mach/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-mxs/mach-apx4devkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-mxs/mach-m28evk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-mxs/mach-mx23evk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-mxs/mach-mx28evk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-mxs/mach-stmp378x_devb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-mxs/mach-tx28.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
11 changes: 11 additions & 0 deletions arch/arm/mach-mxs/mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <linux/mm.h>
#include <linux/init.h>
#include <linux/pinctrl/machine.h>

#include <asm/mach/map.h>

Expand Down Expand Up @@ -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();
}

0 comments on commit d1654b8

Please sign in to comment.