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
This commit is contained in:
Jack Halpin 2010-05-05 20:04:16 +00:00
parent d48b3359fc
commit 8fd3ec9727

View file

@ -840,8 +840,6 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
goto sd_transfer_error; goto sd_transfer_error;
} }
MCI_MASK |= (MCI_DATA_ERROR | MCI_INT_DTO);
int arg = start; int arg = start;
if(!(card_info[drive].ocr & (1<<30))) /* not SDHC */ if(!(card_info[drive].ocr & (1<<30))) /* not SDHC */
arg *= SD_BLOCK_SIZE; 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, dma_enable_channel(0, MCI_FIFO, dma_buf, DMA_PERI_SD,
DMAC_FLOWCTRL_PERI_PERI_TO_MEM, false, true, 0, DMA_S8, NULL); DMAC_FLOWCTRL_PERI_PERI_TO_MEM, false, true, 0, DMA_S8, NULL);
MCI_MASK |= (MCI_DATA_ERROR | MCI_INT_DTO);
MCI_CTRL |= DMA_ENABLE; MCI_CTRL |= DMA_ENABLE;
unsigned long dummy; /* if we don't ask for a response, writing fails */ unsigned long dummy; /* if we don't ask for a response, writing fails */