diff options
author | Tony Lindgren <tony@atomide.com> | 2008-01-25 03:42:48 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-04-14 12:57:11 -0400 |
commit | 7d7f665d5dac8d19f2fcb56baea09c59a3f861be (patch) | |
tree | 2fdfd5e07f0a258b64bb5921b982dbc8b1025444 /arch/arm/mach-omap1 | |
parent | 672e302e3c04e40e7c236cb09159f593f24f5def (diff) |
ARM: OMAP: Allow registering pin mux function
This patch changes pin multiplexing init to allow registering
custom function. The omap_cfg_reg() func will be split into
omap processor specific functions in later patch.
This is done to make adding omap3 pin multiplexing easier.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/mux.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c index 52c70e5fcf65..d74f6798d081 100644 --- a/arch/arm/mach-omap1/mux.c +++ b/arch/arm/mach-omap1/mux.c | |||
@@ -32,6 +32,8 @@ | |||
32 | 32 | ||
33 | #ifdef CONFIG_OMAP_MUX | 33 | #ifdef CONFIG_OMAP_MUX |
34 | 34 | ||
35 | static struct omap_mux_cfg arch_mux_cfg; | ||
36 | |||
35 | #ifdef CONFIG_ARCH_OMAP730 | 37 | #ifdef CONFIG_ARCH_OMAP730 |
36 | struct pin_config __initdata_or_module omap730_pins[] = { | 38 | struct pin_config __initdata_or_module omap730_pins[] = { |
37 | MUX_CFG_730("E2_730_KBR0", 12, 21, 0, 20, 1, 0) | 39 | MUX_CFG_730("E2_730_KBR0", 12, 21, 0, 20, 1, 0) |
@@ -310,18 +312,31 @@ MUX_CFG("Y14_1610_CCP_DATAM", 9, 21, 6, 2, 3, 1, 2, 0, 0) | |||
310 | }; | 312 | }; |
311 | #endif /* CONFIG_ARCH_OMAP15XX || CONFIG_ARCH_OMAP16XX */ | 313 | #endif /* CONFIG_ARCH_OMAP15XX || CONFIG_ARCH_OMAP16XX */ |
312 | 314 | ||
315 | int __init_or_module omap1_cfg_reg(const struct pin_config *cfg) | ||
316 | { | ||
317 | return 0; | ||
318 | } | ||
319 | |||
313 | int __init omap1_mux_init(void) | 320 | int __init omap1_mux_init(void) |
314 | { | 321 | { |
315 | 322 | ||
316 | #ifdef CONFIG_ARCH_OMAP730 | 323 | #ifdef CONFIG_ARCH_OMAP730 |
317 | omap_mux_register(omap730_pins, ARRAY_SIZE(omap730_pins)); | 324 | if (cpu_is_omap730()) { |
325 | arch_mux_cfg.pins = omap730_pins; | ||
326 | arch_mux_cfg.size = ARRAY_SIZE(omap730_pins); | ||
327 | arch_mux_cfg.cfg_reg = omap1_cfg_reg; | ||
328 | } | ||
318 | #endif | 329 | #endif |
319 | 330 | ||
320 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) | 331 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) |
321 | omap_mux_register(omap1xxx_pins, ARRAY_SIZE(omap1xxx_pins)); | 332 | if (cpu_is_omap15xx() || cpu_is_omap16xx()) { |
333 | arch_mux_cfg.pins = omap1xxx_pins; | ||
334 | arch_mux_cfg.size = ARRAY_SIZE(omap1xxx_pins); | ||
335 | arch_mux_cfg.cfg_reg = omap1_cfg_reg; | ||
336 | } | ||
322 | #endif | 337 | #endif |
323 | 338 | ||
324 | return 0; | 339 | return omap_mux_register(&arch_mux_cfg); |
325 | } | 340 | } |
326 | 341 | ||
327 | #endif | 342 | #endif |