summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-generic.c')
-rw-r--r--drivers/ide/ide-generic.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index bae4145..4f996d0 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;
}
OpenPOWER on IntegriCloud