1
0
Fork 0
forked from len0rd/rockbox

AMS Sansa: Remove MCI_RX_ACTIVE FIFO check following SD transfers.

We don't need to check the FIFO for MCI_RX_ACTIVE because we don't experience problems reading from the SD cards.
We need the MCI_TX_ACTIVE FIFO check during writes because some SD cards spend longer times in the PRG state
programming the data that has been written to them.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23733 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jack Halpin 2009-11-24 06:37:36 +00:00
parent 9e9db20357
commit 4314ceb73b

View file

@ -615,8 +615,8 @@ static int sd_select_bank(signed char bank)
wakeup_wait(&transfer_completion_signal, TIMEOUT_BLOCK); wakeup_wait(&transfer_completion_signal, TIMEOUT_BLOCK);
/* Wait for FIFO to empty */ /* Wait for FIFO to empty, card may still be in PRG state */
while(MCI_STATUS(INTERNAL_AS3525) & (MCI_TX_ACTIVE | MCI_RX_ACTIVE)); while(MCI_STATUS(INTERNAL_AS3525) & MCI_TX_ACTIVE );
dma_release(); dma_release();
@ -737,8 +737,8 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
wakeup_wait(&transfer_completion_signal, TIMEOUT_BLOCK); wakeup_wait(&transfer_completion_signal, TIMEOUT_BLOCK);
/* Wait for FIFO to empty */ /* Wait for FIFO to empty, card may still be in PRG state for writes */
while(MCI_STATUS(drive) & (MCI_TX_ACTIVE | MCI_RX_ACTIVE)); while(MCI_STATUS(drive) & MCI_TX_ACTIVE);
if(!transfer_error[drive]) if(!transfer_error[drive])
{ {