]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Clean-up omap2 low-level io init and ensure cache & tlb flushing
authorTony Lindgren <tony@atomide.com>
Thu, 5 Jan 2006 01:16:27 +0000 (17:16 -0800)
committerTony Lindgren <tony@atomide.com>
Thu, 5 Jan 2006 01:16:27 +0000 (17:16 -0800)
Clean-up omap2 low-level io init and ensure cache & tlb flushing

arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/io.c
include/asm-arm/arch-omap/io.h

index c602e7a3d93e33463699e94cbb9b26c7b7410dbe..dd2377e36a84b4397e883dff25cb8eddf5e3d4ff 100644 (file)
@@ -33,6 +33,7 @@
 
 static void __init omap_generic_init_irq(void)
 {
+       omap2_init_common_hw();
        omap_init_irq();
 }
 
@@ -64,7 +65,7 @@ static void __init omap_generic_init(void)
 
 static void __init omap_generic_map_io(void)
 {
-       omap_map_common_io();
+       omap2_map_common_io();
 }
 
 MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
index 6a5e88dd2c6bc4ba6c7e86df5177b0feaa9767a4..19b498d7002e11b6be3489439b9387f7aa1ab1fe 100644 (file)
@@ -136,6 +136,7 @@ static inline void __init h4_init_smc91x(void)
 
 static void __init omap_h4_init_irq(void)
 {
+       omap2_init_common_hw();
        omap_init_irq();
        omap_gpio_init();
        h4_init_smc91x();
@@ -181,7 +182,7 @@ static void __init omap_h4_init(void)
 
 static void __init omap_h4_map_io(void)
 {
-       omap_map_common_io();
+       omap2_map_common_io();
 }
 
 MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
index 8ea67bf196a5efd309d09760a13170003d75a20a..cfe155e750313cf72b348cb04560eb0dee25ca66 100644 (file)
 #include <linux/kernel.h>
 #include <linux/init.h>
 
-#include <asm/mach/map.h>
+#include <asm/tlb.h>
 #include <asm/io.h>
+
+#include <asm/mach/map.h>
+
 #include <asm/arch/mux.h>
 
 extern void omap_sram_init(void);
@@ -43,11 +46,23 @@ static struct map_desc omap2_io_desc[] __initdata = {
        }
 };
 
-void __init omap_map_common_io(void)
+void __init omap2_map_common_io(void)
 {
        iotable_init(omap2_io_desc, ARRAY_SIZE(omap2_io_desc));
+
+       /* 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();
+}
+
+void __init omap2_init_common_hw(void)
+{
        omap2_mux_init();
        omap2_clk_init();
 }
index 929efab5879c8278995c5e88a08033e57255c071..b726acfcab14b5a522941097a975108d1903232d 100644 (file)
@@ -119,6 +119,9 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
 extern void omap1_map_common_io(void);
 extern void omap1_init_common_hw(void);
 
+extern void omap2_map_common_io(void);
+extern void omap2_init_common_hw(void);
+
 #else
 
 #define __REG8(paddr)          io_p2v(paddr)