From 6fbd55d077cdf2aeb7a170ff9f5779d19506bf9e Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 12 Feb 2010 12:26:47 -0800 Subject: omap2/3/4: Fix omap2_map_common_io for multi-omap Fix omap2_map_common_io for multi-omap Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/io.c | 51 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 17 deletions(-) (limited to 'arch/arm/mach-omap2/io.c') 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 = { }; #endif -void __init omap2_map_common_io(void) +static void __init _omap2_map_common_io(void) +{ + /* Normally devicemaps_init() would flush caches and tlb after + * mdesc->map_io(), but we must also do it here because of the CPU + * revision check below. + */ + local_flush_tlb_all(); + flush_cache_all(); + + omap2_check_revision(); + omap_sram_init(); + omapfb_reserve_sdram(); + omap_vram_reserve_sdram(); +} + +#ifdef CONFIG_ARCH_OMAP2420 +void __init omap242x_map_common_io() { -#if defined(CONFIG_ARCH_OMAP2420) iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc)); + _omap2_map_common_io(); +} #endif -#if defined(CONFIG_ARCH_OMAP2430) +#ifdef CONFIG_ARCH_OMAP2430 +void __init omap243x_map_common_io() +{ iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc)); + _omap2_map_common_io(); +} #endif -#if defined(CONFIG_ARCH_OMAP34XX) +#ifdef CONFIG_ARCH_OMAP34XX +void __init omap34xx_map_common_io() +{ iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc)); + _omap2_map_common_io(); +} #endif -#if defined(CONFIG_ARCH_OMAP4) +#ifdef CONFIG_ARCH_OMAP4 +void __init omap44xx_map_common_io() +{ iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); -#endif - /* Normally devicemaps_init() would flush caches and tlb after - * mdesc->map_io(), but we must also do it here because of the CPU - * revision check below. - */ - local_flush_tlb_all(); - flush_cache_all(); - - omap2_check_revision(); - omap_sram_init(); - omapfb_reserve_sdram(); - omap_vram_reserve_sdram(); + _omap2_map_common_io(); } +#endif /* * omap2_init_reprogram_sdrc - reprogram SDRC timing parameters -- cgit v1.2.1