[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>
This commit is contained in:
committed by
Russell King
parent
d592dd1adc
commit
e8a91c953f
@ -2297,13 +2297,13 @@ static int __init omap_init_dma(void)
|
||||
int ch, r;
|
||||
|
||||
if (cpu_class_is_omap1()) {
|
||||
omap_dma_base = (void __iomem *)IO_ADDRESS(OMAP1_DMA_BASE);
|
||||
omap_dma_base = IO_ADDRESS(OMAP1_DMA_BASE);
|
||||
dma_lch_count = OMAP1_LOGICAL_DMA_CH_COUNT;
|
||||
} else if (cpu_is_omap24xx()) {
|
||||
omap_dma_base = (void __iomem *)IO_ADDRESS(OMAP24XX_DMA4_BASE);
|
||||
omap_dma_base = IO_ADDRESS(OMAP24XX_DMA4_BASE);
|
||||
dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT;
|
||||
} else if (cpu_is_omap34xx()) {
|
||||
omap_dma_base = (void __iomem *)IO_ADDRESS(OMAP34XX_DMA4_BASE);
|
||||
omap_dma_base = IO_ADDRESS(OMAP34XX_DMA4_BASE);
|
||||
dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT;
|
||||
} else {
|
||||
pr_err("DMA init failed for unsupported omap\n");
|
||||
|
Reference in New Issue
Block a user