summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2011-01-02 23:02:55 +0000
committerMichael Sparmann <theseven@rockbox.org>2011-01-02 23:02:55 +0000
commit1a1fc09863e39c19f5eda686f79ae61c6e3f1ff5 (patch)
treef00585518972e74fb376fcc7babfedb3ab26dd46
parent9339be1279eb2b64a268e3a7a039ef8031dae4b3 (diff)
Fix red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28951 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/ata.c41
-rw-r--r--firmware/export/ata.h34
-rw-r--r--firmware/target/arm/tms320dm320/creative-zvm/dma-creativezvm.c1
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 @@
#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;
}
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 @@
#include "config.h" /* for HAVE_MULTIVOLUME or not */
#include "mv.h" /* for IF_MV() and friends */
+#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 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
+
struct storage_info;
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 @@
#include "system.h"
#include "dma-target.h"
#include "dm320.h"
+#include "ata.h"
#include "ata-target.h"
#include <stdbool.h>