diff options
Diffstat (limited to 'firmware/drivers')
| -rw-r--r-- | firmware/drivers/ata.c | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index c9f87a8..955fb59 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -35,43 +35,8 @@ #include "ata-target.h" #include "storage.h" - -#ifndef ATA_OUT8 -#define ATA_OUT8(reg, data) (reg) = (data) -#endif -#ifndef ATA_OUT16 -#define ATA_OUT16(reg, data) (reg) = (data) -#endif -#ifndef ATA_IN8 -#define ATA_IN8(reg) (reg) -#endif -#ifndef ATA_IN16 -#define ATA_IN16(reg) (reg) -#endif -#ifndef ATA_SWAP_IDENTIFY -#define ATA_SWAP_IDENTIFY(word) (word) -#endif - #define SECTOR_SIZE 512 -#define STATUS_BSY 0x80 -#define STATUS_RDY 0x40 -#define STATUS_DRQ 0x08 -#define STATUS_ERR 0x01 -#define STATUS_DF 0x20 -#define ERROR_IDNF 0x10 -#define ERROR_ABRT 0x04 - -#define TEST_PATTERN1 0xa5 -#define TEST_PATTERN2 0x5a -#define TEST_PATTERN3 0xaa -#define TEST_PATTERN4 0x55 - -#define ATA_FEATURE ATA_ERROR - -#define ATA_STATUS ATA_COMMAND -#define ATA_ALT_STATUS ATA_CONTROL - #define SELECT_DEVICE1 0x10 #define SELECT_LBA 0x40 @@ -1356,9 +1321,9 @@ int ata_init(void) if (rc) { /* failed? -> second try, always with hard reset */ -// DEBUGF("ata: init failed, retrying...\n"); -// rc = init_and_check(true); -// if (rc) + DEBUGF("ata: init failed, retrying...\n"); + rc = init_and_check(true); + if (rc) return rc; } |