diff options
author | Tony Lindgren <tony@atomide.com> | 2010-12-10 12:46:24 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-10 12:46:24 -0500 |
commit | df1e9d1c218ba696e376cad371b57c0109fe98c9 (patch) | |
tree | 76c0ec709eb544d94d9735a164592d96efd59247 /arch | |
parent | 67b738ef32df7ec429004866d2a739a3775894d2 (diff) |
omap: Split omap_read/write functions for omap1 and omap2+
Otherwise multi-omap1 support for omap1 won't work as the cpu_class_is_omap1()
won't work until the SoC is detected.
Note that eventually these will go away, please use ioremap + read/write instead.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap1/io.c | 39 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 40 | ||||
-rw-r--r-- | arch/arm/plat-omap/io.c | 58 |
3 files changed, 79 insertions, 58 deletions
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index 0ce3fec2d257..870886a29594 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c | |||
@@ -142,3 +142,42 @@ void __init omap1_init_common_hw(void) | |||
142 | omap1_mux_init(); | 142 | omap1_mux_init(); |
143 | } | 143 | } |
144 | 144 | ||
145 | /* | ||
146 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | ||
147 | */ | ||
148 | |||
149 | u8 omap_readb(u32 pa) | ||
150 | { | ||
151 | return __raw_readb(OMAP1_IO_ADDRESS(pa)); | ||
152 | } | ||
153 | EXPORT_SYMBOL(omap_readb); | ||
154 | |||
155 | u16 omap_readw(u32 pa) | ||
156 | { | ||
157 | return __raw_readw(OMAP1_IO_ADDRESS(pa)); | ||
158 | } | ||
159 | EXPORT_SYMBOL(omap_readw); | ||
160 | |||
161 | u32 omap_readl(u32 pa) | ||
162 | { | ||
163 | return __raw_readl(OMAP1_IO_ADDRESS(pa)); | ||
164 | } | ||
165 | EXPORT_SYMBOL(omap_readl); | ||
166 | |||
167 | void omap_writeb(u8 v, u32 pa) | ||
168 | { | ||
169 | __raw_writeb(v, OMAP1_IO_ADDRESS(pa)); | ||
170 | } | ||
171 | EXPORT_SYMBOL(omap_writeb); | ||
172 | |||
173 | void omap_writew(u16 v, u32 pa) | ||
174 | { | ||
175 | __raw_writew(v, OMAP1_IO_ADDRESS(pa)); | ||
176 | } | ||
177 | EXPORT_SYMBOL(omap_writew); | ||
178 | |||
179 | void omap_writel(u32 v, u32 pa) | ||
180 | { | ||
181 | __raw_writel(v, OMAP1_IO_ADDRESS(pa)); | ||
182 | } | ||
183 | EXPORT_SYMBOL(omap_writel); | ||
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 3d1834906293..9804385533e5 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -375,3 +375,43 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, | |||
375 | 375 | ||
376 | omap_irq_base_init(); | 376 | omap_irq_base_init(); |
377 | } | 377 | } |
378 | |||
379 | /* | ||
380 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | ||
381 | */ | ||
382 | |||
383 | u8 omap_readb(u32 pa) | ||
384 | { | ||
385 | return __raw_readb(OMAP2_L4_IO_ADDRESS(pa)); | ||
386 | } | ||
387 | EXPORT_SYMBOL(omap_readb); | ||
388 | |||
389 | u16 omap_readw(u32 pa) | ||
390 | { | ||
391 | return __raw_readw(OMAP2_L4_IO_ADDRESS(pa)); | ||
392 | } | ||
393 | EXPORT_SYMBOL(omap_readw); | ||
394 | |||
395 | u32 omap_readl(u32 pa) | ||
396 | { | ||
397 | return __raw_readl(OMAP2_L4_IO_ADDRESS(pa)); | ||
398 | } | ||
399 | EXPORT_SYMBOL(omap_readl); | ||
400 | |||
401 | void omap_writeb(u8 v, u32 pa) | ||
402 | { | ||
403 | __raw_writeb(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
404 | } | ||
405 | EXPORT_SYMBOL(omap_writeb); | ||
406 | |||
407 | void omap_writew(u16 v, u32 pa) | ||
408 | { | ||
409 | __raw_writew(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
410 | } | ||
411 | EXPORT_SYMBOL(omap_writew); | ||
412 | |||
413 | void omap_writel(u32 v, u32 pa) | ||
414 | { | ||
415 | __raw_writel(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
416 | } | ||
417 | EXPORT_SYMBOL(omap_writel); | ||
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c index b0078cf96281..f1295fafcd31 100644 --- a/arch/arm/plat-omap/io.c +++ b/arch/arm/plat-omap/io.c | |||
@@ -136,61 +136,3 @@ void omap_iounmap(volatile void __iomem *addr) | |||
136 | __iounmap(addr); | 136 | __iounmap(addr); |
137 | } | 137 | } |
138 | EXPORT_SYMBOL(omap_iounmap); | 138 | EXPORT_SYMBOL(omap_iounmap); |
139 | |||
140 | /* | ||
141 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | ||
142 | */ | ||
143 | |||
144 | u8 omap_readb(u32 pa) | ||
145 | { | ||
146 | if (cpu_class_is_omap1()) | ||
147 | return __raw_readb(OMAP1_IO_ADDRESS(pa)); | ||
148 | else | ||
149 | return __raw_readb(OMAP2_L4_IO_ADDRESS(pa)); | ||
150 | } | ||
151 | EXPORT_SYMBOL(omap_readb); | ||
152 | |||
153 | u16 omap_readw(u32 pa) | ||
154 | { | ||
155 | if (cpu_class_is_omap1()) | ||
156 | return __raw_readw(OMAP1_IO_ADDRESS(pa)); | ||
157 | else | ||
158 | return __raw_readw(OMAP2_L4_IO_ADDRESS(pa)); | ||
159 | } | ||
160 | EXPORT_SYMBOL(omap_readw); | ||
161 | |||
162 | u32 omap_readl(u32 pa) | ||
163 | { | ||
164 | if (cpu_class_is_omap1()) | ||
165 | return __raw_readl(OMAP1_IO_ADDRESS(pa)); | ||
166 | else | ||
167 | return __raw_readl(OMAP2_L4_IO_ADDRESS(pa)); | ||
168 | } | ||
169 | EXPORT_SYMBOL(omap_readl); | ||
170 | |||
171 | void omap_writeb(u8 v, u32 pa) | ||
172 | { | ||
173 | if (cpu_class_is_omap1()) | ||
174 | __raw_writeb(v, OMAP1_IO_ADDRESS(pa)); | ||
175 | else | ||
176 | __raw_writeb(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
177 | } | ||
178 | EXPORT_SYMBOL(omap_writeb); | ||
179 | |||
180 | void omap_writew(u16 v, u32 pa) | ||
181 | { | ||
182 | if (cpu_class_is_omap1()) | ||
183 | __raw_writew(v, OMAP1_IO_ADDRESS(pa)); | ||
184 | else | ||
185 | __raw_writew(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
186 | } | ||
187 | EXPORT_SYMBOL(omap_writew); | ||
188 | |||
189 | void omap_writel(u32 v, u32 pa) | ||
190 | { | ||
191 | if (cpu_class_is_omap1()) | ||
192 | __raw_writel(v, OMAP1_IO_ADDRESS(pa)); | ||
193 | else | ||
194 | __raw_writel(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
195 | } | ||
196 | EXPORT_SYMBOL(omap_writel); | ||