From 8fd3ec97271001d0b50d4404f5891c9a4e77d960 Mon Sep 17 00:00:00 2001 From: Jack Halpin Date: Wed, 5 May 2010 20:04:16 +0000 Subject: [PATCH] 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 --- firmware/target/arm/as3525/sd-as3525v2.c | 3 +-- 1 file changed, 1 insertion(+), 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 */