diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-12-19 09:27:41 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-12-19 09:27:41 +0000 |
commit | 28fd4b7228620f915dd837d401abaab8c353e89c (patch) | |
tree | 4780a2f9148990e67980a3267cc0ed53acd778a2 /firmware/drivers/ata.c | |
parent | 3bceded79373a43ee75487a5bd037723c92e089b (diff) | |
download | rockbox-28fd4b7228620f915dd837d401abaab8c353e89c.tar.gz rockbox-28fd4b7228620f915dd837d401abaab8c353e89c.zip |
Archos: Moved the ata_address_detect() code into ata_device_init(), removing the associated #ifdef and some public #defines. Saves a tiny bit of code as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11812 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r-- | firmware/drivers/ata.c | 8 |
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); |