diff options
-rw-r--r-- | firmware/drivers/ata.c | 41 | ||||
-rw-r--r-- | firmware/export/ata.h | 34 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/dma-creativezvm.c | 1 |
3 files changed, 38 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 | ||
diff --git a/firmware/export/ata.h b/firmware/export/ata.h index 5be32da231..c7bf85d274 100644 --- a/firmware/export/ata.h +++ b/firmware/export/ata.h | |||
@@ -25,6 +25,40 @@ | |||
25 | #include "config.h" /* for HAVE_MULTIVOLUME or not */ | 25 | #include "config.h" /* for HAVE_MULTIVOLUME or not */ |
26 | #include "mv.h" /* for IF_MV() and friends */ | 26 | #include "mv.h" /* for IF_MV() and friends */ |
27 | 27 | ||
28 | #ifndef ATA_OUT8 | ||
29 | #define ATA_OUT8(reg, data) (reg) = (data) | ||
30 | #endif | ||
31 | #ifndef ATA_OUT16 | ||
32 | #define ATA_OUT16(reg, data) (reg) = (data) | ||
33 | #endif | ||
34 | #ifndef ATA_IN8 | ||
35 | #define ATA_IN8(reg) (reg) | ||
36 | #endif | ||
37 | #ifndef ATA_IN16 | ||
38 | #define ATA_IN16(reg) (reg) | ||
39 | #endif | ||
40 | #ifndef ATA_SWAP_IDENTIFY | ||
41 | #define ATA_SWAP_IDENTIFY(word) (word) | ||
42 | #endif | ||
43 | |||
44 | #define STATUS_BSY 0x80 | ||
45 | #define STATUS_RDY 0x40 | ||
46 | #define STATUS_DRQ 0x08 | ||
47 | #define STATUS_ERR 0x01 | ||
48 | #define STATUS_DF 0x20 | ||
49 | #define ERROR_IDNF 0x10 | ||
50 | #define ERROR_ABRT 0x04 | ||
51 | |||
52 | #define TEST_PATTERN1 0xa5 | ||
53 | #define TEST_PATTERN2 0x5a | ||
54 | #define TEST_PATTERN3 0xaa | ||
55 | #define TEST_PATTERN4 0x55 | ||
56 | |||
57 | #define ATA_FEATURE ATA_ERROR | ||
58 | |||
59 | #define ATA_STATUS ATA_COMMAND | ||
60 | #define ATA_ALT_STATUS ATA_CONTROL | ||
61 | |||
28 | struct storage_info; | 62 | struct storage_info; |
29 | 63 | ||
30 | void ata_enable(bool on); | 64 | void ata_enable(bool on); |
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/dma-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/dma-creativezvm.c index 514fdd5bd9..0e4b74fd77 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/dma-creativezvm.c +++ b/firmware/target/arm/tms320dm320/creative-zvm/dma-creativezvm.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "system.h" | 25 | #include "system.h" |
26 | #include "dma-target.h" | 26 | #include "dma-target.h" |
27 | #include "dm320.h" | 27 | #include "dm320.h" |
28 | #include "ata.h" | ||
28 | #include "ata-target.h" | 29 | #include "ata-target.h" |
29 | #include <stdbool.h> | 30 | #include <stdbool.h> |
30 | 31 | ||