summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Halpin <jack.halpin@gmail.com>2010-05-05 20:04:16 +0000
committerJack Halpin <jack.halpin@gmail.com>2010-05-05 20:04:16 +0000
commit8fd3ec97271001d0b50d4404f5891c9a4e77d960 (patch)
tree31cb2153337667165ee2d8160f98c458175bef86
parentd48b3359fc9ab6e2bd39381f9618aa61f7b1d9df (diff)
downloadrockbox-8fd3ec97271001d0b50d4404f5891c9a4e77d960.tar.gz
rockbox-8fd3ec97271001d0b50d4404f5891c9a4e77d960.tar.bz2
rockbox-8fd3ec97271001d0b50d4404f5891c9a4e77d960.zip
sd-as3525v2.c: Set MCI interrupt mask immediately prior to enabling DMA for the transfer.
These INT's shouldn't be unmasked until the transfer is just about to happen. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25836 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index 754b6fa5e2..aae5e706ae 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -840,8 +840,6 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
goto sd_transfer_error;
}
- MCI_MASK |= (MCI_DATA_ERROR | MCI_INT_DTO);
-
int arg = start;
if(!(card_info[drive].ocr & (1<<30))) /* not SDHC */
arg *= SD_BLOCK_SIZE;
@@ -853,6 +851,7 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
dma_enable_channel(0, MCI_FIFO, dma_buf, DMA_PERI_SD,
DMAC_FLOWCTRL_PERI_PERI_TO_MEM, false, true, 0, DMA_S8, NULL);
+ MCI_MASK |= (MCI_DATA_ERROR | MCI_INT_DTO);
MCI_CTRL |= DMA_ENABLE;
unsigned long dummy; /* if we don't ask for a response, writing fails */