mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
AMS Sansa: Replace another simple delay with a more intelligent MCI FIFO status check.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22864 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
29c06f6c63
commit
1c36835b80
1 changed files with 3 additions and 2 deletions
|
|
@ -611,9 +611,10 @@ static int sd_select_bank(signed char bank)
|
||||||
|
|
||||||
wakeup_wait(&transfer_completion_signal, TIMEOUT_BLOCK);
|
wakeup_wait(&transfer_completion_signal, TIMEOUT_BLOCK);
|
||||||
|
|
||||||
dma_release();
|
/* Wait for FIFO to empty */
|
||||||
|
while(MCI_STATUS(INTERNAL_AS3525) & (MCI_TX_ACTIVE | MCI_RX_ACTIVE));
|
||||||
|
|
||||||
mci_delay();
|
dma_release();
|
||||||
|
|
||||||
ret = sd_wait_for_state(INTERNAL_AS3525, SD_TRAN);
|
ret = sd_wait_for_state(INTERNAL_AS3525, SD_TRAN);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue