]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ARM: OMAP: Change return from address to content in dma.c
authorDaniel Petrini <d.pensator@gmail.com>
Wed, 27 Jul 2005 10:59:02 +0000 (03:59 -0700)
committerTony Lindgren <tony@atomide.com>
Wed, 27 Jul 2005 10:59:02 +0000 (03:59 -0700)
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.

arch/arm/plat-omap/dma.c

index 3f99d0a6f0927a6b053c79da0c06ccb7fe25a51f..08a7943a1b6a73aeef3af47db65245d14dd643e3 100644 (file)
@@ -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)