Commit c588f720 authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP: Clean-up omap2 low-level io init and ensure cache & tlb flushing

Clean-up omap2 low-level io init and ensure cache & tlb flushing
parent 0f179ff9
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
static void __init omap_generic_init_irq(void) static void __init omap_generic_init_irq(void)
{ {
omap2_init_common_hw();
omap_init_irq(); omap_init_irq();
} }
...@@ -64,7 +65,7 @@ static void __init omap_generic_init(void) ...@@ -64,7 +65,7 @@ static void __init omap_generic_init(void)
static void __init omap_generic_map_io(void) static void __init omap_generic_map_io(void)
{ {
omap_map_common_io(); omap2_map_common_io();
} }
MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
......
...@@ -136,6 +136,7 @@ static inline void __init h4_init_smc91x(void) ...@@ -136,6 +136,7 @@ static inline void __init h4_init_smc91x(void)
static void __init omap_h4_init_irq(void) static void __init omap_h4_init_irq(void)
{ {
omap2_init_common_hw();
omap_init_irq(); omap_init_irq();
omap_gpio_init(); omap_gpio_init();
h4_init_smc91x(); h4_init_smc91x();
...@@ -181,7 +182,7 @@ static void __init omap_h4_init(void) ...@@ -181,7 +182,7 @@ static void __init omap_h4_init(void)
static void __init omap_h4_map_io(void) static void __init omap_h4_map_io(void)
{ {
omap_map_common_io(); omap2_map_common_io();
} }
MACHINE_START(OMAP_H4, "OMAP2420 H4 board") MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
......
...@@ -16,8 +16,11 @@ ...@@ -16,8 +16,11 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/mach/map.h> #include <asm/tlb.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/mach/map.h>
#include <asm/arch/mux.h> #include <asm/arch/mux.h>
extern void omap_sram_init(void); extern void omap_sram_init(void);
...@@ -43,11 +46,23 @@ static struct map_desc omap2_io_desc[] __initdata = { ...@@ -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)); 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(); omap2_check_revision();
omap_sram_init(); omap_sram_init();
}
void __init omap2_init_common_hw(void)
{
omap2_mux_init(); omap2_mux_init();
omap2_clk_init(); omap2_clk_init();
} }
...@@ -119,6 +119,9 @@ typedef struct { volatile u32 offset[4096]; } __regbase32; ...@@ -119,6 +119,9 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
extern void omap1_map_common_io(void); extern void omap1_map_common_io(void);
extern void omap1_init_common_hw(void); extern void omap1_init_common_hw(void);
extern void omap2_map_common_io(void);
extern void omap2_init_common_hw(void);
#else #else
#define __REG8(paddr) io_p2v(paddr) #define __REG8(paddr) io_p2v(paddr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment