Commit 63168d27 authored by Ben Dooks's avatar Ben Dooks Committed by Russell King

[ARM PATCH] 2408/1: S3C2410 - dma get position call

Patch from Ben Dooks

Add call to find out the current source and destination
of the given dma channel

Signed-off-by: Ben Dooks
Signed-off-by: Russell King
parent 79d08efa
...@@ -1063,6 +1063,29 @@ int s3c2410_dma_devconfig(int channel, ...@@ -1063,6 +1063,29 @@ int s3c2410_dma_devconfig(int channel,
EXPORT_SYMBOL(s3c2410_dma_devconfig); EXPORT_SYMBOL(s3c2410_dma_devconfig);
/* s3c2410_dma_getposition
*
* returns the current transfer points for the dma source and destination
*/
int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst)
{
s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
check_channel(channel);
if (src != NULL)
*src = dma_rdreg(chan, S3C2410_DMA_DCSRC);
if (dst != NULL)
*dst = dma_rdreg(chan, S3C2410_DMA_DCDST);
return 0;
}
EXPORT_SYMBOL(s3c2410_dma_getposition);
/* system device class */ /* system device class */
#ifdef CONFIG_PM #ifdef CONFIG_PM
......
...@@ -285,6 +285,14 @@ extern int s3c2410_dma_config(dmach_t channel, int xferunit, int dcon); ...@@ -285,6 +285,14 @@ extern int s3c2410_dma_config(dmach_t channel, int xferunit, int dcon);
extern int s3c2410_dma_devconfig(int channel, s3c2410_dmasrc_t source, extern int s3c2410_dma_devconfig(int channel, s3c2410_dmasrc_t source,
int hwcfg, unsigned long devaddr); int hwcfg, unsigned long devaddr);
/* s3c2410_dma_getposition
*
* get the position that the dma transfer is currently at
*/
extern int s3c2410_dma_getposition(dmach_t channel,
dma_addr_t *src, dma_addr_t *dest);
extern int s3c2410_dma_set_opfn(dmach_t, s3c2410_dma_opfn_t rtn); extern int s3c2410_dma_set_opfn(dmach_t, s3c2410_dma_opfn_t rtn);
extern int s3c2410_dma_set_buffdone_fn(dmach_t, s3c2410_dma_cbfn_t rtn); extern int s3c2410_dma_set_buffdone_fn(dmach_t, s3c2410_dma_cbfn_t rtn);
......
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