mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
AMS Sansa: Replace simple write delay with a smarter check on status of MCI FIFO.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22850 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
065e8e082a
commit
37265d308b
1 changed files with 2 additions and 6 deletions
|
|
@ -735,12 +735,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);
|
||||||
|
|
||||||
/* Higher speed class cards need a write delay here for some reason */
|
/* Wait for FIFO to empty */
|
||||||
if((drive == SD_SLOT_AS3525) && write)
|
while(MCI_STATUS(drive) & (MCI_TX_ACTIVE | MCI_RX_ACTIVE));
|
||||||
{
|
|
||||||
int delay = 3500;
|
|
||||||
while(delay--) asm volatile ("nop\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!transfer_error[drive])
|
if(!transfer_error[drive])
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue