summaryrefslogtreecommitdiff
path: root/firmware/drivers/ata.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r--firmware/drivers/ata.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 5e69b36f2d..800bd1a31a 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -909,6 +909,7 @@ int ata_init(void)
909{ 909{
910 int rc; 910 int rc;
911 bool coldstart = ata_is_coldstart(); 911 bool coldstart = ata_is_coldstart();
912 /* must be called before ata_device_init() */
912 913
913 mutex_init(&ata_mtx); 914 mutex_init(&ata_mtx);
914 915
@@ -924,13 +925,10 @@ int ata_init(void)
924 sleep(HZ); /* allow voltage to build up */ 925 sleep(HZ); /* allow voltage to build up */
925 } 926 }
926 927
927#ifdef ATA_ADDRESS_DETECT
928 ata_address_detect();
929#endif
930 /* first try, hard reset at cold start only */ 928 /* first try, hard reset at cold start only */
931 rc = init_and_check(coldstart); 929 rc = init_and_check(coldstart);
932 930
933 if (rc) 931 if (rc)
934 { /* failed? -> second try, always with hard reset */ 932 { /* failed? -> second try, always with hard reset */
935 DEBUGF("ata: init failed, retrying...\n"); 933 DEBUGF("ata: init failed, retrying...\n");
936 rc = init_and_check(true); 934 rc = init_and_check(true);