summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-04-30 12:54:05 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-04-30 12:54:05 +0000
commita05bb26233c368d7670bc150f3a0597fe91501f2 (patch)
tree4307047aba216cffab04a51a14237826b2b2548f /firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c
parent0987a6be89bb369aa6cfa9befce7af8667fa4d2c (diff)
Gigabeat F/X: Correct the yielding in the ATA. Dump the unneeded DMA transfer complete interrupt in there too. Clean it out.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13293 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c')
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c
index 34fbc2b2ac..2f28124edf 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c
@@ -20,6 +20,7 @@
#include "cpu.h"
#include <stdbool.h>
#include "kernel.h"
+#include "thread.h"
#include "system.h"
#include "power.h"
#include "panic.h"
@@ -117,27 +118,20 @@ void copy_read_sectors(unsigned char* buf, int wordcount)
DIDST0 += 0x30000000;
DIDSTC0 = 0;
- /* DACK/DREQ Sync to AHB, Int on Transfer complete, Whole service, No reload, 16-bit transfers */
- DCON0 = ((1 << 30) | (1<< 29) | (1<<27) | (1<<22) | (1<<20)) | wordcount;
+ /* DACK/DREQ Sync to AHB, Whole service, No reload, 16-bit transfers */
+ DCON0 = ((1 << 30) | (1<<27) | (1<<22) | (1<<20)) | wordcount;
/* Activate the channel */
DMASKTRIG0 = 0x2;
invalidate_dcache_range((void *)buf, wordcount*2);
- INTMSK &= ~(1<<17); /* unmask the interrupt */
- SRCPND = (1<<17); /* clear any pending interrupts */
/* Start DMA */
DMASKTRIG0 |= 0x1;
/* Wait for transfer to complete */
while((DSTAT0 & 0x000fffff))
- yield();
+ priority_yield();
/* Dump cache for the buffer */
}
#endif
-void dma0(void)
-{
-}
-
-