diff options
author | Tony Lindgren <tony@atomide.com> | 2009-08-28 13:50:33 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-08-28 13:50:33 -0400 |
commit | 941132606c7611246d2034cb7b01f9270c2d1ede (patch) | |
tree | e53a618c4e98d3716551afa2e6cfae2be81056a0 /arch/arm/plat-omap/io.c | |
parent | 326ba5010a5429a5a528b268b36a5900d4ab0eba (diff) |
OMAP: Remove OMAP_IO_ADDRESS, use OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS instead
Search and replace OMAP_IO_ADDRESS with OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS,
and convert omap_read/write into a functions instead of a macros.
Also rename OMAP_MPUIO_VBASE to OMAP1_MPUIO_VBASE.
In the long run, most code should use ioremap + __raw_read/write instead.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/io.c')
-rw-r--r-- | arch/arm/plat-omap/io.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c index 9b42d72d96cf..d491ad15f198 100644 --- a/arch/arm/plat-omap/io.c +++ b/arch/arm/plat-omap/io.c | |||
@@ -132,3 +132,61 @@ void omap_iounmap(volatile void __iomem *addr) | |||
132 | __iounmap(addr); | 132 | __iounmap(addr); |
133 | } | 133 | } |
134 | EXPORT_SYMBOL(omap_iounmap); | 134 | EXPORT_SYMBOL(omap_iounmap); |
135 | |||
136 | /* | ||
137 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | ||
138 | */ | ||
139 | |||
140 | u8 omap_readb(u32 pa) | ||
141 | { | ||
142 | if (cpu_class_is_omap1()) | ||
143 | return __raw_readb(OMAP1_IO_ADDRESS(pa)); | ||
144 | else | ||
145 | return __raw_readb(OMAP2_IO_ADDRESS(pa)); | ||
146 | } | ||
147 | EXPORT_SYMBOL(omap_readb); | ||
148 | |||
149 | u16 omap_readw(u32 pa) | ||
150 | { | ||
151 | if (cpu_class_is_omap1()) | ||
152 | return __raw_readw(OMAP1_IO_ADDRESS(pa)); | ||
153 | else | ||
154 | return __raw_readw(OMAP2_IO_ADDRESS(pa)); | ||
155 | } | ||
156 | EXPORT_SYMBOL(omap_readw); | ||
157 | |||
158 | u32 omap_readl(u32 pa) | ||
159 | { | ||
160 | if (cpu_class_is_omap1()) | ||
161 | return __raw_readl(OMAP1_IO_ADDRESS(pa)); | ||
162 | else | ||
163 | return __raw_readl(OMAP2_IO_ADDRESS(pa)); | ||
164 | } | ||
165 | EXPORT_SYMBOL(omap_readl); | ||
166 | |||
167 | void omap_writeb(u8 v, u32 pa) | ||
168 | { | ||
169 | if (cpu_class_is_omap1()) | ||
170 | __raw_writeb(v, OMAP1_IO_ADDRESS(pa)); | ||
171 | else | ||
172 | __raw_writeb(v, OMAP2_IO_ADDRESS(pa)); | ||
173 | } | ||
174 | EXPORT_SYMBOL(omap_writeb); | ||
175 | |||
176 | void omap_writew(u16 v, u32 pa) | ||
177 | { | ||
178 | if (cpu_class_is_omap1()) | ||
179 | __raw_writew(v, OMAP1_IO_ADDRESS(pa)); | ||
180 | else | ||
181 | __raw_writew(v, OMAP2_IO_ADDRESS(pa)); | ||
182 | } | ||
183 | EXPORT_SYMBOL(omap_writew); | ||
184 | |||
185 | void omap_writel(u32 v, u32 pa) | ||
186 | { | ||
187 | if (cpu_class_is_omap1()) | ||
188 | __raw_writel(v, OMAP1_IO_ADDRESS(pa)); | ||
189 | else | ||
190 | __raw_writel(v, OMAP2_IO_ADDRESS(pa)); | ||
191 | } | ||
192 | EXPORT_SYMBOL(omap_writel); | ||