Improved timing in soft_reset. This hopefully cures spontaneous Red Led freezes.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4161 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2003-12-17 20:15:12 +00:00
parent 3cefa27e10
commit 1fe97ec54e

View file

@ -632,10 +632,10 @@ static int perform_soft_reset(void)
ATA_SELECT = SELECT_LBA | ata_device;
ATA_CONTROL = CONTROL_nIEN|CONTROL_SRST;
sleep(HZ/20000); /* >= 5us */
sleep(1); /* >= 5us */
ATA_CONTROL = CONTROL_nIEN;
sleep(HZ/400); /* >2ms */
sleep(1); /* >2ms */
/* This little sucker can take up to 30 seconds */
retry_count = 8;