From 28fd4b7228620f915dd837d401abaab8c353e89c Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Tue, 19 Dec 2006 09:27:41 +0000 Subject: 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 --- firmware/drivers/ata.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'firmware/drivers/ata.c') 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) { int rc; bool coldstart = ata_is_coldstart(); + /* must be called before ata_device_init() */ mutex_init(&ata_mtx); @@ -924,13 +925,10 @@ int ata_init(void) sleep(HZ); /* allow voltage to build up */ } -#ifdef ATA_ADDRESS_DETECT - ata_address_detect(); -#endif /* first try, hard reset at cold start only */ - rc = init_and_check(coldstart); + rc = init_and_check(coldstart); - if (rc) + if (rc) { /* failed? -> second try, always with hard reset */ DEBUGF("ata: init failed, retrying...\n"); rc = init_and_check(true); -- cgit v1.2.3