From: Daniel Petrini Date: Wed, 27 Jul 2005 10:59:02 +0000 (-0700) Subject: [PATCH] ARM: OMAP: Change return from address to content in dma.c X-Git-Tag: v2.6.13-omap1~51 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=67ba03e4dcc1cf8c5a10b1722db15caff37b6f7a;p=linux-2.6-omap-h63xx.git [PATCH] ARM: OMAP: Change return from address to content in dma.c The following patch changes the return value from functions : - omap_get_dma_src_pos - omap_get_dma_dst_pos in file dma.c. The original version of the functions returns the address of the registers that has the related information. The new version returns the content of the registers: the source and destination addresses of the current transfer for the given channel. --- diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 3f99d0a6f09..08a7943a1b6 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -965,8 +965,8 @@ void omap_clear_dma(int lch) */ dma_addr_t omap_get_dma_src_pos(int lch) { - return (dma_addr_t) (OMAP_DMA_CSSA_L(lch) | - (OMAP_DMA_CSSA_U(lch) << 16)); + return (dma_addr_t) (omap_readw(OMAP_DMA_CSSA_L(lch)) | + (omap_readw(OMAP_DMA_CSSA_U(lch)) << 16)); } /* @@ -979,8 +979,8 @@ dma_addr_t omap_get_dma_src_pos(int lch) */ dma_addr_t omap_get_dma_dst_pos(int lch) { - return (dma_addr_t) (OMAP_DMA_CDSA_L(lch) | - (OMAP_DMA_CDSA_U(lch) << 16)); + return (dma_addr_t) (omap_readw(OMAP_DMA_CDSA_L(lch)) | + (omap_readw(OMAP_DMA_CDSA_U(lch)) << 16)); } int omap_dma_running(void)