diff options
Diffstat (limited to 'firmware/target/sh/archos/ata-archos.c')
-rwxr-xr-x | firmware/target/sh/archos/ata-archos.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/firmware/target/sh/archos/ata-archos.c b/firmware/target/sh/archos/ata-archos.c index 73e56b8d84..c685700fa3 100755 --- a/firmware/target/sh/archos/ata-archos.c +++ b/firmware/target/sh/archos/ata-archos.c | |||
@@ -25,6 +25,9 @@ | |||
25 | #include "ata-target.h" | 25 | #include "ata-target.h" |
26 | #include "hwcompat.h" | 26 | #include "hwcompat.h" |
27 | 27 | ||
28 | #define ATA_CONTROL1 ((volatile unsigned char*)0x06200206) | ||
29 | #define ATA_CONTROL2 ((volatile unsigned char*)0x06200306) | ||
30 | |||
28 | volatile unsigned char* ata_control; | 31 | volatile unsigned char* ata_control; |
29 | int ata_io_address; /* 0x300 or 0x200 */ | 32 | int ata_io_address; /* 0x300 or 0x200 */ |
30 | 33 | ||
@@ -39,20 +42,6 @@ void ata_reset(void) | |||
39 | sleep(1); /* > 2ms */ | 42 | sleep(1); /* > 2ms */ |
40 | } | 43 | } |
41 | 44 | ||
42 | void ata_address_detect(void) | ||
43 | { | ||
44 | if (read_hw_mask() & ATA_ADDRESS_200) | ||
45 | { | ||
46 | ata_io_address = 0x200; /* For debug purposes only */ | ||
47 | ata_control = ATA_CONTROL1; | ||
48 | } | ||
49 | else | ||
50 | { | ||
51 | ata_io_address = 0x300; /* For debug purposes only */ | ||
52 | ata_control = ATA_CONTROL2; | ||
53 | } | ||
54 | } | ||
55 | |||
56 | void ata_enable(bool on) | 45 | void ata_enable(bool on) |
57 | { | 46 | { |
58 | if(on) | 47 | if(on) |
@@ -68,6 +57,17 @@ void ata_device_init(void) | |||
68 | or_b(0x02, &PAIORH); /* output for ATA reset */ | 57 | or_b(0x02, &PAIORH); /* output for ATA reset */ |
69 | or_b(0x02, &PADRH); /* release ATA reset */ | 58 | or_b(0x02, &PADRH); /* release ATA reset */ |
70 | PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */ | 59 | PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */ |
60 | |||
61 | if (read_hw_mask() & ATA_ADDRESS_200) | ||
62 | { | ||
63 | ata_io_address = 0x200; /* For debug purposes only */ | ||
64 | ata_control = ATA_CONTROL1; | ||
65 | } | ||
66 | else | ||
67 | { | ||
68 | ata_io_address = 0x300; /* For debug purposes only */ | ||
69 | ata_control = ATA_CONTROL2; | ||
70 | } | ||
71 | } | 71 | } |
72 | 72 | ||
73 | bool ata_is_coldstart(void) | 73 | bool ata_is_coldstart(void) |