summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-04-11 21:26:58 +0000
committerJens Arnold <amiconn@rockbox.org>2007-04-11 21:26:58 +0000
commitd6e822cab9b4f1294a8789632c737d0d8f71ef58 (patch)
treedc6b6888ac54ff0a3f1974b87b18dfaa81e65ea4
parent81cf65e496b94e12d962bbaf59b166244737bb3a (diff)
downloadrockbox-d6e822cab9b4f1294a8789632c737d0d8f71ef58.tar.gz
rockbox-d6e822cab9b4f1294a8789632c737d0d8f71ef58.zip
Get rid of some old archos debug cruft (USB polarity, PR polarity and ATA address are all derived from the hw mask, and master/slave isn't displayed on other targets either). * Get rid of all the USB*STYLE macros (except USB_IPODSTYLE).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13112 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/debug_menu.c90
-rw-r--r--firmware/export/config-fmrecorder.h3
-rw-r--r--firmware/export/config-gigabeat.h2
-rw-r--r--firmware/export/config-h100.h2
-rw-r--r--firmware/export/config-h120.h2
-rw-r--r--firmware/export/config-h300.h2
-rw-r--r--firmware/export/config-iaudiom5.h4
-rw-r--r--firmware/export/config-iaudiox5.h2
-rw-r--r--firmware/export/config-ondiofm.h6
-rw-r--r--firmware/export/config-ondiosp.h6
-rw-r--r--firmware/export/config-player.h3
-rw-r--r--firmware/export/config-recorder.h3
-rw-r--r--firmware/export/config-recorderv2.h3
-rw-r--r--firmware/target/sh/archos/ata-archos.c7
-rw-r--r--firmware/target/sh/archos/ata-target.h1
15 files changed, 19 insertions, 117 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 48e67b575b..682bcaf456 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -121,8 +121,6 @@ static bool dbg_list(char *title, int count, int selection_size,
121/*---------------------------------------------------*/ 121/*---------------------------------------------------*/
122/* SPECIAL DEBUG STUFF */ 122/* SPECIAL DEBUG STUFF */
123/*---------------------------------------------------*/ 123/*---------------------------------------------------*/
124extern int ata_device;
125extern int ata_io_address;
126extern struct thread_entry threads[MAXTHREADS]; 124extern struct thread_entry threads[MAXTHREADS];
127 125
128 126
@@ -407,8 +405,6 @@ static bool dbg_hw_info(void)
407{ 405{
408#if CONFIG_CPU == SH7034 406#if CONFIG_CPU == SH7034
409 char buf[32]; 407 char buf[32];
410 int usb_polarity;
411 int pr_polarity;
412 int bitmask = *(unsigned short*)0x20000fc; 408 int bitmask = *(unsigned short*)0x20000fc;
413 int rom_version = *(unsigned short*)0x20000fe; 409 int rom_version = *(unsigned short*)0x20000fe;
414 unsigned manu, id; /* flash IDs */ 410 unsigned manu, id; /* flash IDs */
@@ -417,20 +413,6 @@ static bool dbg_hw_info(void)
417 bool has_bootrom; /* flag for boot ROM present */ 413 bool has_bootrom; /* flag for boot ROM present */
418 int oldmode; /* saved memory guard mode */ 414 int oldmode; /* saved memory guard mode */
419 415
420#ifdef USB_ENABLE_ONDIOSTYLE
421 if(PADRL & 0x20)
422#else
423 if(PADRH & 0x04)
424#endif
425 usb_polarity = 0; /* Negative */
426 else
427 usb_polarity = 1; /* Positive */
428
429 if(PADRH & 0x08)
430 pr_polarity = 0; /* Negative */
431 else
432 pr_polarity = 1; /* Positive */
433
434 oldmode = system_memory_guard(MEMGUARD_NONE); /* disable memory guard */ 416 oldmode = system_memory_guard(MEMGUARD_NONE); /* disable memory guard */
435 417
436 /* get flash ROM type */ 418 /* get flash ROM type */
@@ -460,17 +442,11 @@ static bool dbg_hw_info(void)
460 snprintf(buf, 32, "Mask: 0x%04x", bitmask); 442 snprintf(buf, 32, "Mask: 0x%04x", bitmask);
461 lcd_puts(0, 2, buf); 443 lcd_puts(0, 2, buf);
462 444
463 snprintf(buf, 32, "USB: %s", usb_polarity?"positive":"negative");
464 lcd_puts(0, 3, buf);
465
466 snprintf(buf, 32, "PR: %s", pr_polarity?"positive":"negative");
467 lcd_puts(0, 4, buf);
468
469 if (got_id) 445 if (got_id)
470 snprintf(buf, 32, "Flash: M=%02x D=%02x", manu, id); 446 snprintf(buf, 32, "Flash: M=%02x D=%02x", manu, id);
471 else 447 else
472 snprintf(buf, 32, "Flash: M=?? D=??"); /* unknown, sorry */ 448 snprintf(buf, 32, "Flash: M=?? D=??"); /* unknown, sorry */
473 lcd_puts(0, 5, buf); 449 lcd_puts(0, 3, buf);
474 450
475 if (has_bootrom) 451 if (has_bootrom)
476 { 452 {
@@ -483,13 +459,8 @@ static bool dbg_hw_info(void)
483 { 459 {
484 snprintf(buf, 32, "Boot ROM: none"); 460 snprintf(buf, 32, "Boot ROM: none");
485 } 461 }
486 lcd_puts(0, 6, buf); 462 lcd_puts(0, 4, buf);
487 463
488#ifndef HAVE_MMC /* have ATA */
489 snprintf(buf, 32, "ATA: 0x%x,%s", ata_io_address,
490 ata_device ? "slave":"master");
491 lcd_puts(0, 7, buf);
492#endif
493 lcd_update(); 464 lcd_update();
494 465
495 while(1) 466 while(1)
@@ -593,8 +564,6 @@ static bool dbg_hw_info(void)
593 char buf[32]; 564 char buf[32];
594 int button; 565 int button;
595 int currval = 0; 566 int currval = 0;
596 int usb_polarity;
597 int bitmask = *(unsigned short*)0x20000fc;
598 int rom_version = *(unsigned short*)0x20000fe; 567 int rom_version = *(unsigned short*)0x20000fe;
599 unsigned manu, id; /* flash IDs */ 568 unsigned manu, id; /* flash IDs */
600 bool got_id; /* flag if we managed to get the flash IDs */ 569 bool got_id; /* flag if we managed to get the flash IDs */
@@ -602,11 +571,6 @@ static bool dbg_hw_info(void)
602 bool has_bootrom; /* flag for boot ROM present */ 571 bool has_bootrom; /* flag for boot ROM present */
603 int oldmode; /* saved memory guard mode */ 572 int oldmode; /* saved memory guard mode */
604 573
605 if(PADRH & 0x04)
606 usb_polarity = 0; /* Negative */
607 else
608 usb_polarity = 1; /* Positive */
609
610 oldmode = system_memory_guard(MEMGUARD_NONE); /* disable memory guard */ 574 oldmode = system_memory_guard(MEMGUARD_NONE); /* disable memory guard */
611 575
612 /* get flash ROM type */ 576 /* get flash ROM type */
@@ -636,23 +600,12 @@ static bool dbg_hw_info(void)
636 rom_version/100, rom_version%100); 600 rom_version/100, rom_version%100);
637 break; 601 break;
638 case 1: 602 case 1:
639 snprintf(buf, 32, "USB: %s",
640 usb_polarity?"pos":"neg");
641 break;
642 case 2:
643 snprintf(buf, 32, "ATA: 0x%x%s",
644 ata_io_address, ata_device ? "s":"m");
645 break;
646 case 3:
647 snprintf(buf, 32, "Mask: %04x", bitmask);
648 break;
649 case 4:
650 if (got_id) 603 if (got_id)
651 snprintf(buf, 32, "Flash:%02x,%02x", manu, id); 604 snprintf(buf, 32, "Flash:%02x,%02x", manu, id);
652 else 605 else
653 snprintf(buf, 32, "Flash:??,??"); /* unknown, sorry */ 606 snprintf(buf, 32, "Flash:??,??"); /* unknown, sorry */
654 break; 607 break;
655 case 5: 608 case 2:
656 if (has_bootrom) 609 if (has_bootrom)
657 { 610 {
658 if (rom_crc == 0x56DBA4EE) /* known Version 1 */ 611 if (rom_crc == 0x56DBA4EE) /* known Version 1 */
@@ -681,12 +634,12 @@ static bool dbg_hw_info(void)
681 case ACTION_SETTINGS_DEC: 634 case ACTION_SETTINGS_DEC:
682 currval--; 635 currval--;
683 if(currval < 0) 636 if(currval < 0)
684 currval = 5; 637 currval = 2;
685 break; 638 break;
686 639
687 case ACTION_SETTINGS_INC: 640 case ACTION_SETTINGS_INC:
688 currval++; 641 currval++;
689 if(currval > 5) 642 if(currval > 2)
690 currval = 0; 643 currval = 0;
691 break; 644 break;
692 } 645 }
@@ -968,11 +921,7 @@ bool dbg_ports(void)
968 snprintf(buf, 32, "Batt: %d.%02dV %d%% ", adc_battery_voltage / 100, 921 snprintf(buf, 32, "Batt: %d.%02dV %d%% ", adc_battery_voltage / 100,
969 adc_battery_voltage % 100, adc_battery_level); 922 adc_battery_voltage % 100, adc_battery_level);
970 lcd_puts(0, 6, buf); 923 lcd_puts(0, 6, buf);
971#ifndef HAVE_MMC /* have ATA */ 924
972 snprintf(buf, 32, "ATA: %s, 0x%x",
973 ata_device?"slave":"master", ata_io_address);
974 lcd_puts(0, 7, buf);
975#endif
976 lcd_update(); 925 lcd_update();
977 if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) 926 if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
978 return false; 927 return false;
@@ -1208,38 +1157,35 @@ bool dbg_ports(void)
1208 switch(currval) 1157 switch(currval)
1209 { 1158 {
1210 case 0: 1159 case 0:
1211 snprintf(buf, 32, "PADR: %04x ", porta); 1160 snprintf(buf, 32, "PADR: %04x", porta);
1212 break; 1161 break;
1213 case 1: 1162 case 1:
1214 snprintf(buf, 32, "PBDR: %04x ", portb); 1163 snprintf(buf, 32, "PBDR: %04x", portb);
1215 break; 1164 break;
1216 case 2: 1165 case 2:
1217 snprintf(buf, 32, "AN0: %03x ", adc_read(0)); 1166 snprintf(buf, 32, "AN0: %03x", adc_read(0));
1218 break; 1167 break;
1219 case 3: 1168 case 3:
1220 snprintf(buf, 32, "AN1: %03x ", adc_read(1)); 1169 snprintf(buf, 32, "AN1: %03x", adc_read(1));
1221 break; 1170 break;
1222 case 4: 1171 case 4:
1223 snprintf(buf, 32, "AN2: %03x ", adc_read(2)); 1172 snprintf(buf, 32, "AN2: %03x", adc_read(2));
1224 break; 1173 break;
1225 case 5: 1174 case 5:
1226 snprintf(buf, 32, "AN3: %03x ", adc_read(3)); 1175 snprintf(buf, 32, "AN3: %03x", adc_read(3));
1227 break; 1176 break;
1228 case 6: 1177 case 6:
1229 snprintf(buf, 32, "AN4: %03x ", adc_read(4)); 1178 snprintf(buf, 32, "AN4: %03x", adc_read(4));
1230 break; 1179 break;
1231 case 7: 1180 case 7:
1232 snprintf(buf, 32, "AN5: %03x ", adc_read(5)); 1181 snprintf(buf, 32, "AN5: %03x", adc_read(5));
1233 break; 1182 break;
1234 case 8: 1183 case 8:
1235 snprintf(buf, 32, "AN6: %03x ", adc_read(6)); 1184 snprintf(buf, 32, "AN6: %03x", adc_read(6));
1236 break; 1185 break;
1237 case 9: 1186 case 9:
1238 snprintf(buf, 32, "AN7: %03x ", adc_read(7)); 1187 snprintf(buf, 32, "AN7: %03x", adc_read(7));
1239 break; 1188 break;
1240 case 10:
1241 snprintf(buf, 32, "%s, 0x%x ",
1242 ata_device?"slv":"mst", ata_io_address);
1243 break; 1189 break;
1244 } 1190 }
1245 lcd_puts(0, 0, buf); 1191 lcd_puts(0, 0, buf);
@@ -1261,12 +1207,12 @@ bool dbg_ports(void)
1261 case ACTION_SETTINGS_DEC: 1207 case ACTION_SETTINGS_DEC:
1262 currval--; 1208 currval--;
1263 if(currval < 0) 1209 if(currval < 0)
1264 currval = 10; 1210 currval = 9;
1265 break; 1211 break;
1266 1212
1267 case ACTION_SETTINGS_INC: 1213 case ACTION_SETTINGS_INC:
1268 currval++; 1214 currval++;
1269 if(currval > 10) 1215 if(currval > 9)
1270 currval = 0; 1216 currval = 0;
1271 break; 1217 break;
1272 } 1218 }
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h
index d40fd01198..e753808897 100644
--- a/firmware/export/config-fmrecorder.h
+++ b/firmware/export/config-fmrecorder.h
@@ -99,9 +99,6 @@
99/* FM recorders can wake up from RTC alarm */ 99/* FM recorders can wake up from RTC alarm */
100#define HAVE_RTC_ALARM 100#define HAVE_RTC_ALARM
101 101
102/* How to detect USB */
103#define USB_FMRECORDERSTYLE 1
104
105/* Hardware controlled charging with monitoring */ 102/* Hardware controlled charging with monitoring */
106#define CONFIG_CHARGING CHARGING_MONITOR 103#define CONFIG_CHARGING CHARGING_MONITOR
107 104
diff --git a/firmware/export/config-gigabeat.h b/firmware/export/config-gigabeat.h
index 588c92df6d..9b56a1a616 100644
--- a/firmware/export/config-gigabeat.h
+++ b/firmware/export/config-gigabeat.h
@@ -124,8 +124,6 @@
124/* Offset ( in the firmware file's header ) to the real data */ 124/* Offset ( in the firmware file's header ) to the real data */
125#define FIRMWARE_OFFSET_FILE_DATA 8 125#define FIRMWARE_OFFSET_FILE_DATA 8
126 126
127#define USB_GIGABEAT_STYLE
128
129#define HAVE_HEADPHONE_DETECTION 127#define HAVE_HEADPHONE_DETECTION
130 128
131/* Define this if you have adjustable CPU frequency */ 129/* Define this if you have adjustable CPU frequency */
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h
index 84ca26ba53..dbb499f3af 100644
--- a/firmware/export/config-h100.h
+++ b/firmware/export/config-h100.h
@@ -135,8 +135,6 @@
135/* Offset ( in the firmware file's header ) to the real data */ 135/* Offset ( in the firmware file's header ) to the real data */
136#define FIRMWARE_OFFSET_FILE_DATA 8 136#define FIRMWARE_OFFSET_FILE_DATA 8
137 137
138#define USB_IRIVERSTYLE
139
140#define HAVE_ATA_LED_CTRL 138#define HAVE_ATA_LED_CTRL
141 139
142/* Define this if you have adjustable CPU frequency */ 140/* Define this if you have adjustable CPU frequency */
diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h
index ebde63f260..f957f450d0 100644
--- a/firmware/export/config-h120.h
+++ b/firmware/export/config-h120.h
@@ -128,8 +128,6 @@
128/* Offset ( in the firmware file's header ) to the real data */ 128/* Offset ( in the firmware file's header ) to the real data */
129#define FIRMWARE_OFFSET_FILE_DATA 8 129#define FIRMWARE_OFFSET_FILE_DATA 8
130 130
131#define USB_IRIVERSTYLE
132
133#define HAVE_ATA_LED_CTRL 131#define HAVE_ATA_LED_CTRL
134 132
135/* Define this if you have adjustable CPU frequency */ 133/* Define this if you have adjustable CPU frequency */
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index 173b99e432..ad80191885 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -127,8 +127,6 @@
127/* Offset ( in the firmware file's header ) to the real data */ 127/* Offset ( in the firmware file's header ) to the real data */
128#define FIRMWARE_OFFSET_FILE_DATA 8 128#define FIRMWARE_OFFSET_FILE_DATA 8
129 129
130#define USB_IRIVERSTYLE
131
132/* USB On-the-go */ 130/* USB On-the-go */
133#define CONFIG_USBOTG USBOTG_ISP1362 131#define CONFIG_USBOTG USBOTG_ISP1362
134 132
diff --git a/firmware/export/config-iaudiom5.h b/firmware/export/config-iaudiom5.h
index d6e4195216..bce3c47e5c 100644
--- a/firmware/export/config-iaudiom5.h
+++ b/firmware/export/config-iaudiom5.h
@@ -126,14 +126,12 @@
126/* Offset ( in the firmware file's header ) to the real data */ 126/* Offset ( in the firmware file's header ) to the real data */
127#define FIRMWARE_OFFSET_FILE_DATA 8 127#define FIRMWARE_OFFSET_FILE_DATA 8
128 128
129#define USB_X5M5_STYLE
130
131/* Define this if you have adjustable CPU frequency */ 129/* Define this if you have adjustable CPU frequency */
132#define HAVE_ADJUSTABLE_CPU_FREQ 130#define HAVE_ADJUSTABLE_CPU_FREQ
133 131
134#define BOOTFILE_EXT "iaudio" 132#define BOOTFILE_EXT "iaudio"
135#define BOOTFILE "rockbox." BOOTFILE_EXT 133#define BOOTFILE "rockbox." BOOTFILE_EXT
136#define BOOTDIR "/.rockbox" 134#define BOOTDIR "/.rockbox"
137 135
138#define BOOTLOADER_ENTRYPOINT 0x001F0000 136#define BOOTLOADER_ENTRYPOINT 0x001F0000
139#define FLASH_ENTRYPOINT 0x00001000 137#define FLASH_ENTRYPOINT 0x00001000
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h
index adcbfee551..57f8a68134 100644
--- a/firmware/export/config-iaudiox5.h
+++ b/firmware/export/config-iaudiox5.h
@@ -141,8 +141,6 @@
141/* Offset ( in the firmware file's header ) to the real data */ 141/* Offset ( in the firmware file's header ) to the real data */
142#define FIRMWARE_OFFSET_FILE_DATA 8 142#define FIRMWARE_OFFSET_FILE_DATA 8
143 143
144#define USB_X5M5_STYLE
145
146/* USB On-the-go */ 144/* USB On-the-go */
147#define CONFIG_USBOTG USBOTG_M5636 145#define CONFIG_USBOTG USBOTG_M5636
148 146
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h
index fbc0c0e098..0e691b70e3 100644
--- a/firmware/export/config-ondiofm.h
+++ b/firmware/export/config-ondiofm.h
@@ -78,12 +78,6 @@
78/* Define this if the tuner is switched on by software */ 78/* Define this if the tuner is switched on by software */
79#define HAVE_TUNER_PWR_CTRL 79#define HAVE_TUNER_PWR_CTRL
80 80
81/* How to detect USB */
82#define USB_FMRECORDERSTYLE 1 /* like FM, on AN1 */
83
84/* How to enable USB */
85#define USB_ENABLE_ONDIOSTYLE 1 /* with PA5 */
86
87/* The start address index for ROM builds */ 81/* The start address index for ROM builds */
88/* #define ROM_START 0x16010 for behind original Archos */ 82/* #define ROM_START 0x16010 for behind original Archos */
89#define ROM_START 0x7010 /* for behind BootBox */ 83#define ROM_START 0x7010 /* for behind BootBox */
diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h
index cefbbc3666..da723413ec 100644
--- a/firmware/export/config-ondiosp.h
+++ b/firmware/export/config-ondiosp.h
@@ -65,12 +65,6 @@
65/* Offset ( in the firmware file's header ) to the real data */ 65/* Offset ( in the firmware file's header ) to the real data */
66#define FIRMWARE_OFFSET_FILE_DATA 24 66#define FIRMWARE_OFFSET_FILE_DATA 24
67 67
68/* How to detect USB */
69#define USB_FMRECORDERSTYLE 1 /* like FM, on AN1 */
70
71/* How to enable USB */
72#define USB_ENABLE_ONDIOSTYLE 1 /* with PA5 */
73
74/* The start address index for ROM builds */ 68/* The start address index for ROM builds */
75/* #define ROM_START 0x12010 for behind original Archos */ 69/* #define ROM_START 0x12010 for behind original Archos */
76#define ROM_START 0x7010 /* for behind BootBox */ 70#define ROM_START 0x7010 /* for behind BootBox */
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h
index c461402eb1..580831c861 100644
--- a/firmware/export/config-player.h
+++ b/firmware/export/config-player.h
@@ -74,9 +74,6 @@
74/* Offset ( in the firmware file's header ) to the real data */ 74/* Offset ( in the firmware file's header ) to the real data */
75#define FIRMWARE_OFFSET_FILE_DATA 6 75#define FIRMWARE_OFFSET_FILE_DATA 6
76 76
77/* How to detect USB */
78#define USB_PLAYERSTYLE 1
79
80/* Hardware controlled charging */ 77/* Hardware controlled charging */
81#define CONFIG_CHARGING CHARGING_SIMPLE 78#define CONFIG_CHARGING CHARGING_SIMPLE
82 79
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h
index 3c53055886..d8bd0bed2f 100644
--- a/firmware/export/config-recorder.h
+++ b/firmware/export/config-recorder.h
@@ -86,9 +86,6 @@
86/* Offset ( in the firmware file's header ) to the real data */ 86/* Offset ( in the firmware file's header ) to the real data */
87#define FIRMWARE_OFFSET_FILE_DATA 6 87#define FIRMWARE_OFFSET_FILE_DATA 6
88 88
89/* How to detect USB */
90#define USB_RECORDERSTYLE 1
91
92/* Software controlled charging */ 89/* Software controlled charging */
93#define CONFIG_CHARGING CHARGING_CONTROL 90#define CONFIG_CHARGING CHARGING_CONTROL
94 91
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h
index 1d64f586ac..0e6e00c167 100644
--- a/firmware/export/config-recorderv2.h
+++ b/firmware/export/config-recorderv2.h
@@ -99,9 +99,6 @@
99/* Define this if you have an FM Radio */ 99/* Define this if you have an FM Radio */
100#define CONFIG_TUNER S1A0903X01 100#define CONFIG_TUNER S1A0903X01
101 101
102/* How to detect USB */
103#define USB_FMRECORDERSTYLE 1
104
105/* Hardware controlled charging with monitoring */ 102/* Hardware controlled charging with monitoring */
106#define CONFIG_CHARGING CHARGING_MONITOR 103#define CONFIG_CHARGING CHARGING_MONITOR
107 104
diff --git a/firmware/target/sh/archos/ata-archos.c b/firmware/target/sh/archos/ata-archos.c
index c685700fa3..5ad30d6891 100644
--- a/firmware/target/sh/archos/ata-archos.c
+++ b/firmware/target/sh/archos/ata-archos.c
@@ -29,7 +29,6 @@
29#define ATA_CONTROL2 ((volatile unsigned char*)0x06200306) 29#define ATA_CONTROL2 ((volatile unsigned char*)0x06200306)
30 30
31volatile unsigned char* ata_control; 31volatile unsigned char* ata_control;
32int ata_io_address; /* 0x300 or 0x200 */
33 32
34void ata_reset(void) 33void ata_reset(void)
35{ 34{
@@ -59,15 +58,9 @@ void ata_device_init(void)
59 PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */ 58 PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */
60 59
61 if (read_hw_mask() & ATA_ADDRESS_200) 60 if (read_hw_mask() & ATA_ADDRESS_200)
62 {
63 ata_io_address = 0x200; /* For debug purposes only */
64 ata_control = ATA_CONTROL1; 61 ata_control = ATA_CONTROL1;
65 }
66 else 62 else
67 {
68 ata_io_address = 0x300; /* For debug purposes only */
69 ata_control = ATA_CONTROL2; 63 ata_control = ATA_CONTROL2;
70 }
71} 64}
72 65
73bool ata_is_coldstart(void) 66bool ata_is_coldstart(void)
diff --git a/firmware/target/sh/archos/ata-target.h b/firmware/target/sh/archos/ata-target.h
index 77f1f9d232..91585626c6 100644
--- a/firmware/target/sh/archos/ata-target.h
+++ b/firmware/target/sh/archos/ata-target.h
@@ -64,7 +64,6 @@
64#define SET_16BITREG(reg,val) reg = (val) 64#define SET_16BITREG(reg,val) reg = (val)
65 65
66extern volatile unsigned char* ata_control; 66extern volatile unsigned char* ata_control;
67extern int ata_io_address;
68 67
69void ata_reset(void); 68void ata_reset(void);
70void ata_enable(bool on); 69void ata_enable(bool on);