diff options
author | Tony Lindgren <tony@atomide.com> | 2011-10-05 18:14:02 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-10-19 19:34:10 -0400 |
commit | 7b88e62f5d219a86d81bdf4388012c97dc42e8f8 (patch) | |
tree | 174143f866565578b15b3fc368b23e906a878a55 /arch | |
parent | 3ae3e253db7385238dd9d6c67c085afa3e770a56 (diff) |
ARM: OMAP1: Use generic map_io, init_early and init_irq
This allows removing omap hacks for map_io allowing generic
map_io.
Note that in the future we can't do cpu_is_omapxxxx detection
until in init_early. This means that board-innovator.c now
assumes 15xx only, and board-generic.c assumes 16xx only.
This is best fixed later on by passing the SoC type from
device tree.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap1/board-ams-delta.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-fsample.c | 76 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-generic.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-htcherald.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-innovator.c | 36 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-nokia770.c | 34 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-osk.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmte.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmtt.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmz71.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-perseus2.c | 75 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-sx1.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-voiceblue.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-omap1/io.c | 56 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/io.h | 27 |
17 files changed, 183 insertions, 296 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 312ea6b0409d..44277370806e 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -135,12 +135,6 @@ void ams_delta_latch2_write(u16 mask, u16 value) | |||
135 | *(volatile __u16 *) AMS_DELTA_LATCH2_VIRT = ams_delta_latch2_reg; | 135 | *(volatile __u16 *) AMS_DELTA_LATCH2_VIRT = ams_delta_latch2_reg; |
136 | } | 136 | } |
137 | 137 | ||
138 | static void __init ams_delta_init_irq(void) | ||
139 | { | ||
140 | omap1_init_common_hw(); | ||
141 | omap1_init_irq(); | ||
142 | } | ||
143 | |||
144 | static struct map_desc ams_delta_io_desc[] __initdata = { | 138 | static struct map_desc ams_delta_io_desc[] __initdata = { |
145 | /* AMS_DELTA_LATCH1 */ | 139 | /* AMS_DELTA_LATCH1 */ |
146 | { | 140 | { |
@@ -379,17 +373,13 @@ static int __init ams_delta_modem_init(void) | |||
379 | } | 373 | } |
380 | arch_initcall(ams_delta_modem_init); | 374 | arch_initcall(ams_delta_modem_init); |
381 | 375 | ||
382 | static void __init ams_delta_map_io(void) | ||
383 | { | ||
384 | omap1_map_common_io(); | ||
385 | } | ||
386 | |||
387 | MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)") | 376 | MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)") |
388 | /* Maintainer: Jonathan McDowell <noodles@earth.li> */ | 377 | /* Maintainer: Jonathan McDowell <noodles@earth.li> */ |
389 | .boot_params = 0x10000100, | 378 | .boot_params = 0x10000100, |
390 | .map_io = ams_delta_map_io, | 379 | .map_io = omap15xx_map_io, |
380 | .init_early = omap1_init_early, | ||
391 | .reserve = omap_reserve, | 381 | .reserve = omap_reserve, |
392 | .init_irq = ams_delta_init_irq, | 382 | .init_irq = omap1_init_irq, |
393 | .init_machine = ams_delta_init, | 383 | .init_machine = ams_delta_init, |
394 | .timer = &omap1_timer, | 384 | .timer = &omap1_timer, |
395 | MACHINE_END | 385 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index a6b1bea50371..b09dfe6d6e8d 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -297,6 +297,39 @@ static struct omap_board_config_kernel fsample_config[] __initdata = { | |||
297 | 297 | ||
298 | static void __init omap_fsample_init(void) | 298 | static void __init omap_fsample_init(void) |
299 | { | 299 | { |
300 | /* Early, board-dependent init */ | ||
301 | |||
302 | /* | ||
303 | * Hold GSM Reset until needed | ||
304 | */ | ||
305 | omap_writew(omap_readw(OMAP7XX_DSP_M_CTL) & ~1, OMAP7XX_DSP_M_CTL); | ||
306 | |||
307 | /* | ||
308 | * UARTs -> done automagically by 8250 driver | ||
309 | */ | ||
310 | |||
311 | /* | ||
312 | * CSx timings, GPIO Mux ... setup | ||
313 | */ | ||
314 | |||
315 | /* Flash: CS0 timings setup */ | ||
316 | omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_0); | ||
317 | omap_writel(0x00000088, OMAP7XX_FLASH_ACFG_0); | ||
318 | |||
319 | /* | ||
320 | * Ethernet support through the debug board | ||
321 | * CS1 timings setup | ||
322 | */ | ||
323 | omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_1); | ||
324 | omap_writel(0x00000000, OMAP7XX_FLASH_ACFG_1); | ||
325 | |||
326 | /* | ||
327 | * Configure MPU_EXT_NIRQ IO in IO_CONF9 register, | ||
328 | * It is used as the Ethernet controller interrupt | ||
329 | */ | ||
330 | omap_writel(omap_readl(OMAP7XX_IO_CONF_9) & 0x1FFFFFFF, | ||
331 | OMAP7XX_IO_CONF_9); | ||
332 | |||
300 | fsample_init_smc91x(); | 333 | fsample_init_smc91x(); |
301 | 334 | ||
302 | if (gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0) | 335 | if (gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0) |
@@ -326,12 +359,6 @@ static void __init omap_fsample_init(void) | |||
326 | omap_register_i2c_bus(1, 100, NULL, 0); | 359 | omap_register_i2c_bus(1, 100, NULL, 0); |
327 | } | 360 | } |
328 | 361 | ||
329 | static void __init omap_fsample_init_irq(void) | ||
330 | { | ||
331 | omap1_init_common_hw(); | ||
332 | omap1_init_irq(); | ||
333 | } | ||
334 | |||
335 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ | 362 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ |
336 | static struct map_desc omap_fsample_io_desc[] __initdata = { | 363 | static struct map_desc omap_fsample_io_desc[] __initdata = { |
337 | { | 364 | { |
@@ -350,49 +377,18 @@ static struct map_desc omap_fsample_io_desc[] __initdata = { | |||
350 | 377 | ||
351 | static void __init omap_fsample_map_io(void) | 378 | static void __init omap_fsample_map_io(void) |
352 | { | 379 | { |
353 | omap1_map_common_io(); | 380 | omap15xx_map_io(); |
354 | iotable_init(omap_fsample_io_desc, | 381 | iotable_init(omap_fsample_io_desc, |
355 | ARRAY_SIZE(omap_fsample_io_desc)); | 382 | ARRAY_SIZE(omap_fsample_io_desc)); |
356 | |||
357 | /* Early, board-dependent init */ | ||
358 | |||
359 | /* | ||
360 | * Hold GSM Reset until needed | ||
361 | */ | ||
362 | omap_writew(omap_readw(OMAP7XX_DSP_M_CTL) & ~1, OMAP7XX_DSP_M_CTL); | ||
363 | |||
364 | /* | ||
365 | * UARTs -> done automagically by 8250 driver | ||
366 | */ | ||
367 | |||
368 | /* | ||
369 | * CSx timings, GPIO Mux ... setup | ||
370 | */ | ||
371 | |||
372 | /* Flash: CS0 timings setup */ | ||
373 | omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_0); | ||
374 | omap_writel(0x00000088, OMAP7XX_FLASH_ACFG_0); | ||
375 | |||
376 | /* | ||
377 | * Ethernet support through the debug board | ||
378 | * CS1 timings setup | ||
379 | */ | ||
380 | omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_1); | ||
381 | omap_writel(0x00000000, OMAP7XX_FLASH_ACFG_1); | ||
382 | |||
383 | /* | ||
384 | * Configure MPU_EXT_NIRQ IO in IO_CONF9 register, | ||
385 | * It is used as the Ethernet controller interrupt | ||
386 | */ | ||
387 | omap_writel(omap_readl(OMAP7XX_IO_CONF_9) & 0x1FFFFFFF, OMAP7XX_IO_CONF_9); | ||
388 | } | 383 | } |
389 | 384 | ||
390 | MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample") | 385 | MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample") |
391 | /* Maintainer: Brian Swetland <swetland@google.com> */ | 386 | /* Maintainer: Brian Swetland <swetland@google.com> */ |
392 | .boot_params = 0x10000100, | 387 | .boot_params = 0x10000100, |
393 | .map_io = omap_fsample_map_io, | 388 | .map_io = omap_fsample_map_io, |
389 | .init_early = omap1_init_early, | ||
394 | .reserve = omap_reserve, | 390 | .reserve = omap_reserve, |
395 | .init_irq = omap_fsample_init_irq, | 391 | .init_irq = omap1_init_irq, |
396 | .init_machine = omap_fsample_init, | 392 | .init_machine = omap_fsample_init, |
397 | .timer = &omap1_timer, | 393 | .timer = &omap1_timer, |
398 | MACHINE_END | 394 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c index 04fc356c40fa..cc0cca7ee199 100644 --- a/arch/arm/mach-omap1/board-generic.c +++ b/arch/arm/mach-omap1/board-generic.c | |||
@@ -28,12 +28,6 @@ | |||
28 | #include <plat/board.h> | 28 | #include <plat/board.h> |
29 | #include <plat/common.h> | 29 | #include <plat/common.h> |
30 | 30 | ||
31 | static void __init omap_generic_init_irq(void) | ||
32 | { | ||
33 | omap1_init_common_hw(); | ||
34 | omap1_init_irq(); | ||
35 | } | ||
36 | |||
37 | /* assume no Mini-AB port */ | 31 | /* assume no Mini-AB port */ |
38 | 32 | ||
39 | #ifdef CONFIG_ARCH_OMAP15XX | 33 | #ifdef CONFIG_ARCH_OMAP15XX |
@@ -87,17 +81,13 @@ static void __init omap_generic_init(void) | |||
87 | omap_register_i2c_bus(1, 100, NULL, 0); | 81 | omap_register_i2c_bus(1, 100, NULL, 0); |
88 | } | 82 | } |
89 | 83 | ||
90 | static void __init omap_generic_map_io(void) | ||
91 | { | ||
92 | omap1_map_common_io(); | ||
93 | } | ||
94 | |||
95 | MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") | 84 | MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") |
96 | /* Maintainer: Tony Lindgren <tony@atomide.com> */ | 85 | /* Maintainer: Tony Lindgren <tony@atomide.com> */ |
97 | .boot_params = 0x10000100, | 86 | .boot_params = 0x10000100, |
98 | .map_io = omap_generic_map_io, | 87 | .map_io = omap16xx_map_io, |
88 | .init_early = omap1_init_early, | ||
99 | .reserve = omap_reserve, | 89 | .reserve = omap_reserve, |
100 | .init_irq = omap_generic_init_irq, | 90 | .init_irq = omap1_init_irq, |
101 | .init_machine = omap_generic_init, | 91 | .init_machine = omap_generic_init, |
102 | .timer = &omap1_timer, | 92 | .timer = &omap1_timer, |
103 | MACHINE_END | 93 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index cb7fb1aa3dca..248a5b8e2865 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -373,12 +373,6 @@ static struct i2c_board_info __initdata h2_i2c_board_info[] = { | |||
373 | }, | 373 | }, |
374 | }; | 374 | }; |
375 | 375 | ||
376 | static void __init h2_init_irq(void) | ||
377 | { | ||
378 | omap1_init_common_hw(); | ||
379 | omap1_init_irq(); | ||
380 | } | ||
381 | |||
382 | static struct omap_usb_config h2_usb_config __initdata = { | 376 | static struct omap_usb_config h2_usb_config __initdata = { |
383 | /* usb1 has a Mini-AB port and external isp1301 transceiver */ | 377 | /* usb1 has a Mini-AB port and external isp1301 transceiver */ |
384 | .otg = 2, | 378 | .otg = 2, |
@@ -454,17 +448,13 @@ static void __init h2_init(void) | |||
454 | h2_mmc_init(); | 448 | h2_mmc_init(); |
455 | } | 449 | } |
456 | 450 | ||
457 | static void __init h2_map_io(void) | ||
458 | { | ||
459 | omap1_map_common_io(); | ||
460 | } | ||
461 | |||
462 | MACHINE_START(OMAP_H2, "TI-H2") | 451 | MACHINE_START(OMAP_H2, "TI-H2") |
463 | /* Maintainer: Imre Deak <imre.deak@nokia.com> */ | 452 | /* Maintainer: Imre Deak <imre.deak@nokia.com> */ |
464 | .boot_params = 0x10000100, | 453 | .boot_params = 0x10000100, |
465 | .map_io = h2_map_io, | 454 | .map_io = omap16xx_map_io, |
455 | .init_early = omap1_init_early, | ||
466 | .reserve = omap_reserve, | 456 | .reserve = omap_reserve, |
467 | .init_irq = h2_init_irq, | 457 | .init_irq = omap1_init_irq, |
468 | .init_machine = h2_init, | 458 | .init_machine = h2_init, |
469 | .timer = &omap1_timer, | 459 | .timer = &omap1_timer, |
470 | MACHINE_END | 460 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 31f34875ffad..f28f05fe7676 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -436,23 +436,13 @@ static void __init h3_init(void) | |||
436 | h3_mmc_init(); | 436 | h3_mmc_init(); |
437 | } | 437 | } |
438 | 438 | ||
439 | static void __init h3_init_irq(void) | ||
440 | { | ||
441 | omap1_init_common_hw(); | ||
442 | omap1_init_irq(); | ||
443 | } | ||
444 | |||
445 | static void __init h3_map_io(void) | ||
446 | { | ||
447 | omap1_map_common_io(); | ||
448 | } | ||
449 | |||
450 | MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") | 439 | MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") |
451 | /* Maintainer: Texas Instruments, Inc. */ | 440 | /* Maintainer: Texas Instruments, Inc. */ |
452 | .boot_params = 0x10000100, | 441 | .boot_params = 0x10000100, |
453 | .map_io = h3_map_io, | 442 | .map_io = omap16xx_map_io, |
443 | .init_early = omap1_init_early, | ||
454 | .reserve = omap_reserve, | 444 | .reserve = omap_reserve, |
455 | .init_irq = h3_init_irq, | 445 | .init_irq = omap1_init_irq, |
456 | .init_machine = h3_init, | 446 | .init_machine = h3_init, |
457 | .timer = &omap1_timer, | 447 | .timer = &omap1_timer, |
458 | MACHINE_END | 448 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index 36e06ea7ec65..67798dfc4f8d 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c | |||
@@ -500,7 +500,7 @@ static void __init htcherald_lcd_init(void) | |||
500 | 500 | ||
501 | static void __init htcherald_map_io(void) | 501 | static void __init htcherald_map_io(void) |
502 | { | 502 | { |
503 | omap1_map_common_io(); | 503 | omap7xx_map_io(); |
504 | 504 | ||
505 | /* | 505 | /* |
506 | * The LCD panel must be disabled and DMA turned off here, as doing | 506 | * The LCD panel must be disabled and DMA turned off here, as doing |
@@ -601,20 +601,14 @@ static void __init htcherald_init(void) | |||
601 | #endif | 601 | #endif |
602 | } | 602 | } |
603 | 603 | ||
604 | static void __init htcherald_init_irq(void) | ||
605 | { | ||
606 | printk(KERN_INFO "htcherald_init_irq.\n"); | ||
607 | omap1_init_common_hw(); | ||
608 | omap1_init_irq(); | ||
609 | } | ||
610 | |||
611 | MACHINE_START(HERALD, "HTC Herald") | 604 | MACHINE_START(HERALD, "HTC Herald") |
612 | /* Maintainer: Cory Maccarrone <darkstar6262@gmail.com> */ | 605 | /* Maintainer: Cory Maccarrone <darkstar6262@gmail.com> */ |
613 | /* Maintainer: wing-linux.sourceforge.net */ | 606 | /* Maintainer: wing-linux.sourceforge.net */ |
614 | .boot_params = 0x10000100, | 607 | .boot_params = 0x10000100, |
615 | .map_io = htcherald_map_io, | 608 | .map_io = htcherald_map_io, |
609 | .init_early = omap1_init_early, | ||
616 | .reserve = omap_reserve, | 610 | .reserve = omap_reserve, |
617 | .init_irq = htcherald_init_irq, | 611 | .init_irq = omap1_init_irq, |
618 | .init_machine = htcherald_init, | 612 | .init_machine = htcherald_init, |
619 | .timer = &omap1_timer, | 613 | .timer = &omap1_timer, |
620 | MACHINE_END | 614 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 0b1ba462d388..3e349d0ce32c 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -289,12 +289,6 @@ static void __init innovator_init_smc91x(void) | |||
289 | } | 289 | } |
290 | } | 290 | } |
291 | 291 | ||
292 | static void __init innovator_init_irq(void) | ||
293 | { | ||
294 | omap1_init_common_hw(); | ||
295 | omap1_init_irq(); | ||
296 | } | ||
297 | |||
298 | #ifdef CONFIG_ARCH_OMAP15XX | 292 | #ifdef CONFIG_ARCH_OMAP15XX |
299 | static struct omap_usb_config innovator1510_usb_config __initdata = { | 293 | static struct omap_usb_config innovator1510_usb_config __initdata = { |
300 | /* for bundled non-standard host and peripheral cables */ | 294 | /* for bundled non-standard host and peripheral cables */ |
@@ -439,30 +433,32 @@ static void __init innovator_init(void) | |||
439 | innovator_mmc_init(); | 433 | innovator_mmc_init(); |
440 | } | 434 | } |
441 | 435 | ||
436 | /* | ||
437 | * REVISIT: Assume 15xx for now, we don't want to do revision check | ||
438 | * until later on. The right way to fix this is to set up a different | ||
439 | * machine_id for 16xx Innovator, or use device tree. | ||
440 | */ | ||
442 | static void __init innovator_map_io(void) | 441 | static void __init innovator_map_io(void) |
443 | { | 442 | { |
444 | omap1_map_common_io(); | 443 | omap15xx_map_io(); |
445 | 444 | ||
446 | #ifdef CONFIG_ARCH_OMAP15XX | 445 | iotable_init(innovator1510_io_desc, ARRAY_SIZE(innovator1510_io_desc)); |
447 | if (cpu_is_omap1510()) { | 446 | udelay(10); /* Delay needed for FPGA */ |
448 | iotable_init(innovator1510_io_desc, ARRAY_SIZE(innovator1510_io_desc)); | 447 | |
449 | udelay(10); /* Delay needed for FPGA */ | 448 | /* Dump the Innovator FPGA rev early - useful info for support. */ |
450 | 449 | pr_debug("Innovator FPGA Rev %d.%d Board Rev %d\n", | |
451 | /* Dump the Innovator FPGA rev early - useful info for support. */ | 450 | fpga_read(OMAP1510_FPGA_REV_HIGH), |
452 | printk("Innovator FPGA Rev %d.%d Board Rev %d\n", | 451 | fpga_read(OMAP1510_FPGA_REV_LOW), |
453 | fpga_read(OMAP1510_FPGA_REV_HIGH), | 452 | fpga_read(OMAP1510_FPGA_BOARD_REV)); |
454 | fpga_read(OMAP1510_FPGA_REV_LOW), | ||
455 | fpga_read(OMAP1510_FPGA_BOARD_REV)); | ||
456 | } | ||
457 | #endif | ||
458 | } | 453 | } |
459 | 454 | ||
460 | MACHINE_START(OMAP_INNOVATOR, "TI-Innovator") | 455 | MACHINE_START(OMAP_INNOVATOR, "TI-Innovator") |
461 | /* Maintainer: MontaVista Software, Inc. */ | 456 | /* Maintainer: MontaVista Software, Inc. */ |
462 | .boot_params = 0x10000100, | 457 | .boot_params = 0x10000100, |
463 | .map_io = innovator_map_io, | 458 | .map_io = innovator_map_io, |
459 | .init_early = omap1_init_early, | ||
464 | .reserve = omap_reserve, | 460 | .reserve = omap_reserve, |
465 | .init_irq = innovator_init_irq, | 461 | .init_irq = omap1_init_irq, |
466 | .init_machine = innovator_init, | 462 | .init_machine = innovator_init, |
467 | .timer = &omap1_timer, | 463 | .timer = &omap1_timer, |
468 | MACHINE_END | 464 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 5469ce247ffe..9b348b6ee3ee 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -39,21 +39,6 @@ | |||
39 | 39 | ||
40 | #define ADS7846_PENDOWN_GPIO 15 | 40 | #define ADS7846_PENDOWN_GPIO 15 |
41 | 41 | ||
42 | static void __init omap_nokia770_init_irq(void) | ||
43 | { | ||
44 | /* On Nokia 770, the SleepX signal is masked with an | ||
45 | * MPUIO line by default. It has to be unmasked for it | ||
46 | * to become functional */ | ||
47 | |||
48 | /* SleepX mask direction */ | ||
49 | omap_writew((omap_readw(0xfffb5008) & ~2), 0xfffb5008); | ||
50 | /* Unmask SleepX signal */ | ||
51 | omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004); | ||
52 | |||
53 | omap1_init_common_hw(); | ||
54 | omap1_init_irq(); | ||
55 | } | ||
56 | |||
57 | static const unsigned int nokia770_keymap[] = { | 42 | static const unsigned int nokia770_keymap[] = { |
58 | KEY(1, 0, GROUP_0 | KEY_UP), | 43 | KEY(1, 0, GROUP_0 | KEY_UP), |
59 | KEY(2, 0, GROUP_1 | KEY_F5), | 44 | KEY(2, 0, GROUP_1 | KEY_F5), |
@@ -246,6 +231,15 @@ static inline void nokia770_mmc_init(void) | |||
246 | 231 | ||
247 | static void __init omap_nokia770_init(void) | 232 | static void __init omap_nokia770_init(void) |
248 | { | 233 | { |
234 | /* On Nokia 770, the SleepX signal is masked with an | ||
235 | * MPUIO line by default. It has to be unmasked for it | ||
236 | * to become functional */ | ||
237 | |||
238 | /* SleepX mask direction */ | ||
239 | omap_writew((omap_readw(0xfffb5008) & ~2), 0xfffb5008); | ||
240 | /* Unmask SleepX signal */ | ||
241 | omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004); | ||
242 | |||
249 | platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices)); | 243 | platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices)); |
250 | spi_register_board_info(nokia770_spi_board_info, | 244 | spi_register_board_info(nokia770_spi_board_info, |
251 | ARRAY_SIZE(nokia770_spi_board_info)); | 245 | ARRAY_SIZE(nokia770_spi_board_info)); |
@@ -258,16 +252,12 @@ static void __init omap_nokia770_init(void) | |||
258 | nokia770_mmc_init(); | 252 | nokia770_mmc_init(); |
259 | } | 253 | } |
260 | 254 | ||
261 | static void __init omap_nokia770_map_io(void) | ||
262 | { | ||
263 | omap1_map_common_io(); | ||
264 | } | ||
265 | |||
266 | MACHINE_START(NOKIA770, "Nokia 770") | 255 | MACHINE_START(NOKIA770, "Nokia 770") |
267 | .boot_params = 0x10000100, | 256 | .boot_params = 0x10000100, |
268 | .map_io = omap_nokia770_map_io, | 257 | .map_io = omap16xx_map_io, |
258 | .init_early = omap1_init_early, | ||
269 | .reserve = omap_reserve, | 259 | .reserve = omap_reserve, |
270 | .init_irq = omap_nokia770_init_irq, | 260 | .init_irq = omap1_init_irq, |
271 | .init_machine = omap_nokia770_init, | 261 | .init_machine = omap_nokia770_init, |
272 | .timer = &omap1_timer, | 262 | .timer = &omap1_timer, |
273 | MACHINE_END | 263 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index b08a21380772..562986e1874f 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -279,12 +279,6 @@ static void __init osk_init_cf(void) | |||
279 | irq_set_irq_type(gpio_to_irq(62), IRQ_TYPE_EDGE_FALLING); | 279 | irq_set_irq_type(gpio_to_irq(62), IRQ_TYPE_EDGE_FALLING); |
280 | } | 280 | } |
281 | 281 | ||
282 | static void __init osk_init_irq(void) | ||
283 | { | ||
284 | omap1_init_common_hw(); | ||
285 | omap1_init_irq(); | ||
286 | } | ||
287 | |||
288 | static struct omap_usb_config osk_usb_config __initdata = { | 282 | static struct omap_usb_config osk_usb_config __initdata = { |
289 | /* has usb host connector (A) ... for development it can also | 283 | /* has usb host connector (A) ... for development it can also |
290 | * be used, with a NONSTANDARD gender-bending cable/dongle, as | 284 | * be used, with a NONSTANDARD gender-bending cable/dongle, as |
@@ -576,17 +570,13 @@ static void __init osk_init(void) | |||
576 | osk_mistral_init(); | 570 | osk_mistral_init(); |
577 | } | 571 | } |
578 | 572 | ||
579 | static void __init osk_map_io(void) | ||
580 | { | ||
581 | omap1_map_common_io(); | ||
582 | } | ||
583 | |||
584 | MACHINE_START(OMAP_OSK, "TI-OSK") | 573 | MACHINE_START(OMAP_OSK, "TI-OSK") |
585 | /* Maintainer: Dirk Behme <dirk.behme@de.bosch.com> */ | 574 | /* Maintainer: Dirk Behme <dirk.behme@de.bosch.com> */ |
586 | .boot_params = 0x10000100, | 575 | .boot_params = 0x10000100, |
587 | .map_io = osk_map_io, | 576 | .map_io = omap16xx_map_io, |
577 | .init_early = omap1_init_early, | ||
588 | .reserve = omap_reserve, | 578 | .reserve = omap_reserve, |
589 | .init_irq = osk_init_irq, | 579 | .init_irq = omap1_init_irq, |
590 | .init_machine = osk_init, | 580 | .init_machine = osk_init, |
591 | .timer = &omap1_timer, | 581 | .timer = &omap1_timer, |
592 | MACHINE_END | 582 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 459cb6bfed55..fc9edd8595e9 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -59,12 +59,6 @@ | |||
59 | #define PALMTE_MMC2_GPIO OMAP_MPUIO(7) | 59 | #define PALMTE_MMC2_GPIO OMAP_MPUIO(7) |
60 | #define PALMTE_MMC3_GPIO OMAP_MPUIO(11) | 60 | #define PALMTE_MMC3_GPIO OMAP_MPUIO(11) |
61 | 61 | ||
62 | static void __init omap_palmte_init_irq(void) | ||
63 | { | ||
64 | omap1_init_common_hw(); | ||
65 | omap1_init_irq(); | ||
66 | } | ||
67 | |||
68 | static const unsigned int palmte_keymap[] = { | 62 | static const unsigned int palmte_keymap[] = { |
69 | KEY(0, 0, KEY_F1), /* Calendar */ | 63 | KEY(0, 0, KEY_F1), /* Calendar */ |
70 | KEY(1, 0, KEY_F2), /* Contacts */ | 64 | KEY(1, 0, KEY_F2), /* Contacts */ |
@@ -269,16 +263,12 @@ static void __init omap_palmte_init(void) | |||
269 | omap_register_i2c_bus(1, 100, NULL, 0); | 263 | omap_register_i2c_bus(1, 100, NULL, 0); |
270 | } | 264 | } |
271 | 265 | ||
272 | static void __init omap_palmte_map_io(void) | ||
273 | { | ||
274 | omap1_map_common_io(); | ||
275 | } | ||
276 | |||
277 | MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") | 266 | MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") |
278 | .boot_params = 0x10000100, | 267 | .boot_params = 0x10000100, |
279 | .map_io = omap_palmte_map_io, | 268 | .map_io = omap15xx_map_io, |
269 | .init_early = omap1_init_early, | ||
280 | .reserve = omap_reserve, | 270 | .reserve = omap_reserve, |
281 | .init_irq = omap_palmte_init_irq, | 271 | .init_irq = omap1_init_irq, |
282 | .init_machine = omap_palmte_init, | 272 | .init_machine = omap_palmte_init, |
283 | .timer = &omap1_timer, | 273 | .timer = &omap1_timer, |
284 | MACHINE_END | 274 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index b214f45f646c..5ff3def49a85 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c | |||
@@ -263,12 +263,6 @@ static struct spi_board_info __initdata palmtt_boardinfo[] = { | |||
263 | } | 263 | } |
264 | }; | 264 | }; |
265 | 265 | ||
266 | static void __init omap_palmtt_init_irq(void) | ||
267 | { | ||
268 | omap1_init_common_hw(); | ||
269 | omap1_init_irq(); | ||
270 | } | ||
271 | |||
272 | static struct omap_usb_config palmtt_usb_config __initdata = { | 266 | static struct omap_usb_config palmtt_usb_config __initdata = { |
273 | .register_dev = 1, | 267 | .register_dev = 1, |
274 | .hmc_mode = 0, | 268 | .hmc_mode = 0, |
@@ -315,16 +309,12 @@ static void __init omap_palmtt_init(void) | |||
315 | omap_register_i2c_bus(1, 100, NULL, 0); | 309 | omap_register_i2c_bus(1, 100, NULL, 0); |
316 | } | 310 | } |
317 | 311 | ||
318 | static void __init omap_palmtt_map_io(void) | ||
319 | { | ||
320 | omap1_map_common_io(); | ||
321 | } | ||
322 | |||
323 | MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T") | 312 | MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T") |
324 | .boot_params = 0x10000100, | 313 | .boot_params = 0x10000100, |
325 | .map_io = omap_palmtt_map_io, | 314 | .map_io = omap15xx_map_io, |
315 | .init_early = omap1_init_early, | ||
326 | .reserve = omap_reserve, | 316 | .reserve = omap_reserve, |
327 | .init_irq = omap_palmtt_init_irq, | 317 | .init_irq = omap1_init_irq, |
328 | .init_machine = omap_palmtt_init, | 318 | .init_machine = omap_palmtt_init, |
329 | .timer = &omap1_timer, | 319 | .timer = &omap1_timer, |
330 | MACHINE_END | 320 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index 9b0ea48d35fd..8e0887375f7e 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
@@ -57,13 +57,6 @@ | |||
57 | #define PALMZ71_SLIDER_GPIO OMAP_MPUIO(3) | 57 | #define PALMZ71_SLIDER_GPIO OMAP_MPUIO(3) |
58 | #define PALMZ71_MMC_IN_GPIO OMAP_MPUIO(4) | 58 | #define PALMZ71_MMC_IN_GPIO OMAP_MPUIO(4) |
59 | 59 | ||
60 | static void __init | ||
61 | omap_palmz71_init_irq(void) | ||
62 | { | ||
63 | omap1_init_common_hw(); | ||
64 | omap1_init_irq(); | ||
65 | } | ||
66 | |||
67 | static const unsigned int palmz71_keymap[] = { | 60 | static const unsigned int palmz71_keymap[] = { |
68 | KEY(0, 0, KEY_F1), | 61 | KEY(0, 0, KEY_F1), |
69 | KEY(1, 0, KEY_F2), | 62 | KEY(1, 0, KEY_F2), |
@@ -334,17 +327,12 @@ omap_palmz71_init(void) | |||
334 | palmz71_gpio_setup(0); | 327 | palmz71_gpio_setup(0); |
335 | } | 328 | } |
336 | 329 | ||
337 | static void __init | ||
338 | omap_palmz71_map_io(void) | ||
339 | { | ||
340 | omap1_map_common_io(); | ||
341 | } | ||
342 | |||
343 | MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71") | 330 | MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71") |
344 | .boot_params = 0x10000100, | 331 | .boot_params = 0x10000100, |
345 | .map_io = omap_palmz71_map_io, | 332 | .map_io = omap15xx_map_io, |
333 | .init_early = omap1_init_early, | ||
346 | .reserve = omap_reserve, | 334 | .reserve = omap_reserve, |
347 | .init_irq = omap_palmz71_init_irq, | 335 | .init_irq = omap1_init_irq, |
348 | .init_machine = omap_palmz71_init, | 336 | .init_machine = omap_palmz71_init, |
349 | .timer = &omap1_timer, | 337 | .timer = &omap1_timer, |
350 | MACHINE_END | 338 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 67acd4142639..6ed649b8b8d3 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -265,6 +265,39 @@ static void __init perseus2_init_smc91x(void) | |||
265 | 265 | ||
266 | static void __init omap_perseus2_init(void) | 266 | static void __init omap_perseus2_init(void) |
267 | { | 267 | { |
268 | /* Early, board-dependent init */ | ||
269 | |||
270 | /* | ||
271 | * Hold GSM Reset until needed | ||
272 | */ | ||
273 | omap_writew(omap_readw(OMAP7XX_DSP_M_CTL) & ~1, OMAP7XX_DSP_M_CTL); | ||
274 | |||
275 | /* | ||
276 | * UARTs -> done automagically by 8250 driver | ||
277 | */ | ||
278 | |||
279 | /* | ||
280 | * CSx timings, GPIO Mux ... setup | ||
281 | */ | ||
282 | |||
283 | /* Flash: CS0 timings setup */ | ||
284 | omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_0); | ||
285 | omap_writel(0x00000088, OMAP7XX_FLASH_ACFG_0); | ||
286 | |||
287 | /* | ||
288 | * Ethernet support through the debug board | ||
289 | * CS1 timings setup | ||
290 | */ | ||
291 | omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_1); | ||
292 | omap_writel(0x00000000, OMAP7XX_FLASH_ACFG_1); | ||
293 | |||
294 | /* | ||
295 | * Configure MPU_EXT_NIRQ IO in IO_CONF9 register, | ||
296 | * It is used as the Ethernet controller interrupt | ||
297 | */ | ||
298 | omap_writel(omap_readl(OMAP7XX_IO_CONF_9) & 0x1FFFFFFF, | ||
299 | OMAP7XX_IO_CONF_9); | ||
300 | |||
268 | perseus2_init_smc91x(); | 301 | perseus2_init_smc91x(); |
269 | 302 | ||
270 | if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0) | 303 | if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0) |
@@ -294,11 +327,6 @@ static void __init omap_perseus2_init(void) | |||
294 | omap_register_i2c_bus(1, 100, NULL, 0); | 327 | omap_register_i2c_bus(1, 100, NULL, 0); |
295 | } | 328 | } |
296 | 329 | ||
297 | static void __init omap_perseus2_init_irq(void) | ||
298 | { | ||
299 | omap1_init_common_hw(); | ||
300 | omap1_init_irq(); | ||
301 | } | ||
302 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ | 330 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ |
303 | static struct map_desc omap_perseus2_io_desc[] __initdata = { | 331 | static struct map_desc omap_perseus2_io_desc[] __initdata = { |
304 | { | 332 | { |
@@ -311,49 +339,18 @@ static struct map_desc omap_perseus2_io_desc[] __initdata = { | |||
311 | 339 | ||
312 | static void __init omap_perseus2_map_io(void) | 340 | static void __init omap_perseus2_map_io(void) |
313 | { | 341 | { |
314 | omap1_map_common_io(); | 342 | omap7xx_map_io(); |
315 | iotable_init(omap_perseus2_io_desc, | 343 | iotable_init(omap_perseus2_io_desc, |
316 | ARRAY_SIZE(omap_perseus2_io_desc)); | 344 | ARRAY_SIZE(omap_perseus2_io_desc)); |
317 | |||
318 | /* Early, board-dependent init */ | ||
319 | |||
320 | /* | ||
321 | * Hold GSM Reset until needed | ||
322 | */ | ||
323 | omap_writew(omap_readw(OMAP7XX_DSP_M_CTL) & ~1, OMAP7XX_DSP_M_CTL); | ||
324 | |||
325 | /* | ||
326 | * UARTs -> done automagically by 8250 driver | ||
327 | */ | ||
328 | |||
329 | /* | ||
330 | * CSx timings, GPIO Mux ... setup | ||
331 | */ | ||
332 | |||
333 | /* Flash: CS0 timings setup */ | ||
334 | omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_0); | ||
335 | omap_writel(0x00000088, OMAP7XX_FLASH_ACFG_0); | ||
336 | |||
337 | /* | ||
338 | * Ethernet support through the debug board | ||
339 | * CS1 timings setup | ||
340 | */ | ||
341 | omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_1); | ||
342 | omap_writel(0x00000000, OMAP7XX_FLASH_ACFG_1); | ||
343 | |||
344 | /* | ||
345 | * Configure MPU_EXT_NIRQ IO in IO_CONF9 register, | ||
346 | * It is used as the Ethernet controller interrupt | ||
347 | */ | ||
348 | omap_writel(omap_readl(OMAP7XX_IO_CONF_9) & 0x1FFFFFFF, OMAP7XX_IO_CONF_9); | ||
349 | } | 345 | } |
350 | 346 | ||
351 | MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2") | 347 | MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2") |
352 | /* Maintainer: Kevin Hilman <kjh@hilman.org> */ | 348 | /* Maintainer: Kevin Hilman <kjh@hilman.org> */ |
353 | .boot_params = 0x10000100, | 349 | .boot_params = 0x10000100, |
354 | .map_io = omap_perseus2_map_io, | 350 | .map_io = omap_perseus2_map_io, |
351 | .init_early = omap1_init_early, | ||
355 | .reserve = omap_reserve, | 352 | .reserve = omap_reserve, |
356 | .init_irq = omap_perseus2_init_irq, | 353 | .init_irq = omap1_init_irq, |
357 | .init_machine = omap_perseus2_init, | 354 | .init_machine = omap_perseus2_init, |
358 | .timer = &omap1_timer, | 355 | .timer = &omap1_timer, |
359 | MACHINE_END | 356 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 9c3b7c52d9cf..23326e04d6b9 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
@@ -407,24 +407,13 @@ static void __init omap_sx1_init(void) | |||
407 | gpio_direction_output(11, 0); /*A_SWITCH = 0 */ | 407 | gpio_direction_output(11, 0); /*A_SWITCH = 0 */ |
408 | gpio_direction_output(15, 0); /*A_USB_ON = 0 */ | 408 | gpio_direction_output(15, 0); /*A_USB_ON = 0 */ |
409 | } | 409 | } |
410 | /*----------------------------------------*/ | ||
411 | static void __init omap_sx1_init_irq(void) | ||
412 | { | ||
413 | omap1_init_common_hw(); | ||
414 | omap1_init_irq(); | ||
415 | } | ||
416 | /*----------------------------------------*/ | ||
417 | |||
418 | static void __init omap_sx1_map_io(void) | ||
419 | { | ||
420 | omap1_map_common_io(); | ||
421 | } | ||
422 | 410 | ||
423 | MACHINE_START(SX1, "OMAP310 based Siemens SX1") | 411 | MACHINE_START(SX1, "OMAP310 based Siemens SX1") |
424 | .boot_params = 0x10000100, | 412 | .boot_params = 0x10000100, |
425 | .map_io = omap_sx1_map_io, | 413 | .map_io = omap15xx_map_io, |
414 | .init_early = omap1_init_early, | ||
426 | .reserve = omap_reserve, | 415 | .reserve = omap_reserve, |
427 | .init_irq = omap_sx1_init_irq, | 416 | .init_irq = omap1_init_irq, |
428 | .init_machine = omap_sx1_init, | 417 | .init_machine = omap_sx1_init, |
429 | .timer = &omap1_timer, | 418 | .timer = &omap1_timer, |
430 | MACHINE_END | 419 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 036edc0ee9b6..1444ce846ab7 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -159,17 +159,6 @@ static struct omap_usb_config voiceblue_usb_config __initdata = { | |||
159 | static struct omap_board_config_kernel voiceblue_config[] = { | 159 | static struct omap_board_config_kernel voiceblue_config[] = { |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static void __init voiceblue_init_irq(void) | ||
163 | { | ||
164 | omap1_init_common_hw(); | ||
165 | omap1_init_irq(); | ||
166 | } | ||
167 | |||
168 | static void __init voiceblue_map_io(void) | ||
169 | { | ||
170 | omap1_map_common_io(); | ||
171 | } | ||
172 | |||
173 | #define MACHINE_PANICED 1 | 162 | #define MACHINE_PANICED 1 |
174 | #define MACHINE_REBOOTING 2 | 163 | #define MACHINE_REBOOTING 2 |
175 | #define MACHINE_REBOOT 4 | 164 | #define MACHINE_REBOOT 4 |
@@ -302,9 +291,10 @@ static void __init voiceblue_init(void) | |||
302 | MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") | 291 | MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") |
303 | /* Maintainer: Ladislav Michl <michl@2n.cz> */ | 292 | /* Maintainer: Ladislav Michl <michl@2n.cz> */ |
304 | .boot_params = 0x10000100, | 293 | .boot_params = 0x10000100, |
305 | .map_io = voiceblue_map_io, | 294 | .map_io = omap15xx_map_io, |
295 | .init_early = omap1_init_early, | ||
306 | .reserve = omap_reserve, | 296 | .reserve = omap_reserve, |
307 | .init_irq = voiceblue_init_irq, | 297 | .init_irq = omap1_init_irq, |
308 | .init_machine = voiceblue_init, | 298 | .init_machine = voiceblue_init, |
309 | .timer = &omap1_timer, | 299 | .timer = &omap1_timer, |
310 | MACHINE_END | 300 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index 870886a29594..a16aab71922c 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c | |||
@@ -85,50 +85,44 @@ static struct map_desc omap16xx_io_desc[] __initdata = { | |||
85 | #endif | 85 | #endif |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * Maps common IO regions for omap1. This should only get called from | 88 | * Maps common IO regions for omap1 |
89 | * board specific init. | ||
90 | */ | 89 | */ |
91 | void __init omap1_map_common_io(void) | 90 | static void __init omap1_map_common_io(void) |
92 | { | 91 | { |
93 | iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc)); | 92 | iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc)); |
94 | 93 | } | |
95 | /* Normally devicemaps_init() would flush caches and tlb after | ||
96 | * mdesc->map_io(), but we must also do it here because of the CPU | ||
97 | * revision check below. | ||
98 | */ | ||
99 | local_flush_tlb_all(); | ||
100 | flush_cache_all(); | ||
101 | |||
102 | /* We want to check CPU revision early for cpu_is_omapxxxx() macros. | ||
103 | * IO space mapping must be initialized before we can do that. | ||
104 | */ | ||
105 | omap_check_revision(); | ||
106 | 94 | ||
107 | #if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850) | 95 | #if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850) |
108 | if (cpu_is_omap7xx()) { | 96 | void __init omap7xx_map_io(void) |
109 | iotable_init(omap7xx_io_desc, ARRAY_SIZE(omap7xx_io_desc)); | 97 | { |
110 | } | 98 | omap1_map_common_io(); |
99 | iotable_init(omap7xx_io_desc, ARRAY_SIZE(omap7xx_io_desc)); | ||
100 | } | ||
111 | #endif | 101 | #endif |
102 | |||
112 | #ifdef CONFIG_ARCH_OMAP15XX | 103 | #ifdef CONFIG_ARCH_OMAP15XX |
113 | if (cpu_is_omap15xx()) { | 104 | void __init omap15xx_map_io(void) |
114 | iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc)); | 105 | { |
115 | } | 106 | omap1_map_common_io(); |
116 | #endif | 107 | iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc)); |
117 | #if defined(CONFIG_ARCH_OMAP16XX) | 108 | } |
118 | if (cpu_is_omap16xx()) { | ||
119 | iotable_init(omap16xx_io_desc, ARRAY_SIZE(omap16xx_io_desc)); | ||
120 | } | ||
121 | #endif | 109 | #endif |
122 | 110 | ||
123 | omap_sram_init(); | 111 | #if defined(CONFIG_ARCH_OMAP16XX) |
112 | void __init omap16xx_map_io(void) | ||
113 | { | ||
114 | omap1_map_common_io(); | ||
115 | iotable_init(omap16xx_io_desc, ARRAY_SIZE(omap16xx_io_desc)); | ||
124 | } | 116 | } |
117 | #endif | ||
125 | 118 | ||
126 | /* | 119 | /* |
127 | * Common low-level hardware init for omap1. This should only get called from | 120 | * Common low-level hardware init for omap1. |
128 | * board specific init. | ||
129 | */ | 121 | */ |
130 | void __init omap1_init_common_hw(void) | 122 | void omap1_init_early(void) |
131 | { | 123 | { |
124 | omap_check_revision(); | ||
125 | |||
132 | /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort | 126 | /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort |
133 | * on a Posted Write in the TIPB Bridge". | 127 | * on a Posted Write in the TIPB Bridge". |
134 | */ | 128 | */ |
@@ -138,8 +132,8 @@ void __init omap1_init_common_hw(void) | |||
138 | /* Must init clocks early to assure that timer interrupt works | 132 | /* Must init clocks early to assure that timer interrupt works |
139 | */ | 133 | */ |
140 | omap1_clk_init(); | 134 | omap1_clk_init(); |
141 | |||
142 | omap1_mux_init(); | 135 | omap1_mux_init(); |
136 | omap_sram_init(); | ||
143 | } | 137 | } |
144 | 138 | ||
145 | /* | 139 | /* |
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h index 6591875486d5..c0c785073141 100644 --- a/arch/arm/plat-omap/include/plat/io.h +++ b/arch/arm/plat-omap/include/plat/io.h | |||
@@ -256,8 +256,31 @@ extern void omap_writel(u32 v, u32 pa); | |||
256 | 256 | ||
257 | struct omap_sdrc_params; | 257 | struct omap_sdrc_params; |
258 | 258 | ||
259 | extern void omap1_map_common_io(void); | 259 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) |
260 | extern void omap1_init_common_hw(void); | 260 | void omap7xx_map_io(void); |
261 | #else | ||
262 | static inline void omap_map_io(void) | ||
263 | { | ||
264 | } | ||
265 | #endif | ||
266 | |||
267 | #ifdef CONFIG_ARCH_OMAP15XX | ||
268 | void omap15xx_map_io(void); | ||
269 | #else | ||
270 | static inline void omap15xx_map_io(void) | ||
271 | { | ||
272 | } | ||
273 | #endif | ||
274 | |||
275 | #ifdef CONFIG_ARCH_OMAP16XX | ||
276 | void omap16xx_map_io(void); | ||
277 | #else | ||
278 | static inline void omap16xx_map_io(void) | ||
279 | { | ||
280 | } | ||
281 | #endif | ||
282 | |||
283 | void omap1_init_early(void); | ||
261 | 284 | ||
262 | #ifdef CONFIG_SOC_OMAP2420 | 285 | #ifdef CONFIG_SOC_OMAP2420 |
263 | extern void omap242x_map_common_io(void); | 286 | extern void omap242x_map_common_io(void); |