From f5b59cdf5e6974ea2b23babfc7aa326df6f8a49e Mon Sep 17 00:00:00 2001 From: Jack Halpin Date: Mon, 23 Nov 2009 19:44:13 +0000 Subject: AMS Sansa: dma-pl081.c: dma_enable_channel() Add step to clear pending interrupts from the previous operation. Add comments and make construction of the CH_CONTROL and CH_CONFIGURATION registers easier to follow. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23725 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/dma-pl081.c | 66 ++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 30 deletions(-) (limited to 'firmware/target/arm/as3525/dma-pl081.c') diff --git a/firmware/target/arm/as3525/dma-pl081.c b/firmware/target/arm/as3525/dma-pl081.c index 52fd90f940..5bde46565b 100644 --- a/firmware/target/arm/as3525/dma-pl081.c +++ b/firmware/target/arm/as3525/dma-pl081.c @@ -63,41 +63,47 @@ void dma_enable_channel(int channel, void *src, void *dst, int peri, { dma_callback[channel] = callback; - int control = 0; + /* Clear any pending interrupts leftover from previous operation */ + DMAC_INT_TC_CLEAR = (1<