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:
parent
c95adecb07
commit
6edb95d050
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue