summaryrefslogtreecommitdiff
path: root/common/cmd_ide.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-06-13 18:28:54 +0200
committerWolfgang Denk <wd@denx.de>2010-06-23 23:24:20 +0200
commit953b7e629198fe2eb0adf272fb9140f2a4a51826 (patch)
tree1ed75dbbc88088c96b477286bc37da31ce0b1a47 /common/cmd_ide.c
parentee80fa7b6e96a43d4270700cddc884e00cdd99fd (diff)
downloadu-boot-imx-953b7e629198fe2eb0adf272fb9140f2a4a51826.zip
u-boot-imx-953b7e629198fe2eb0adf272fb9140f2a4a51826.tar.gz
u-boot-imx-953b7e629198fe2eb0adf272fb9140f2a4a51826.tar.bz2
Remove AmigaOneG3SE board
The AmigaOneG3SE board has been orphaned or a very long time, and broken for more than 12 releases resp. more than 3 years. As nobody seems to be interested any more in this stuff we may as well ged rid of it, especially as it clutters many areas of the code so it is a continuous pain for all kinds of ongoing work. Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'common/cmd_ide.c')
-rw-r--r--common/cmd_ide.c106
1 files changed, 6 insertions, 100 deletions
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index 093ca9f..8bd8920 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -119,31 +119,22 @@ ulong ide_bus_offset[CONFIG_SYS_IDE_MAXBUS] = {
};
-#ifndef CONFIG_AMIGAONEG3SE
static int ide_bus_ok[CONFIG_SYS_IDE_MAXBUS];
-#else
-static int ide_bus_ok[CONFIG_SYS_IDE_MAXBUS] = {0,};
-#endif
block_dev_desc_t ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
/* ------------------------------------------------------------------------- */
#ifdef CONFIG_IDE_LED
-#if !defined(CONFIG_KUP4K) && !defined(CONFIG_KUP4X) &&!defined(CONFIG_BMS2003) &&!defined(CONFIG_CPC45)
+# if !defined(CONFIG_BMS2003) && \
+ !defined(CONFIG_CPC45) && \
+ !defined(CONFIG_KUP4K) && \
+ !defined(CONFIG_KUP4X)
static void ide_led (uchar led, uchar status);
#else
extern void ide_led (uchar led, uchar status);
#endif
#else
-#ifndef CONFIG_AMIGAONEG3SE
#define ide_led(a,b) /* dummy */
-#else
-extern void ide_led(uchar led, uchar status);
-#define LED_IDE1 1
-#define LED_IDE2 2
-#define CONFIG_IDE_LED 1
-#define DEVICE_LED(x) 1
-#endif
#endif
#ifdef CONFIG_IDE_RESET
@@ -562,13 +553,10 @@ void ide_init (void)
#endif
unsigned char c;
int i, bus;
-#if defined(CONFIG_AMIGAONEG3SE) || defined(CONFIG_SC3)
+#if defined(CONFIG_SC3)
unsigned int ata_reset_time = ATA_RESET_TIME;
char *s;
#endif
-#ifdef CONFIG_AMIGAONEG3SE
- unsigned int max_bus_scan;
-#endif
#ifdef CONFIG_IDE_8xx_PCCARD
extern int pcmcia_on (void);
extern int ide_devices_found; /* Initialized in check_ide_device() */
@@ -638,19 +626,8 @@ void ide_init (void)
* Wait for IDE to get ready.
* According to spec, this can take up to 31 seconds!
*/
-#ifndef CONFIG_AMIGAONEG3SE
for (bus=0; bus<CONFIG_SYS_IDE_MAXBUS; ++bus) {
int dev = bus * (CONFIG_SYS_IDE_MAXDEVICE / CONFIG_SYS_IDE_MAXBUS);
-#else
- s = getenv("ide_maxbus");
- if (s)
- max_bus_scan = simple_strtol(s, NULL, 10);
- else
- max_bus_scan = CONFIG_SYS_IDE_MAXBUS;
-
- for (bus=0; bus<max_bus_scan; ++bus) {
- int dev = bus * (CONFIG_SYS_IDE_MAXDEVICE / max_bus_scan);
-#endif
#ifdef CONFIG_IDE_8xx_PCCARD
/* Skip non-ide devices from probing */
@@ -668,30 +645,19 @@ void ide_init (void)
udelay (100000); /* 100 ms */
ide_outb (dev, ATA_DEV_HD, ATA_LBA | ATA_DEVICE(dev));
udelay (100000); /* 100 ms */
-#if defined(CONFIG_AMIGAONEG3SE) || defined(CONFIG_SC3)
- if ((s = getenv("ide_reset_timeout")) != NULL)
- ata_reset_time = simple_strtol(s, NULL, 10);
-#endif
i = 0;
do {
udelay (10000); /* 10 ms */
c = ide_inb (dev, ATA_STATUS);
i++;
-#if defined(CONFIG_AMIGAONEG3SE) || defined(CONFIG_SC3)
+#if defined(CONFIG_SC3)
if (i > (ata_reset_time * 100)) {
#else
if (i > (ATA_RESET_TIME * 100)) {
#endif
puts ("** Timeout **\n");
ide_led ((LED_IDE1 | LED_IDE2), 0); /* LED's off */
-#ifdef CONFIG_AMIGAONEG3SE
- /* If this is the second bus, the first one was OK */
- if (bus != 0) {
- ide_bus_ok[bus] = 0;
- goto skip_bus;
- }
-#endif
return;
}
if ((i >= 100) && ((i%100)==0)) {
@@ -714,9 +680,6 @@ void ide_init (void)
WATCHDOG_RESET();
}
-#ifdef CONFIG_AMIGAONEG3SE
- skip_bus:
-#endif
putc ('\n');
ide_led ((LED_IDE1 | LED_IDE2), 0); /* LED's off */
@@ -1010,10 +973,6 @@ static void ide_ident (block_dev_desc_t *dev_desc)
unsigned char c;
hd_driveid_t *iop = (hd_driveid_t *)iobuf;
-#ifdef CONFIG_AMIGAONEG3SE
- int max_bus_scan;
- char *s;
-#endif
#ifdef CONFIG_ATAPI
int retries = 0;
int do_retry = 0;
@@ -1030,19 +989,6 @@ static void ide_ident (block_dev_desc_t *dev_desc)
device=dev_desc->dev;
printf (" Device %d: ", device);
-#ifdef CONFIG_AMIGAONEG3SE
- s = getenv("ide_maxbus");
- if (s) {
- max_bus_scan = simple_strtol(s, NULL, 10);
- } else {
- max_bus_scan = CONFIG_SYS_IDE_MAXBUS;
- }
- if (device >= max_bus_scan*2) {
- dev_desc->type=DEV_TYPE_UNKNOWN;
- return;
- }
-#endif
-
ide_led (DEVICE_LED(device), 1); /* LED on */
/* Select device
*/
@@ -1086,10 +1032,6 @@ static void ide_ident (block_dev_desc_t *dev_desc)
if (((c & ATA_STAT_DRQ) == 0) ||
((c & (ATA_STAT_FAULT|ATA_STAT_ERR)) != 0) ) {
#ifdef CONFIG_ATAPI
-#ifdef CONFIG_AMIGAONEG3SE
- s = getenv("ide_doreset");
- if (s && strcmp(s, "on") == 0)
-#endif
{
/* Need to soft reset the device in case it's an ATAPI... */
debug ("Retrying...\n");
@@ -1601,7 +1543,6 @@ static void ide_reset (void)
/* ------------------------------------------------------------------------- */
#if defined(CONFIG_IDE_LED) && \
- !defined(CONFIG_AMIGAONEG3SE)&& \
!defined(CONFIG_CPC45) && \
!defined(CONFIG_HMI10) && \
!defined(CONFIG_KUP4K) && \
@@ -1758,9 +1699,6 @@ unsigned char atapi_issue(int device,unsigned char* ccb,int ccblen, unsigned cha
*/
mask = ATA_STAT_BUSY|ATA_STAT_DRQ;
res = 0;
-#ifdef CONFIG_AMIGAONEG3SE
-# warning THF: Removed LBA mode ???
-#endif
ide_outb (device, ATA_DEV_HD, ATA_LBA | ATA_DEVICE(device));
c = atapi_wait_mask(device,ATAPI_TIME_OUT,mask,res);
if ((c & mask) != res) {
@@ -1774,9 +1712,6 @@ unsigned char atapi_issue(int device,unsigned char* ccb,int ccblen, unsigned cha
ide_outb (device, ATA_SECT_NUM, 0);
ide_outb (device, ATA_CYL_LOW, (unsigned char)(buflen & 0xFF));
ide_outb (device, ATA_CYL_HIGH, (unsigned char)((buflen>>8) & 0xFF));
-#ifdef CONFIG_AMIGAONEG3SE
-# warning THF: Removed LBA mode ???
-#endif
ide_outb (device, ATA_DEV_HD, ATA_LBA | ATA_DEVICE(device));
ide_outb (device, ATA_COMMAND, ATAPI_CMD_PACKET);
@@ -1875,16 +1810,6 @@ unsigned char atapi_issue_autoreq (int device,
unsigned char res,key,asc,ascq;
int notready,unitattn;
-#ifdef CONFIG_AMIGAONEG3SE
- char *s;
- unsigned int timeout, retrycnt;
-
- s = getenv("ide_cd_timeout");
- timeout = s ? (simple_strtol(s, NULL, 10)*1000000)/5 : 0;
-
- retrycnt = 0;
-#endif
-
unitattn=ATAPI_UNIT_ATTN;
notready=ATAPI_DRIVE_NOT_READY;
@@ -1939,25 +1864,6 @@ retry:
goto error;
}
-#ifdef CONFIG_AMIGAONEG3SE
- if ((sense_data[2]&0xF)==0x0B) {
- debug ("ABORTED COMMAND...retry\n");
- if (retrycnt++ < 4)
- goto retry;
- return (0xFF);
- }
-
- if ((sense_data[2]&0xf) == 0x02 &&
- sense_data[12] == 0x04 &&
- sense_data[13] == 0x01 ) {
- debug ("Waiting for unit to become active\n");
- udelay(timeout);
- if (retrycnt++ < 4)
- goto retry;
- return 0xFF;
- }
-#endif /* CONFIG_AMIGAONEG3SE */
-
printf ("ERROR: Unknown Sense key %02X ASC %02X ASCQ %02X\n",key,asc,ascq);
error:
debug ("ERROR Sense key %02X ASC %02X ASCQ %02X\n",key,asc,ascq);