diff options
-rw-r--r-- | arch/arm/mach-omap1/board-fsample.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-perseus2.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-h4.c | 17 | ||||
-rw-r--r-- | arch/arm/plat-omap/devices.c | 61 |
6 files changed, 67 insertions, 61 deletions
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 096f2ed102cb..405ff7a3b82d 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -292,6 +292,18 @@ static void __init omap_fsample_init(void) | |||
292 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); | 292 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); |
293 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); | 293 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); |
294 | 294 | ||
295 | /* Mux pins for keypad */ | ||
296 | omap_cfg_reg(E2_7XX_KBR0); | ||
297 | omap_cfg_reg(J7_7XX_KBR1); | ||
298 | omap_cfg_reg(E1_7XX_KBR2); | ||
299 | omap_cfg_reg(F3_7XX_KBR3); | ||
300 | omap_cfg_reg(D2_7XX_KBR4); | ||
301 | omap_cfg_reg(C2_7XX_KBC0); | ||
302 | omap_cfg_reg(D3_7XX_KBC1); | ||
303 | omap_cfg_reg(E4_7XX_KBC2); | ||
304 | omap_cfg_reg(F4_7XX_KBC3); | ||
305 | omap_cfg_reg(E3_7XX_KBC4); | ||
306 | |||
295 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 307 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
296 | 308 | ||
297 | omap_board_config = fsample_config; | 309 | omap_board_config = fsample_config; |
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 5f30188ade99..ee469744466b 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -437,6 +437,19 @@ static void __init h2_init(void) | |||
437 | /* omap_cfg_reg(U19_ARMIO1); */ /* CD */ | 437 | /* omap_cfg_reg(U19_ARMIO1); */ /* CD */ |
438 | omap_cfg_reg(BALLOUT_V8_ARMIO3); /* WP */ | 438 | omap_cfg_reg(BALLOUT_V8_ARMIO3); /* WP */ |
439 | 439 | ||
440 | /* Mux pins for keypad */ | ||
441 | omap_cfg_reg(F18_1610_KBC0); | ||
442 | omap_cfg_reg(D20_1610_KBC1); | ||
443 | omap_cfg_reg(D19_1610_KBC2); | ||
444 | omap_cfg_reg(E18_1610_KBC3); | ||
445 | omap_cfg_reg(C21_1610_KBC4); | ||
446 | omap_cfg_reg(G18_1610_KBR0); | ||
447 | omap_cfg_reg(F19_1610_KBR1); | ||
448 | omap_cfg_reg(H14_1610_KBR2); | ||
449 | omap_cfg_reg(E20_1610_KBR3); | ||
450 | omap_cfg_reg(E19_1610_KBR4); | ||
451 | omap_cfg_reg(N19_1610_KBR5); | ||
452 | |||
440 | /* Irda */ | 453 | /* Irda */ |
441 | #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) | 454 | #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) |
442 | omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A); | 455 | omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A); |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 0be1d3b8181d..a228e9d6eb7b 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -397,6 +397,19 @@ static void __init h3_init(void) | |||
397 | /* GPIO10 pullup/down register, Enable pullup on GPIO10 */ | 397 | /* GPIO10 pullup/down register, Enable pullup on GPIO10 */ |
398 | omap_cfg_reg(V2_1710_GPIO10); | 398 | omap_cfg_reg(V2_1710_GPIO10); |
399 | 399 | ||
400 | /* Mux pins for keypad */ | ||
401 | omap_cfg_reg(F18_1610_KBC0); | ||
402 | omap_cfg_reg(D20_1610_KBC1); | ||
403 | omap_cfg_reg(D19_1610_KBC2); | ||
404 | omap_cfg_reg(E18_1610_KBC3); | ||
405 | omap_cfg_reg(C21_1610_KBC4); | ||
406 | omap_cfg_reg(G18_1610_KBR0); | ||
407 | omap_cfg_reg(F19_1610_KBR1); | ||
408 | omap_cfg_reg(H14_1610_KBR2); | ||
409 | omap_cfg_reg(E20_1610_KBR3); | ||
410 | omap_cfg_reg(E19_1610_KBR4); | ||
411 | omap_cfg_reg(N19_1610_KBR5); | ||
412 | |||
400 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 413 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
401 | spi_register_board_info(h3_spi_board_info, | 414 | spi_register_board_info(h3_spi_board_info, |
402 | ARRAY_SIZE(h3_spi_board_info)); | 415 | ARRAY_SIZE(h3_spi_board_info)); |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index e854d5741c88..50690347c7b4 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -260,6 +260,18 @@ static void __init omap_perseus2_init(void) | |||
260 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); | 260 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); |
261 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); | 261 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); |
262 | 262 | ||
263 | /* Mux pins for keypad */ | ||
264 | omap_cfg_reg(E2_7XX_KBR0); | ||
265 | omap_cfg_reg(J7_7XX_KBR1); | ||
266 | omap_cfg_reg(E1_7XX_KBR2); | ||
267 | omap_cfg_reg(F3_7XX_KBR3); | ||
268 | omap_cfg_reg(D2_7XX_KBR4); | ||
269 | omap_cfg_reg(C2_7XX_KBC0); | ||
270 | omap_cfg_reg(D3_7XX_KBC1); | ||
271 | omap_cfg_reg(E4_7XX_KBC2); | ||
272 | omap_cfg_reg(F4_7XX_KBC3); | ||
273 | omap_cfg_reg(E3_7XX_KBC4); | ||
274 | |||
263 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 275 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
264 | 276 | ||
265 | omap_board_config = perseus2_config; | 277 | omap_board_config = perseus2_config; |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 8c58f5106393..cdcd4fbad153 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -363,11 +363,28 @@ static void __init omap_h4_init(void) | |||
363 | #endif | 363 | #endif |
364 | 364 | ||
365 | #if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE) | 365 | #if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE) |
366 | omap_mux_init_gpio(88, OMAP_PULL_ENA | OMAP_PULL_UP); | ||
367 | omap_mux_init_gpio(89, OMAP_PULL_ENA | OMAP_PULL_UP); | ||
368 | omap_mux_init_gpio(124, OMAP_PULL_ENA | OMAP_PULL_UP); | ||
369 | omap_mux_init_signal("mcbsp2_dr.gpio_11", OMAP_PULL_ENA | OMAP_PULL_UP); | ||
366 | if (omap_has_menelaus()) { | 370 | if (omap_has_menelaus()) { |
371 | omap_mux_init_signal("sdrc_a14.gpio0", | ||
372 | OMAP_PULL_ENA | OMAP_PULL_UP); | ||
373 | omap_mux_init_signal("vlynq_rx0.gpio_15", 0); | ||
374 | omap_mux_init_signal("gpio_98", 0); | ||
367 | row_gpios[5] = 0; | 375 | row_gpios[5] = 0; |
368 | col_gpios[2] = 15; | 376 | col_gpios[2] = 15; |
369 | col_gpios[6] = 18; | 377 | col_gpios[6] = 18; |
378 | } else { | ||
379 | omap_mux_init_signal("gpio_96", OMAP_PULL_ENA | OMAP_PULL_UP); | ||
380 | omap_mux_init_signal("gpio_100", 0); | ||
381 | omap_mux_init_signal("gpio_98", 0); | ||
370 | } | 382 | } |
383 | omap_mux_init_signal("gpio_90", 0); | ||
384 | omap_mux_init_signal("gpio_91", 0); | ||
385 | omap_mux_init_signal("gpio_36", 0); | ||
386 | omap_mux_init_signal("mcbsp2_clkx.gpio_12", 0); | ||
387 | omap_mux_init_signal("gpio_97", 0); | ||
371 | #endif | 388 | #endif |
372 | 389 | ||
373 | i2c_register_board_info(1, h4_i2c_board_info, | 390 | i2c_register_board_info(1, h4_i2c_board_info, |
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 95677d17cd1c..ca5b2290f5a3 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <plat/control.h> | 24 | #include <plat/control.h> |
25 | #include <plat/board.h> | 25 | #include <plat/board.h> |
26 | #include <plat/mmc.h> | 26 | #include <plat/mmc.h> |
27 | #include <plat/mux.h> | ||
28 | #include <mach/gpio.h> | 27 | #include <mach/gpio.h> |
29 | #include <plat/menelaus.h> | 28 | #include <plat/menelaus.h> |
30 | #include <plat/mcbsp.h> | 29 | #include <plat/mcbsp.h> |
@@ -93,66 +92,7 @@ static inline void omap_init_dsp(void) { } | |||
93 | #endif /* CONFIG_OMAP_DSP */ | 92 | #endif /* CONFIG_OMAP_DSP */ |
94 | 93 | ||
95 | /*-------------------------------------------------------------------------*/ | 94 | /*-------------------------------------------------------------------------*/ |
96 | #if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE) | ||
97 | 95 | ||
98 | static void omap_init_kp(void) | ||
99 | { | ||
100 | /* 2430 and 34xx keypad is on TWL4030 */ | ||
101 | if (cpu_is_omap2430() || cpu_is_omap34xx()) | ||
102 | return; | ||
103 | |||
104 | if (machine_is_omap_h2() || machine_is_omap_h3()) { | ||
105 | omap_cfg_reg(F18_1610_KBC0); | ||
106 | omap_cfg_reg(D20_1610_KBC1); | ||
107 | omap_cfg_reg(D19_1610_KBC2); | ||
108 | omap_cfg_reg(E18_1610_KBC3); | ||
109 | omap_cfg_reg(C21_1610_KBC4); | ||
110 | |||
111 | omap_cfg_reg(G18_1610_KBR0); | ||
112 | omap_cfg_reg(F19_1610_KBR1); | ||
113 | omap_cfg_reg(H14_1610_KBR2); | ||
114 | omap_cfg_reg(E20_1610_KBR3); | ||
115 | omap_cfg_reg(E19_1610_KBR4); | ||
116 | omap_cfg_reg(N19_1610_KBR5); | ||
117 | } else if (machine_is_omap_perseus2() || machine_is_omap_fsample()) { | ||
118 | omap_cfg_reg(E2_7XX_KBR0); | ||
119 | omap_cfg_reg(J7_7XX_KBR1); | ||
120 | omap_cfg_reg(E1_7XX_KBR2); | ||
121 | omap_cfg_reg(F3_7XX_KBR3); | ||
122 | omap_cfg_reg(D2_7XX_KBR4); | ||
123 | |||
124 | omap_cfg_reg(C2_7XX_KBC0); | ||
125 | omap_cfg_reg(D3_7XX_KBC1); | ||
126 | omap_cfg_reg(E4_7XX_KBC2); | ||
127 | omap_cfg_reg(F4_7XX_KBC3); | ||
128 | omap_cfg_reg(E3_7XX_KBC4); | ||
129 | } else if (machine_is_omap_h4()) { | ||
130 | omap_cfg_reg(T19_24XX_KBR0); | ||
131 | omap_cfg_reg(R19_24XX_KBR1); | ||
132 | omap_cfg_reg(V18_24XX_KBR2); | ||
133 | omap_cfg_reg(M21_24XX_KBR3); | ||
134 | omap_cfg_reg(E5__24XX_KBR4); | ||
135 | if (omap_has_menelaus()) { | ||
136 | omap_cfg_reg(B3__24XX_KBR5); | ||
137 | omap_cfg_reg(AA4_24XX_KBC2); | ||
138 | omap_cfg_reg(B13_24XX_KBC6); | ||
139 | } else { | ||
140 | omap_cfg_reg(M18_24XX_KBR5); | ||
141 | omap_cfg_reg(H19_24XX_KBC2); | ||
142 | omap_cfg_reg(N19_24XX_KBC6); | ||
143 | } | ||
144 | omap_cfg_reg(R20_24XX_KBC0); | ||
145 | omap_cfg_reg(M14_24XX_KBC1); | ||
146 | omap_cfg_reg(V17_24XX_KBC3); | ||
147 | omap_cfg_reg(P21_24XX_KBC4); | ||
148 | omap_cfg_reg(L14_24XX_KBC5); | ||
149 | } | ||
150 | } | ||
151 | #else | ||
152 | static inline void omap_init_kp(void) {} | ||
153 | #endif | ||
154 | |||
155 | /*-------------------------------------------------------------------------*/ | ||
156 | #if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE) | 96 | #if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE) |
157 | 97 | ||
158 | static struct platform_device **omap_mcbsp_devices; | 98 | static struct platform_device **omap_mcbsp_devices; |
@@ -420,7 +360,6 @@ static int __init omap_init_devices(void) | |||
420 | * in alphabetical order so they're easier to sort through. | 360 | * in alphabetical order so they're easier to sort through. |
421 | */ | 361 | */ |
422 | omap_init_dsp(); | 362 | omap_init_dsp(); |
423 | omap_init_kp(); | ||
424 | omap_init_rng(); | 363 | omap_init_rng(); |
425 | omap_init_mcpdm(); | 364 | omap_init_mcpdm(); |
426 | omap_init_uwire(); | 365 | omap_init_uwire(); |