Commit 67ba03e4 authored by Daniel Petrini's avatar Daniel Petrini Committed by Tony Lindgren

[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.
parent 5faf49c0
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment