forked from len0rd/rockbox
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
This commit is contained in:
parent
3bceded793
commit
28fd4b7228
3 changed files with 17 additions and 22 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue