summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/Kconfig4
-rw-r--r--drivers/ide/ide-generic.c12
-rw-r--r--drivers/ide/ide.c17
3 files changed, 10 insertions, 23 deletions
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index aecc219288d6..87532034d105 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -307,6 +307,7 @@ comment "IDE chipset support/bugfixes"
config IDE_GENERIC
tristate "generic/default IDE chipset support"
+ depends on ALPHA || X86 || IA64 || M32R || MIPS || PPC32
help
If unsure, say N.
@@ -1089,9 +1090,6 @@ config BLK_DEV_IDEDMA
def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \
BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
-config IDE_ARCH_OBSOLETE_DEFAULTS
- def_bool ALPHA || X86 || IA64 || M32R || MIPS || PPC32
-
endif
config BLK_DEV_HD_ONLY
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index bae41459192d..4f996d01587a 100644
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -91,11 +91,17 @@ static int __init ide_generic_init(void)
for (i = 0; i < MAX_HWIFS; i++) {
ide_hwif_t *hwif = &ide_hwifs[i];
+ unsigned long io_addr = ide_default_io_base(i);
+ hw_regs_t hw;
+
+ if (hwif->chipset == ide_unknown && io_addr) {
+ memset(&hw, 0, sizeof(hw));
+ ide_std_init_ports(&hw, io_addr, io_addr + 0x206);
+ hw.irq = ide_init_default_irq(io_addr);
+ ide_init_port_hw(hwif, &hw);
- if (hwif->io_ports[IDE_DATA_OFFSET] &&
- hwif->chipset == ide_unknown)
idx[i] = i;
- else
+ } else
idx[i] = 0xff;
}
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index aa809aded87f..917c72dcd33d 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -165,11 +165,6 @@ static void ide_port_init_devices_data(ide_hwif_t *hwif)
}
}
-#ifndef CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS
-# define ide_default_io_base(index) (0)
-# define ide_init_default_irq(base) (0)
-#endif
-
/*
* init_ide_data() sets reasonable default values into all fields
* of all instances of the hwifs and drives, but only on the first call.
@@ -192,7 +187,6 @@ static void __init init_ide_data (void)
{
unsigned int index;
static unsigned long magic_cookie = MAGIC_COOKIE;
- hw_regs_t hw;
if (magic_cookie != MAGIC_COOKIE)
return; /* already initialized */
@@ -201,19 +195,8 @@ static void __init init_ide_data (void)
/* Initialise all interface structures */
for (index = 0; index < MAX_HWIFS; ++index) {
ide_hwif_t *hwif = &ide_hwifs[index];
- unsigned long io_addr = ide_default_io_base(index);
- unsigned long ctl_addr = io_addr + 0x206;
ide_init_port_data(hwif, index);
-
-#ifdef CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS
- memset(&hw, 0, sizeof(hw));
- ide_std_init_ports(&hw, io_addr, ctl_addr);
- memcpy(hwif->io_ports, hw.io_ports, sizeof(hw.io_ports));
- hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
- hwif->irq =
- ide_init_default_irq(hwif->io_ports[IDE_DATA_OFFSET]);
-#endif
}
}