Gigabeat S: Make sure ATA interface is idle before a reset.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17396 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2008-05-06 10:02:46 +00:00
parent c95adecb07
commit 6edb95d050

View file

@ -106,6 +106,9 @@ void ata_set_pio_timings(int mode)
void ata_reset(void)
{
/* Be sure we're not busy */
while (!(ATA_INTERRUPT_PENDING & ATA_CONTROLLER_IDLE));
ATA_INTF_CONTROL &= ~ATA_ATA_RST;
sleep(1);
ATA_INTF_CONTROL |= ATA_ATA_RST;