aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-02-12 15:26:47 -0500
committerTony Lindgren <tony@atomide.com>2010-02-15 12:26:58 -0500
commit6fbd55d077cdf2aeb7a170ff9f5779d19506bf9e (patch)
treece9f17ce3460e69841b48e1e0dbce591f48090d5
parent882c0518e5317a41834d0fceee07ae6ada2d7429 (diff)
omap2/3/4: Fix omap2_map_common_io for multi-omap
Fix omap2_map_common_io for multi-omap Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c2
-rwxr-xr-xarch/arm/mach-omap2/board-3630sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c2
-rw-r--r--arch/arm/mach-omap2/board-apollon.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c2
-rw-r--r--arch/arm/mach-omap2/board-generic.c2
-rw-r--r--arch/arm/mach-omap2/board-h4.c2
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c2
-rw-r--r--arch/arm/mach-omap2/board-ldp.c2
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c2
-rw-r--r--arch/arm/mach-omap2/board-overo.c2
-rw-r--r--arch/arm/mach-omap2/board-rx51.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom2.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom3.c2
-rw-r--r--arch/arm/mach-omap2/io.c51
-rw-r--r--arch/arm/plat-omap/include/plat/io.h33
22 files changed, 86 insertions, 38 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index e508904fb67e..1a619787bd80 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -215,7 +215,7 @@ static void __init omap_2430sdp_init(void)
215static void __init omap_2430sdp_map_io(void) 215static void __init omap_2430sdp_map_io(void)
216{ 216{
217 omap2_set_globals_243x(); 217 omap2_set_globals_243x();
218 omap2_map_common_io(); 218 omap243x_map_common_io();
219} 219}
220 220
221MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") 221MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index c90b0d0b1927..eda4f6448cce 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -674,7 +674,7 @@ static void __init omap_3430sdp_init(void)
674static void __init omap_3430sdp_map_io(void) 674static void __init omap_3430sdp_map_io(void)
675{ 675{
676 omap2_set_globals_343x(); 676 omap2_set_globals_343x();
677 omap2_map_common_io(); 677 omap34xx_map_common_io();
678} 678}
679 679
680MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") 680MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index c178e68472f8..4386d2b4a785 100755
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -69,7 +69,7 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
69static void __init omap_sdp_map_io(void) 69static void __init omap_sdp_map_io(void)
70{ 70{
71 omap2_set_globals_36xx(); 71 omap2_set_globals_36xx();
72 omap2_map_common_io(); 72 omap34xx_map_common_io();
73} 73}
74 74
75static struct omap_board_config_kernel sdp_config[] __initdata = { 75static struct omap_board_config_kernel sdp_config[] __initdata = {
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 0c6be6b4a7e2..cc4c00de32b3 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -87,7 +87,7 @@ static void __init omap_4430sdp_init(void)
87static void __init omap_4430sdp_map_io(void) 87static void __init omap_4430sdp_map_io(void)
88{ 88{
89 omap2_set_globals_443x(); 89 omap2_set_globals_443x();
90 omap2_map_common_io(); 90 omap44xx_map_common_io();
91} 91}
92 92
93MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") 93MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 54af5f8d8184..07b857de2500 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -228,7 +228,7 @@ static void __init am3517_evm_init(void)
228static void __init am3517_evm_map_io(void) 228static void __init am3517_evm_map_io(void)
229{ 229{
230 omap2_set_globals_343x(); 230 omap2_set_globals_343x();
231 omap2_map_common_io(); 231 omap34xx_map_common_io();
232} 232}
233 233
234MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") 234MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index fbbd68d69cc8..aa69fb999748 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -337,7 +337,7 @@ static void __init omap_apollon_init(void)
337static void __init omap_apollon_map_io(void) 337static void __init omap_apollon_map_io(void)
338{ 338{
339 omap2_set_globals_242x(); 339 omap2_set_globals_242x();
340 omap2_map_common_io(); 340 omap242x_map_common_io();
341} 341}
342 342
343MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") 343MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 85b45437d51a..0e292317c0ca 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -710,7 +710,7 @@ static void __init cm_t35_init_irq(void)
710static void __init cm_t35_map_io(void) 710static void __init cm_t35_map_io(void)
711{ 711{
712 omap2_set_globals_343x(); 712 omap2_set_globals_343x();
713 omap2_map_common_io(); 713 omap34xx_map_common_io();
714} 714}
715 715
716static struct omap_board_mux board_mux[] __initdata = { 716static struct omap_board_mux board_mux[] __initdata = {
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 7e6e6ca88be5..16cc06860670 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -50,7 +50,7 @@ static void __init omap_generic_init(void)
50static void __init omap_generic_map_io(void) 50static void __init omap_generic_map_io(void)
51{ 51{
52 omap2_set_globals_242x(); /* should be 242x, 243x, or 343x */ 52 omap2_set_globals_242x(); /* should be 242x, 243x, or 343x */
53 omap2_map_common_io(); 53 omap242x_map_common_io();
54} 54}
55 55
56MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") 56MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index cfb7f1257d20..5c49c407dd51 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -370,7 +370,7 @@ static void __init omap_h4_init(void)
370static void __init omap_h4_map_io(void) 370static void __init omap_h4_map_io(void)
371{ 371{
372 omap2_set_globals_242x(); 372 omap2_set_globals_242x();
373 omap2_map_common_io(); 373 omap242x_map_common_io();
374} 374}
375 375
376MACHINE_START(OMAP_H4, "OMAP2420 H4 board") 376MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 117b8fd7e3a6..9f7543384498 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -246,7 +246,7 @@ static void __init igep2_init(void)
246static void __init igep2_map_io(void) 246static void __init igep2_map_io(void)
247{ 247{
248 omap2_set_globals_343x(); 248 omap2_set_globals_343x();
249 omap2_map_common_io(); 249 omap34xx_map_common_io();
250} 250}
251 251
252MACHINE_START(IGEP0020, "IGEP v2 board") 252MACHINE_START(IGEP0020, "IGEP v2 board")
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 995d4a2b2dfd..f1699674a2fc 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -404,7 +404,7 @@ static void __init omap_ldp_init(void)
404static void __init omap_ldp_map_io(void) 404static void __init omap_ldp_map_io(void)
405{ 405{
406 omap2_set_globals_343x(); 406 omap2_set_globals_343x();
407 omap2_map_common_io(); 407 omap34xx_map_common_io();
408} 408}
409 409
410MACHINE_START(OMAP_LDP, "OMAP LDP board") 410MACHINE_START(OMAP_LDP, "OMAP LDP board")
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 764ab1ed576d..9de03f8e2e68 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -99,7 +99,7 @@ static void __init n8x0_onenand_init(void) {}
99static void __init n8x0_map_io(void) 99static void __init n8x0_map_io(void)
100{ 100{
101 omap2_set_globals_242x(); 101 omap2_set_globals_242x();
102 omap2_map_common_io(); 102 omap242x_map_common_io();
103} 103}
104 104
105static void __init n8x0_init_irq(void) 105static void __init n8x0_init_irq(void)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 231cb4ec1847..bf91bf7bd921 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -455,7 +455,7 @@ static void __init omap3_beagle_init(void)
455static void __init omap3_beagle_map_io(void) 455static void __init omap3_beagle_map_io(void)
456{ 456{
457 omap2_set_globals_343x(); 457 omap2_set_globals_343x();
458 omap2_map_common_io(); 458 omap34xx_map_common_io();
459} 459}
460 460
461MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") 461MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 822df79ce891..a221b7a1fcc6 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -702,7 +702,7 @@ static void __init omap3_evm_init(void)
702static void __init omap3_evm_map_io(void) 702static void __init omap3_evm_map_io(void)
703{ 703{
704 omap2_set_globals_343x(); 704 omap2_set_globals_343x();
705 omap2_map_common_io(); 705 omap34xx_map_common_io();
706} 706}
707 707
708MACHINE_START(OMAP3EVM, "OMAP3 EVM") 708MACHINE_START(OMAP3EVM, "OMAP3 EVM")
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index ef17cf1ab6d7..bc482abdd5d4 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -423,7 +423,7 @@ static void __init omap3pandora_init(void)
423static void __init omap3pandora_map_io(void) 423static void __init omap3pandora_map_io(void)
424{ 424{
425 omap2_set_globals_343x(); 425 omap2_set_globals_343x();
426 omap2_map_common_io(); 426 omap34xx_map_common_io();
427} 427}
428 428
429MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") 429MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index fe3d22cb2457..63436e9c2069 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -557,7 +557,7 @@ static void __init omap3_touchbook_init(void)
557static void __init omap3_touchbook_map_io(void) 557static void __init omap3_touchbook_map_io(void)
558{ 558{
559 omap2_set_globals_343x(); 559 omap2_set_globals_343x();
560 omap2_map_common_io(); 560 omap34xx_map_common_io();
561} 561}
562 562
563MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") 563MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index d192dd98a591..61abe0907265 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -469,7 +469,7 @@ static void __init overo_init(void)
469static void __init overo_map_io(void) 469static void __init overo_map_io(void)
470{ 470{
471 omap2_set_globals_343x(); 471 omap2_set_globals_343x();
472 omap2_map_common_io(); 472 omap34xx_map_common_io();
473} 473}
474 474
475MACHINE_START(OVERO, "Gumstix Overo") 475MACHINE_START(OVERO, "Gumstix Overo")
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 67bb3476b707..6a49f916103d 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -93,7 +93,7 @@ static void __init rx51_init(void)
93static void __init rx51_map_io(void) 93static void __init rx51_map_io(void)
94{ 94{
95 omap2_set_globals_343x(); 95 omap2_set_globals_343x();
96 omap2_map_common_io(); 96 omap34xx_map_common_io();
97} 97}
98 98
99MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") 99MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c
index bb87cf7878ff..9a26f84b1141 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -87,7 +87,7 @@ static void __init omap_zoom2_init(void)
87static void __init omap_zoom2_map_io(void) 87static void __init omap_zoom2_map_io(void)
88{ 88{
89 omap2_set_globals_343x(); 89 omap2_set_globals_343x();
90 omap2_map_common_io(); 90 omap34xx_map_common_io();
91} 91}
92 92
93MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") 93MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
diff --git a/arch/arm/mach-omap2/board-zoom3.c b/arch/arm/mach-omap2/board-zoom3.c
index 456b69072679..5e208942ca71 100644
--- a/arch/arm/mach-omap2/board-zoom3.c
+++ b/arch/arm/mach-omap2/board-zoom3.c
@@ -27,7 +27,7 @@
27static void __init omap_zoom_map_io(void) 27static void __init omap_zoom_map_io(void)
28{ 28{
29 omap2_set_globals_36xx(); 29 omap2_set_globals_36xx();
30 omap2_map_common_io(); 30 omap34xx_map_common_io();
31} 31}
32 32
33static struct omap_board_config_kernel zoom_config[] __initdata = { 33static struct omap_board_config_kernel zoom_config[] __initdata = {
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 01ef2ae93593..31296cbecb0b 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -236,37 +236,54 @@ static struct map_desc omap44xx_io_desc[] __initdata = {
236}; 236};
237#endif 237#endif
238 238
239void __init omap2_map_common_io(void) 239static void __init _omap2_map_common_io(void)
240{
241 /* Normally devicemaps_init() would flush caches and tlb after
242 * mdesc->map_io(), but we must also do it here because of the CPU
243 * revision check below.
244 */
245 local_flush_tlb_all();
246 flush_cache_all();
247
248 omap2_check_revision();
249 omap_sram_init();
250 omapfb_reserve_sdram();
251 omap_vram_reserve_sdram();
252}
253
254#ifdef CONFIG_ARCH_OMAP2420
255void __init omap242x_map_common_io()
240{ 256{
241#if defined(CONFIG_ARCH_OMAP2420)
242 iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); 257 iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
243 iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc)); 258 iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc));
259 _omap2_map_common_io();
260}
244#endif 261#endif
245 262
246#if defined(CONFIG_ARCH_OMAP2430) 263#ifdef CONFIG_ARCH_OMAP2430
264void __init omap243x_map_common_io()
265{
247 iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); 266 iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
248 iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc)); 267 iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc));
268 _omap2_map_common_io();
269}
249#endif 270#endif
250 271
251#if defined(CONFIG_ARCH_OMAP34XX) 272#ifdef CONFIG_ARCH_OMAP34XX
273void __init omap34xx_map_common_io()
274{
252 iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc)); 275 iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc));
276 _omap2_map_common_io();
277}
253#endif 278#endif
254 279
255#if defined(CONFIG_ARCH_OMAP4) 280#ifdef CONFIG_ARCH_OMAP4
281void __init omap44xx_map_common_io()
282{
256 iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); 283 iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc));
257#endif 284 _omap2_map_common_io();
258 /* Normally devicemaps_init() would flush caches and tlb after
259 * mdesc->map_io(), but we must also do it here because of the CPU
260 * revision check below.
261 */
262 local_flush_tlb_all();
263 flush_cache_all();
264
265 omap2_check_revision();
266 omap_sram_init();
267 omapfb_reserve_sdram();
268 omap_vram_reserve_sdram();
269} 285}
286#endif
270 287
271/* 288/*
272 * omap2_init_reprogram_sdrc - reprogram SDRC timing parameters 289 * omap2_init_reprogram_sdrc - reprogram SDRC timing parameters
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h
index a3e7b471bcba..19257bbbc9f3 100644
--- a/arch/arm/plat-omap/include/plat/io.h
+++ b/arch/arm/plat-omap/include/plat/io.h
@@ -268,7 +268,38 @@ struct omap_sdrc_params;
268extern void omap1_map_common_io(void); 268extern void omap1_map_common_io(void);
269extern void omap1_init_common_hw(void); 269extern void omap1_init_common_hw(void);
270 270
271extern void omap2_map_common_io(void); 271#ifdef CONFIG_ARCH_OMAP2420
272extern void omap242x_map_common_io(void);
273#else
274static inline void omap242x_map_common_io(void)
275{
276}
277#endif
278
279#ifdef CONFIG_ARCH_OMAP2430
280extern void omap243x_map_common_io(void);
281#else
282static inline void omap243x_map_common_io(void)
283{
284}
285#endif
286
287#ifdef CONFIG_ARCH_OMAP34XX
288extern void omap34xx_map_common_io(void);
289#else
290static inline void omap34xx_map_common_io(void)
291{
292}
293#endif
294
295#ifdef CONFIG_ARCH_OMAP4
296extern void omap44xx_map_common_io(void);
297#else
298static inline void omap44xx_map_common_io(void)
299{
300}
301#endif
302
272extern void omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, 303extern void omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
273 struct omap_sdrc_params *sdrc_cs1); 304 struct omap_sdrc_params *sdrc_cs1);
274 305