From 486c92e2900d618c650a7099536310651aa6cf1b Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Fri, 18 Apr 2008 00:46:35 +0200 Subject: ide: move default IDE ports setup to ide_generic host driver * Make CONFIG_IDE_GENERIC depended on CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS. * Move default IDE ports setup from init_ide_data() to ide_generic. * Use ide_init_port_hw() in ide_generic. * Remove no longer needed CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/ide-generic.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'drivers/ide/ide-generic.c') 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; } -- cgit v1.2.1