diff options
Diffstat (limited to 'arch/arm/mach-omap2/io.c')
-rw-r--r-- | arch/arm/mach-omap2/io.c | 69 |
1 files changed, 16 insertions, 53 deletions
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index fb11b44fbdec..065bd768987c 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -21,36 +21,32 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/omapfb.h> | ||
25 | 24 | ||
26 | #include <asm/tlb.h> | 25 | #include <asm/tlb.h> |
27 | |||
28 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
29 | 27 | ||
30 | #include <plat/sram.h> | 28 | #include <plat/sram.h> |
31 | #include <plat/sdrc.h> | 29 | #include <plat/sdrc.h> |
32 | #include <plat/serial.h> | 30 | #include <plat/serial.h> |
33 | |||
34 | #include "clock2xxx.h" | ||
35 | #include "clock3xxx.h" | ||
36 | #include "clock44xx.h" | ||
37 | |||
38 | #include "common.h" | ||
39 | #include <plat/omap-pm.h> | 31 | #include <plat/omap-pm.h> |
32 | #include <plat/omap_hwmod.h> | ||
33 | #include <plat/multi.h> | ||
34 | |||
35 | #include "iomap.h" | ||
40 | #include "voltage.h" | 36 | #include "voltage.h" |
41 | #include "powerdomain.h" | 37 | #include "powerdomain.h" |
42 | |||
43 | #include "clockdomain.h" | 38 | #include "clockdomain.h" |
44 | #include <plat/omap_hwmod.h> | ||
45 | #include <plat/multi.h> | ||
46 | #include "common.h" | 39 | #include "common.h" |
40 | #include "clock2xxx.h" | ||
41 | #include "clock3xxx.h" | ||
42 | #include "clock44xx.h" | ||
47 | 43 | ||
48 | /* | 44 | /* |
49 | * The machine specific code may provide the extra mapping besides the | 45 | * The machine specific code may provide the extra mapping besides the |
50 | * default mapping provided here. | 46 | * default mapping provided here. |
51 | */ | 47 | */ |
52 | 48 | ||
53 | #ifdef CONFIG_ARCH_OMAP2 | 49 | #if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430) |
54 | static struct map_desc omap24xx_io_desc[] __initdata = { | 50 | static struct map_desc omap24xx_io_desc[] __initdata = { |
55 | { | 51 | { |
56 | .virtual = L3_24XX_VIRT, | 52 | .virtual = L3_24XX_VIRT, |
@@ -352,7 +348,6 @@ static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data) | |||
352 | 348 | ||
353 | static void __init omap_common_init_early(void) | 349 | static void __init omap_common_init_early(void) |
354 | { | 350 | { |
355 | omap2_check_revision(); | ||
356 | omap_init_consistent_dma_size(); | 351 | omap_init_consistent_dma_size(); |
357 | } | 352 | } |
358 | 353 | ||
@@ -393,6 +388,7 @@ static void __init omap_hwmod_init_postsetup(void) | |||
393 | void __init omap2420_init_early(void) | 388 | void __init omap2420_init_early(void) |
394 | { | 389 | { |
395 | omap2_set_globals_242x(); | 390 | omap2_set_globals_242x(); |
391 | omap2xxx_check_revision(); | ||
396 | omap_common_init_early(); | 392 | omap_common_init_early(); |
397 | omap2xxx_voltagedomains_init(); | 393 | omap2xxx_voltagedomains_init(); |
398 | omap242x_powerdomains_init(); | 394 | omap242x_powerdomains_init(); |
@@ -407,6 +403,7 @@ void __init omap2420_init_early(void) | |||
407 | void __init omap2430_init_early(void) | 403 | void __init omap2430_init_early(void) |
408 | { | 404 | { |
409 | omap2_set_globals_243x(); | 405 | omap2_set_globals_243x(); |
406 | omap2xxx_check_revision(); | ||
410 | omap_common_init_early(); | 407 | omap_common_init_early(); |
411 | omap2xxx_voltagedomains_init(); | 408 | omap2xxx_voltagedomains_init(); |
412 | omap243x_powerdomains_init(); | 409 | omap243x_powerdomains_init(); |
@@ -425,6 +422,8 @@ void __init omap2430_init_early(void) | |||
425 | void __init omap3_init_early(void) | 422 | void __init omap3_init_early(void) |
426 | { | 423 | { |
427 | omap2_set_globals_3xxx(); | 424 | omap2_set_globals_3xxx(); |
425 | omap3xxx_check_revision(); | ||
426 | omap3xxx_check_features(); | ||
428 | omap_common_init_early(); | 427 | omap_common_init_early(); |
429 | omap3xxx_voltagedomains_init(); | 428 | omap3xxx_voltagedomains_init(); |
430 | omap3xxx_powerdomains_init(); | 429 | omap3xxx_powerdomains_init(); |
@@ -457,6 +456,8 @@ void __init am35xx_init_early(void) | |||
457 | void __init ti81xx_init_early(void) | 456 | void __init ti81xx_init_early(void) |
458 | { | 457 | { |
459 | omap2_set_globals_ti81xx(); | 458 | omap2_set_globals_ti81xx(); |
459 | omap3xxx_check_revision(); | ||
460 | ti81xx_check_features(); | ||
460 | omap_common_init_early(); | 461 | omap_common_init_early(); |
461 | omap3xxx_voltagedomains_init(); | 462 | omap3xxx_voltagedomains_init(); |
462 | omap3xxx_powerdomains_init(); | 463 | omap3xxx_powerdomains_init(); |
@@ -471,6 +472,8 @@ void __init ti81xx_init_early(void) | |||
471 | void __init omap4430_init_early(void) | 472 | void __init omap4430_init_early(void) |
472 | { | 473 | { |
473 | omap2_set_globals_443x(); | 474 | omap2_set_globals_443x(); |
475 | omap4xxx_check_revision(); | ||
476 | omap4xxx_check_features(); | ||
474 | omap_common_init_early(); | 477 | omap_common_init_early(); |
475 | omap44xx_voltagedomains_init(); | 478 | omap44xx_voltagedomains_init(); |
476 | omap44xx_powerdomains_init(); | 479 | omap44xx_powerdomains_init(); |
@@ -491,43 +494,3 @@ void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | |||
491 | _omap2_init_reprogram_sdrc(); | 494 | _omap2_init_reprogram_sdrc(); |
492 | } | 495 | } |
493 | } | 496 | } |
494 | |||
495 | /* | ||
496 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | ||
497 | */ | ||
498 | |||
499 | u8 omap_readb(u32 pa) | ||
500 | { | ||
501 | return __raw_readb(OMAP2_L4_IO_ADDRESS(pa)); | ||
502 | } | ||
503 | EXPORT_SYMBOL(omap_readb); | ||
504 | |||
505 | u16 omap_readw(u32 pa) | ||
506 | { | ||
507 | return __raw_readw(OMAP2_L4_IO_ADDRESS(pa)); | ||
508 | } | ||
509 | EXPORT_SYMBOL(omap_readw); | ||
510 | |||
511 | u32 omap_readl(u32 pa) | ||
512 | { | ||
513 | return __raw_readl(OMAP2_L4_IO_ADDRESS(pa)); | ||
514 | } | ||
515 | EXPORT_SYMBOL(omap_readl); | ||
516 | |||
517 | void omap_writeb(u8 v, u32 pa) | ||
518 | { | ||
519 | __raw_writeb(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
520 | } | ||
521 | EXPORT_SYMBOL(omap_writeb); | ||
522 | |||
523 | void omap_writew(u16 v, u32 pa) | ||
524 | { | ||
525 | __raw_writew(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
526 | } | ||
527 | EXPORT_SYMBOL(omap_writew); | ||
528 | |||
529 | void omap_writel(u32 v, u32 pa) | ||
530 | { | ||
531 | __raw_writel(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
532 | } | ||
533 | EXPORT_SYMBOL(omap_writel); | ||