summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-12-15 01:03:16 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-12-15 01:03:16 +0000
commit2ef5858a5b25873c5f2f0ae5bf58229656aa5d9f (patch)
treea784aac5cc4a851be538d2f7c9181dc76c958264
parent47af429f2e4b2d88695e8e45a5cf9bb7725609f9 (diff)
downloadrockbox-2ef5858a5b25873c5f2f0ae5bf58229656aa5d9f.tar.gz
rockbox-2ef5858a5b25873c5f2f0ae5bf58229656aa5d9f.zip
M:Robe 500: Initialize ATA related pins with pin setup function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23997 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c
index 51837dd653..7250a2437b 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c
@@ -35,10 +35,6 @@
35#define ATA_RESET_ENABLE (IO_GIO_BITCLR0 = 1 << 10) 35#define ATA_RESET_ENABLE (IO_GIO_BITCLR0 = 1 << 10)
36#define ATA_RESET_DISABLE (IO_GIO_BITSET0 = 1 << 10) 36#define ATA_RESET_DISABLE (IO_GIO_BITSET0 = 1 << 10)
37 37
38/* ATA_EN on C7C68300 */
39#define USB_ATA_ENABLE (IO_GIO_BITSET0 = 1 << 2)
40#define USB_ATA_DISABLE (IO_GIO_BITCLR0 = 1 << 2)
41
42void ata_reset(void) 38void ata_reset(void)
43{ 39{
44 ATA_RESET_ENABLE; 40 ATA_RESET_ENABLE;
@@ -50,10 +46,8 @@ void ata_reset(void)
50/* This function is called before enabling the USB bus */ 46/* This function is called before enabling the USB bus */
51void ata_enable(bool on) 47void ata_enable(bool on)
52{ 48{
53 if(on) 49 (void) on;
54 USB_ATA_DISABLE; 50 return;
55 else
56 USB_ATA_ENABLE;
57} 51}
58 52
59bool ata_is_coldstart(void) 53bool ata_is_coldstart(void)
@@ -64,7 +58,12 @@ bool ata_is_coldstart(void)
64void ata_device_init(void) 58void ata_device_init(void)
65{ 59{
66 /* ATA reset */ 60 /* ATA reset */
61 /* 10: output, non-inverted, no-irq, falling edge, no-chat, normal */
62 dm320_set_io(10, false, false, false, false, false, 0x00);
67 ATA_RESET_DISABLE; /* Set the pin to disable an active low reset */ 63 ATA_RESET_DISABLE; /* Set the pin to disable an active low reset */
68 IO_GIO_DIR0&=~(1<<10); 64
65 /* ATA INT (currently unused) */
66 /* 11: input , inverted, irq, any edge, no-chat, normal */
67 dm320_set_io(11, true, true, true, true, false, 0x00);
69} 68}
70 69