From 6edb95d0509afc2bd66b2cb1b3feee5e363c3d62 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Tue, 6 May 2008 10:02:46 +0000 Subject: 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 --- firmware/target/arm/imx31/gigabeat-s/ata-imx31.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/target/arm/imx31/gigabeat-s/ata-imx31.c b/firmware/target/arm/imx31/gigabeat-s/ata-imx31.c index 92cc048d57..9c3c72e2c5 100644 --- a/firmware/target/arm/imx31/gigabeat-s/ata-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/ata-imx31.c @@ -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; -- cgit v1.2.3