diff options
author | Tony Lindgren <tony@atomide.com> | 2006-02-08 17:06:45 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-02-08 17:06:45 -0500 |
commit | 53d9cc7395c8dbe8d7fd6f9acd6578b236d14a0f (patch) | |
tree | 5ff13b4064bfee3b5149aa49c806d5db36e5e7f4 /arch/arm/mach-omap1/io.c | |
parent | 083d06edfda28fdee41ac46dc57ad4949927acd9 (diff) |
[ARM] 3279/1: OMAP: 1/3 Fix low-level io init
Patch from Tony Lindgren
This patch adds the missing cache flushes to common low-level
init that are needed to access the IO region. These flushes
are normally done at the end of devicemaps_init(), but we
need to detect the OMAP core type early.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap1/io.c')
-rw-r--r-- | arch/arm/mach-omap1/io.c | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index a7a19f75b9e1..82d556be79c5 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | 15 | ||
16 | #include <asm/tlb.h> | ||
16 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
18 | #include <asm/arch/mux.h> | 19 | #include <asm/arch/mux.h> |
@@ -83,15 +84,24 @@ static struct map_desc omap16xx_io_desc[] __initdata = { | |||
83 | }; | 84 | }; |
84 | #endif | 85 | #endif |
85 | 86 | ||
86 | static int initialized = 0; | 87 | /* |
87 | 88 | * Maps common IO regions for omap1. This should only get called from | |
88 | static void __init _omap_map_io(void) | 89 | * board specific init. |
90 | */ | ||
91 | void __init omap1_map_common_io(void) | ||
89 | { | 92 | { |
90 | initialized = 1; | ||
91 | |||
92 | /* We have to initialize the IO space mapping before we can run | ||
93 | * cpu_is_omapxxx() macros. */ | ||
94 | iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc)); | 93 | iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc)); |
94 | |||
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 | */ | ||
95 | omap_check_revision(); | 105 | omap_check_revision(); |
96 | 106 | ||
97 | #ifdef CONFIG_ARCH_OMAP730 | 107 | #ifdef CONFIG_ARCH_OMAP730 |
@@ -111,7 +121,14 @@ static void __init _omap_map_io(void) | |||
111 | #endif | 121 | #endif |
112 | 122 | ||
113 | omap_sram_init(); | 123 | omap_sram_init(); |
124 | } | ||
114 | 125 | ||
126 | /* | ||
127 | * Common low-level hardware init for omap1. This should only get called from | ||
128 | * board specific init. | ||
129 | */ | ||
130 | void __init omap1_init_common_hw() | ||
131 | { | ||
115 | /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort | 132 | /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort |
116 | * on a Posted Write in the TIPB Bridge". | 133 | * on a Posted Write in the TIPB Bridge". |
117 | */ | 134 | */ |
@@ -121,16 +138,7 @@ static void __init _omap_map_io(void) | |||
121 | /* Must init clocks early to assure that timer interrupt works | 138 | /* Must init clocks early to assure that timer interrupt works |
122 | */ | 139 | */ |
123 | omap1_clk_init(); | 140 | omap1_clk_init(); |
124 | } | ||
125 | 141 | ||
126 | /* | 142 | omap1_mux_init(); |
127 | * This should only get called from board specific init | ||
128 | */ | ||
129 | void __init omap_map_common_io(void) | ||
130 | { | ||
131 | if (!initialized) { | ||
132 | _omap_map_io(); | ||
133 | omap1_mux_init(); | ||
134 | } | ||
135 | } | 143 | } |
136 | 144 | ||