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-omap2/mux.c | |
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-omap2/mux.c')
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 05750975d746..351baab0503a 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/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 | /* NOTE: See mux.h for the enumeration */ | 37 | /* NOTE: See mux.h for the enumeration */ |
36 | 38 | ||
37 | struct pin_config __initdata_or_module omap24xx_pins[] = { | 39 | struct pin_config __initdata_or_module omap24xx_pins[] = { |
@@ -169,10 +171,25 @@ MUX_CFG_24XX("B13_24XX_KBC6", 0x110, 3, 0, 0, 1) | |||
169 | 171 | ||
170 | }; | 172 | }; |
171 | 173 | ||
172 | int __init omap2_mux_init(void) | 174 | #ifdef CONFIG_ARCH_OMAP24XX |
175 | int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg) | ||
173 | { | 176 | { |
174 | omap_mux_register(omap24xx_pins, ARRAY_SIZE(omap24xx_pins)); | ||
175 | return 0; | 177 | return 0; |
176 | } | 178 | } |
179 | #endif | ||
180 | |||
181 | int __init omap2_mux_init(void) | ||
182 | { | ||
183 | |||
184 | #ifdef CONFIG_ARCH_OMAP24XX | ||
185 | if (cpu_is_omap24xx()) { | ||
186 | arch_mux_cfg.pins = omap24xx_pins; | ||
187 | arch_mux_cfg.size = ARRAY_SIZE(omap24xx_pins); | ||
188 | arch_mux_cfg.cfg_reg = omap24xx_cfg_reg; | ||
189 | } | ||
190 | #endif | ||
191 | |||
192 | return omap_mux_register(&arch_mux_cfg); | ||
193 | } | ||
177 | 194 | ||
178 | #endif | 195 | #endif |