diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-09-01 17:07:37 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-09-05 12:02:31 -0400 |
commit | e8a91c953fca683ef9a9335fb00d6eb3e49ac1ee (patch) | |
tree | 7a9c2ef4b9c25f137e2fb97d36e0248ee24c6ec4 /arch/arm/plat-omap/common.c | |
parent | d592dd1adc4f57171fa2570a94279d887b78d5b5 (diff) |
[ARM] omap: Fix IO_ADDRESS() macros
OMAP1_IO_ADDRESS(), OMAP2_IO_ADDRESS() and IO_ADDRESS() returns cookies
for use with __raw_{read|write}* for accessing registers. Therefore,
these macros should return (void __iomem *) cookies, not integer values.
Doing this improves typechecking, and means we can find those places
where, eg, DMA controllers are incorrectly given virtual addresses to
DMA to, or physical addresses are thrown through a virtual to physical
address translation.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-omap/common.c')
-rw-r--r-- | arch/arm/plat-omap/common.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index f4dff423ae7c..20e8db5fe32a 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
@@ -258,12 +258,12 @@ static void __init __omap2_set_globals(void) | |||
258 | #if defined(CONFIG_ARCH_OMAP2420) | 258 | #if defined(CONFIG_ARCH_OMAP2420) |
259 | 259 | ||
260 | static struct omap_globals omap242x_globals = { | 260 | static struct omap_globals omap242x_globals = { |
261 | .tap = (__force void __iomem *)OMAP2_IO_ADDRESS(0x48014000), | 261 | .tap = OMAP2_IO_ADDRESS(0x48014000), |
262 | .sdrc = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_SDRC_BASE), | 262 | .sdrc = OMAP2_IO_ADDRESS(OMAP2420_SDRC_BASE), |
263 | .sms = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_SMS_BASE), | 263 | .sms = OMAP2_IO_ADDRESS(OMAP2420_SMS_BASE), |
264 | .ctrl = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_CTRL_BASE), | 264 | .ctrl = OMAP2_IO_ADDRESS(OMAP2420_CTRL_BASE), |
265 | .prm = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_PRM_BASE), | 265 | .prm = OMAP2_IO_ADDRESS(OMAP2420_PRM_BASE), |
266 | .cm = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_CM_BASE), | 266 | .cm = OMAP2_IO_ADDRESS(OMAP2420_CM_BASE), |
267 | }; | 267 | }; |
268 | 268 | ||
269 | void __init omap2_set_globals_242x(void) | 269 | void __init omap2_set_globals_242x(void) |
@@ -276,12 +276,12 @@ void __init omap2_set_globals_242x(void) | |||
276 | #if defined(CONFIG_ARCH_OMAP2430) | 276 | #if defined(CONFIG_ARCH_OMAP2430) |
277 | 277 | ||
278 | static struct omap_globals omap243x_globals = { | 278 | static struct omap_globals omap243x_globals = { |
279 | .tap = (__force void __iomem *)OMAP2_IO_ADDRESS(0x4900a000), | 279 | .tap = OMAP2_IO_ADDRESS(0x4900a000), |
280 | .sdrc = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP243X_SDRC_BASE), | 280 | .sdrc = OMAP2_IO_ADDRESS(OMAP243X_SDRC_BASE), |
281 | .sms = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP243X_SMS_BASE), | 281 | .sms = OMAP2_IO_ADDRESS(OMAP243X_SMS_BASE), |
282 | .ctrl = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP243X_CTRL_BASE), | 282 | .ctrl = OMAP2_IO_ADDRESS(OMAP243X_CTRL_BASE), |
283 | .prm = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2430_PRM_BASE), | 283 | .prm = OMAP2_IO_ADDRESS(OMAP2430_PRM_BASE), |
284 | .cm = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2430_CM_BASE), | 284 | .cm = OMAP2_IO_ADDRESS(OMAP2430_CM_BASE), |
285 | }; | 285 | }; |
286 | 286 | ||
287 | void __init omap2_set_globals_243x(void) | 287 | void __init omap2_set_globals_243x(void) |
@@ -294,12 +294,12 @@ void __init omap2_set_globals_243x(void) | |||
294 | #if defined(CONFIG_ARCH_OMAP3430) | 294 | #if defined(CONFIG_ARCH_OMAP3430) |
295 | 295 | ||
296 | static struct omap_globals omap343x_globals = { | 296 | static struct omap_globals omap343x_globals = { |
297 | .tap = (__force void __iomem *)OMAP2_IO_ADDRESS(0x4830A000), | 297 | .tap = OMAP2_IO_ADDRESS(0x4830A000), |
298 | .sdrc = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE), | 298 | .sdrc = OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE), |
299 | .sms = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE), | 299 | .sms = OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE), |
300 | .ctrl = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE), | 300 | .ctrl = OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE), |
301 | .prm = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE), | 301 | .prm = OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE), |
302 | .cm = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP3430_CM_BASE), | 302 | .cm = OMAP2_IO_ADDRESS(OMAP3430_CM_BASE), |
303 | }; | 303 | }; |
304 | 304 | ||
305 | void __init omap2_set_globals_343x(void) | 305 | void __init omap2_set_globals_343x(void) |