diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-11-12 14:17:49 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-11-12 14:17:49 +0000 |
commit | 8c3f0681b2347ff51680d61f9226c587a9cfdcee (patch) | |
tree | f59f3210aa545c3cd35c2bf42648c5b4f86753d3 | |
parent | 7b30e50812294fa8d6626f4f08608730d9dcea80 (diff) | |
download | rockbox-8c3f0681b2347ff51680d61f9226c587a9cfdcee.tar.gz rockbox-8c3f0681b2347ff51680d61f9226c587a9cfdcee.zip |
Get rid of ages-old interdependency between ata.c and mas.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11519 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/drivers/ata.c | 3 | ||||
-rw-r--r-- | firmware/drivers/ata_mmc.c | 1 | ||||
-rw-r--r-- | firmware/drivers/mas.c | 17 |
3 files changed, 8 insertions, 13 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index c882c22fe1..bb8eef9dd9 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -124,7 +124,6 @@ int ata_io_address; /* 0x300 or 0x200, only valid on recorder */ | |||
124 | static volatile unsigned char* ata_control; | 124 | static volatile unsigned char* ata_control; |
125 | #endif | 125 | #endif |
126 | 126 | ||
127 | bool old_recorder = false; | ||
128 | int ata_spinup_time = 0; | 127 | int ata_spinup_time = 0; |
129 | #if CONFIG_LED == LED_REAL | 128 | #if CONFIG_LED == LED_REAL |
130 | static bool ata_led_enabled = true; | 129 | static bool ata_led_enabled = true; |
@@ -1415,13 +1414,11 @@ static void io_address_detect(void) | |||
1415 | if (read_hw_mask() & ATA_ADDRESS_200) | 1414 | if (read_hw_mask() & ATA_ADDRESS_200) |
1416 | { | 1415 | { |
1417 | ata_io_address = 0x200; /* For debug purposes only */ | 1416 | ata_io_address = 0x200; /* For debug purposes only */ |
1418 | old_recorder = false; | ||
1419 | ata_control = ATA_CONTROL1; | 1417 | ata_control = ATA_CONTROL1; |
1420 | } | 1418 | } |
1421 | else | 1419 | else |
1422 | { | 1420 | { |
1423 | ata_io_address = 0x300; /* For debug purposes only */ | 1421 | ata_io_address = 0x300; /* For debug purposes only */ |
1424 | old_recorder = true; | ||
1425 | ata_control = ATA_CONTROL2; | 1422 | ata_control = ATA_CONTROL2; |
1426 | } | 1423 | } |
1427 | } | 1424 | } |
diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c index bf78bc84f4..30382ed36f 100644 --- a/firmware/drivers/ata_mmc.c +++ b/firmware/drivers/ata_mmc.c | |||
@@ -83,7 +83,6 @@ | |||
83 | #define DT_STOP_TRAN 0xfd | 83 | #define DT_STOP_TRAN 0xfd |
84 | 84 | ||
85 | /* for compatibility */ | 85 | /* for compatibility */ |
86 | bool old_recorder = false; /* FIXME: get rid of this cross-dependency */ | ||
87 | int ata_spinup_time = 0; | 86 | int ata_spinup_time = 0; |
88 | long last_disk_activity = -1; | 87 | long last_disk_activity = -1; |
89 | 88 | ||
diff --git a/firmware/drivers/mas.c b/firmware/drivers/mas.c index 1630255348..a8f910a426 100644 --- a/firmware/drivers/mas.c +++ b/firmware/drivers/mas.c | |||
@@ -24,8 +24,7 @@ | |||
24 | #include "mas.h" | 24 | #include "mas.h" |
25 | #include "kernel.h" | 25 | #include "kernel.h" |
26 | #include "system.h" | 26 | #include "system.h" |
27 | 27 | #include "hwcompat.h" | |
28 | extern bool old_recorder; | ||
29 | 28 | ||
30 | static int mas_devread(unsigned long *dest, int len); | 29 | static int mas_devread(unsigned long *dest, int len); |
31 | 30 | ||
@@ -287,21 +286,21 @@ void mas_reset(void) | |||
287 | or_b(0x01, &PADRH); | 286 | or_b(0x01, &PADRH); |
288 | sleep(HZ/5); | 287 | sleep(HZ/5); |
289 | #elif (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | 288 | #elif (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) |
290 | if(old_recorder) | 289 | if (read_hw_mask() & ATA_ADDRESS_200) |
291 | { | 290 | { |
292 | /* Older recorder models don't invert the POR signal */ | ||
293 | or_b(0x01, &PADRH); | ||
294 | sleep(HZ/100); | ||
295 | and_b(~0x01, &PADRH); | 291 | and_b(~0x01, &PADRH); |
292 | sleep(HZ/100); | ||
293 | or_b(0x01, &PADRH); | ||
296 | sleep(HZ/5); | 294 | sleep(HZ/5); |
297 | } | 295 | } |
298 | else | 296 | else |
299 | { | 297 | { |
300 | and_b(~0x01, &PADRH); | 298 | /* Older recorder models don't invert the POR signal */ |
301 | sleep(HZ/100); | ||
302 | or_b(0x01, &PADRH); | 299 | or_b(0x01, &PADRH); |
300 | sleep(HZ/100); | ||
301 | and_b(~0x01, &PADRH); | ||
303 | sleep(HZ/5); | 302 | sleep(HZ/5); |
304 | } | 303 | } |
305 | #endif | 304 | #endif |
306 | } | 305 | } |
307 | 306 | ||