diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-17 18:46:35 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-17 18:46:35 -0400 |
commit | 486c92e2900d618c650a7099536310651aa6cf1b (patch) | |
tree | f78f54a5df2c3f93b73913652b2a7209b2bf11da /drivers/ide/ide-generic.c | |
parent | f01674e459923c6df540e6c983d37e5fc94d43b8 (diff) |
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) | |||
91 | 91 | ||
92 | for (i = 0; i < MAX_HWIFS; i++) { | 92 | for (i = 0; i < MAX_HWIFS; i++) { |
93 | ide_hwif_t *hwif = &ide_hwifs[i]; | 93 | ide_hwif_t *hwif = &ide_hwifs[i]; |
94 | unsigned long io_addr = ide_default_io_base(i); | ||
95 | hw_regs_t hw; | ||
96 | |||
97 | if (hwif->chipset == ide_unknown && io_addr) { | ||
98 | memset(&hw, 0, sizeof(hw)); | ||
99 | ide_std_init_ports(&hw, io_addr, io_addr + 0x206); | ||
100 | hw.irq = ide_init_default_irq(io_addr); | ||
101 | ide_init_port_hw(hwif, &hw); | ||
94 | 102 | ||
95 | if (hwif->io_ports[IDE_DATA_OFFSET] && | ||
96 | hwif->chipset == ide_unknown) | ||
97 | idx[i] = i; | 103 | idx[i] = i; |
98 | else | 104 | } else |
99 | idx[i] = 0xff; | 105 | idx[i] = 0xff; |
100 | } | 106 | } |
101 | 107 | ||