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/dma.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/dma.c')
-rw-r--r-- | arch/arm/plat-omap/dma.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index a63b644ad305..b4057e271875 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -2297,13 +2297,13 @@ static int __init omap_init_dma(void) | |||
2297 | int ch, r; | 2297 | int ch, r; |
2298 | 2298 | ||
2299 | if (cpu_class_is_omap1()) { | 2299 | if (cpu_class_is_omap1()) { |
2300 | omap_dma_base = (void __iomem *)IO_ADDRESS(OMAP1_DMA_BASE); | 2300 | omap_dma_base = IO_ADDRESS(OMAP1_DMA_BASE); |
2301 | dma_lch_count = OMAP1_LOGICAL_DMA_CH_COUNT; | 2301 | dma_lch_count = OMAP1_LOGICAL_DMA_CH_COUNT; |
2302 | } else if (cpu_is_omap24xx()) { | 2302 | } else if (cpu_is_omap24xx()) { |
2303 | omap_dma_base = (void __iomem *)IO_ADDRESS(OMAP24XX_DMA4_BASE); | 2303 | omap_dma_base = IO_ADDRESS(OMAP24XX_DMA4_BASE); |
2304 | dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; | 2304 | dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; |
2305 | } else if (cpu_is_omap34xx()) { | 2305 | } else if (cpu_is_omap34xx()) { |
2306 | omap_dma_base = (void __iomem *)IO_ADDRESS(OMAP34XX_DMA4_BASE); | 2306 | omap_dma_base = IO_ADDRESS(OMAP34XX_DMA4_BASE); |
2307 | dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; | 2307 | dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; |
2308 | } else { | 2308 | } else { |
2309 | pr_err("DMA init failed for unsupported omap\n"); | 2309 | pr_err("DMA init failed for unsupported omap\n"); |