summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authornialv7 <nialv7@gmail.com>2014-09-17 23:10:31 -0400
committerMarcin Bukat <marcin.bukat@gmail.com>2014-10-02 12:59:25 +0200
commit4a396ac1edcbb3140de5da207bb97d24ba6acbf5 (patch)
tree5e14a0260db8381ba45180e3d08faaaab679101c /firmware
parentf5e2c25cb8e12df34b5c90adc93206d3fe8e31ba (diff)
ipod6g, ata: Fix audio drop off while waiting for ata not busy
Change-Id: Id8fe39593fe3e6c5f0801bfa47ee1e04f7e7045f Reviewed-on: http://gerrit.rockbox.org/970 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com> Tested: Nial Shui <nialv7@gmail.com>
Diffstat (limited to 'firmware')
-rwxr-xr-xfirmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c b/firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c
index 955a33a595..38f9758c14 100755
--- a/firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c
+++ b/firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c
@@ -131,6 +131,7 @@ static int ata_wait_for_not_bsy(long timeout)
uint8_t csd = ata_read_cbr(&ATA_PIO_CSD);
if (!(csd & BIT(7))) return 0;
if (TIMEOUT_EXPIRED(startusec, timeout)) RET_ERR(0);
+ yield();
}
}
@@ -143,6 +144,7 @@ static int ata_wait_for_rdy(long timeout)
uint8_t dad = ata_read_cbr(&ATA_PIO_DAD);
if (dad & BIT(6)) return 0;
if (TIMEOUT_EXPIRED(startusec, timeout)) RET_ERR(1);
+ yield();
}
}
@@ -156,6 +158,7 @@ static int ata_wait_for_start_of_transfer(long timeout)
if (dad & BIT(0)) RET_ERR(1);
if ((dad & (BIT(7) | BIT(3))) == BIT(3)) return 0;
if (TIMEOUT_EXPIRED(startusec, timeout)) RET_ERR(2);
+ yield();
}
}