diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-18 00:46:35 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-18 00:46:35 +0200 |
commit | 486c92e2900d618c650a7099536310651aa6cf1b (patch) | |
tree | f78f54a5df2c3f93b73913652b2a7209b2bf11da /drivers/ide/ide-generic.c | |
parent | ide: remove obsoleted "idex=noprobe" kernel parameter (take 2) (diff) | |
download | linux-486c92e2900d618c650a7099536310651aa6cf1b.tar.xz linux-486c92e2900d618c650a7099536310651aa6cf1b.zip |
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 <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-generic.c')
-rw-r--r-- | drivers/ide/ide-generic.c | 12 |
1 files changed, 9 insertions, 3 deletions
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; } |