diff options
author | Stefan Roese <sr@denx.de> | 2007-04-12 14:06:54 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2007-04-12 14:06:54 +0200 |
commit | e8aac8e7bfc7cfdef5780f8f1d4c85184f59a06f (patch) | |
tree | 1a1ad4bb5f527d162154accd2a3b950956df7aeb /common/cmd_ide.c | |
parent | a65c5768e5537530bd1780af3d3fddc3113a163c (diff) | |
parent | 6c9ba919375db977aaad9146bf320c7afd07ae7a (diff) | |
download | u-boot-imx-e8aac8e7bfc7cfdef5780f8f1d4c85184f59a06f.zip u-boot-imx-e8aac8e7bfc7cfdef5780f8f1d4c85184f59a06f.tar.gz u-boot-imx-e8aac8e7bfc7cfdef5780f8f1d4c85184f59a06f.tar.bz2 |
Merge with git://www.denx.de/git/u-boot.git
Diffstat (limited to 'common/cmd_ide.c')
-rw-r--r-- | common/cmd_ide.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 2e185cc..b4119f3 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -513,9 +513,11 @@ void ide_init (void) #endif unsigned char c; int i, bus; +#if defined(CONFIG_AMIGAONEG3SE) || defined(CONFIG_SC3) + unsigned int ata_reset_time; +#endif #ifdef CONFIG_AMIGAONEG3SE unsigned int max_bus_scan; - unsigned int ata_reset_time; char *s; #endif #ifdef CONFIG_IDE_8xx_PCCARD @@ -617,10 +619,9 @@ void ide_init (void) udelay (100000); /* 100 ms */ ide_outb (dev, ATA_DEV_HD, ATA_LBA | ATA_DEVICE(dev)); udelay (100000); /* 100 ms */ -#ifdef CONFIG_AMIGAONEG3SE - ata_reset_time = ATA_RESET_TIME; - s = getenv("ide_reset_timeout"); - if (s) ata_reset_time = 2*simple_strtol(s, NULL, 10); +#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 { @@ -628,7 +629,7 @@ void ide_init (void) c = ide_inb (dev, ATA_STATUS); i++; -#ifdef CONFIG_AMIGAONEG3SE +#if defined(CONFIG_AMIGAONEG3SE) || defined(CONFIG_SC3) if (i > (ata_reset_time * 100)) { #else if (i > (ATA_RESET_TIME * 100)) { |