aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1/io.c')
-rw-r--r--arch/arm/mach-omap1/io.c59
1 files changed, 26 insertions, 33 deletions
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index 1cfa1b6bb62b..7969cfda4454 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -21,7 +21,6 @@
21#include "clock.h" 21#include "clock.h"
22 22
23extern void omap_check_revision(void); 23extern void omap_check_revision(void);
24extern void omap_sram_init(void);
25 24
26/* 25/*
27 * The machine specific code may provide the extra mapping besides the 26 * The machine specific code may provide the extra mapping besides the
@@ -85,51 +84,45 @@ static struct map_desc omap16xx_io_desc[] __initdata = {
85#endif 84#endif
86 85
87/* 86/*
88 * Maps common IO regions for omap1. This should only get called from 87 * Maps common IO regions for omap1
89 * board specific init.
90 */ 88 */
91void __init omap1_map_common_io(void) 89static void __init omap1_map_common_io(void)
92{ 90{
93 iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc)); 91 iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc));
94 92}
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 */
105 omap_check_revision();
106 93
107#if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850) 94#if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
108 if (cpu_is_omap7xx()) { 95void __init omap7xx_map_io(void)
109 iotable_init(omap7xx_io_desc, ARRAY_SIZE(omap7xx_io_desc)); 96{
110 } 97 omap1_map_common_io();
98 iotable_init(omap7xx_io_desc, ARRAY_SIZE(omap7xx_io_desc));
99}
111#endif 100#endif
101
112#ifdef CONFIG_ARCH_OMAP15XX 102#ifdef CONFIG_ARCH_OMAP15XX
113 if (cpu_is_omap15xx()) { 103void __init omap15xx_map_io(void)
114 iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc)); 104{
115 } 105 omap1_map_common_io();
116#endif 106 iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
117#if defined(CONFIG_ARCH_OMAP16XX) 107}
118 if (cpu_is_omap16xx()) {
119 iotable_init(omap16xx_io_desc, ARRAY_SIZE(omap16xx_io_desc));
120 }
121#endif 108#endif
122 109
123 omap_sram_init(); 110#if defined(CONFIG_ARCH_OMAP16XX)
124 omap_init_consistent_dma_size(); 111void __init omap16xx_map_io(void)
112{
113 omap1_map_common_io();
114 iotable_init(omap16xx_io_desc, ARRAY_SIZE(omap16xx_io_desc));
125} 115}
116#endif
126 117
127/* 118/*
128 * Common low-level hardware init for omap1. This should only get called from 119 * Common low-level hardware init for omap1.
129 * board specific init.
130 */ 120 */
131void __init omap1_init_common_hw(void) 121void omap1_init_early(void)
132{ 122{
123 omap_check_revision();
124 omap_ioremap_init();
125
133 /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort 126 /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
134 * on a Posted Write in the TIPB Bridge". 127 * on a Posted Write in the TIPB Bridge".
135 */ 128 */
@@ -139,8 +132,8 @@ void __init omap1_init_common_hw(void)
139 /* Must init clocks early to assure that timer interrupt works 132 /* Must init clocks early to assure that timer interrupt works
140 */ 133 */
141 omap1_clk_init(); 134 omap1_clk_init();
142
143 omap1_mux_init(); 135 omap1_mux_init();
136 omap_init_consistent_dma_size();
144} 137}
145 138
146/* 139/*