summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/as3525/ata_sd_as3525.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/ata_sd_as3525.c')
-rw-r--r--firmware/target/arm/as3525/ata_sd_as3525.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c
index 9d395ad084..96b10c258a 100644
--- a/firmware/target/arm/as3525/ata_sd_as3525.c
+++ b/firmware/target/arm/as3525/ata_sd_as3525.c
@@ -611,9 +611,10 @@ static int sd_select_bank(signed char bank)
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);
if (ret < 0)