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.c41
1 files changed, 3 insertions, 38 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index c9f87a8a70..955fb594b2 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -35,43 +35,8 @@
35#include "ata-target.h" 35#include "ata-target.h"
36#include "storage.h" 36#include "storage.h"
37 37
38
39#ifndef ATA_OUT8
40#define ATA_OUT8(reg, data) (reg) = (data)
41#endif
42#ifndef ATA_OUT16
43#define ATA_OUT16(reg, data) (reg) = (data)
44#endif
45#ifndef ATA_IN8
46#define ATA_IN8(reg) (reg)
47#endif
48#ifndef ATA_IN16
49#define ATA_IN16(reg) (reg)
50#endif
51#ifndef ATA_SWAP_IDENTIFY
52#define ATA_SWAP_IDENTIFY(word) (word)
53#endif
54
55#define SECTOR_SIZE 512 38#define SECTOR_SIZE 512
56 39
57#define STATUS_BSY 0x80
58#define STATUS_RDY 0x40
59#define STATUS_DRQ 0x08
60#define STATUS_ERR 0x01
61#define STATUS_DF 0x20
62#define ERROR_IDNF 0x10
63#define ERROR_ABRT 0x04
64
65#define TEST_PATTERN1 0xa5
66#define TEST_PATTERN2 0x5a
67#define TEST_PATTERN3 0xaa
68#define TEST_PATTERN4 0x55
69
70#define ATA_FEATURE ATA_ERROR
71
72#define ATA_STATUS ATA_COMMAND
73#define ATA_ALT_STATUS ATA_CONTROL
74
75#define SELECT_DEVICE1 0x10 40#define SELECT_DEVICE1 0x10
76#define SELECT_LBA 0x40 41#define SELECT_LBA 0x40
77 42
@@ -1356,9 +1321,9 @@ int ata_init(void)
1356 1321
1357 if (rc) 1322 if (rc)
1358 { /* failed? -> second try, always with hard reset */ 1323 { /* failed? -> second try, always with hard reset */
1359// DEBUGF("ata: init failed, retrying...\n"); 1324 DEBUGF("ata: init failed, retrying...\n");
1360// rc = init_and_check(true); 1325 rc = init_and_check(true);
1361// if (rc) 1326 if (rc)
1362 return rc; 1327 return rc;
1363 } 1328 }
1364 1329