summaryrefslogtreecommitdiff
path: root/drivers/ide/legacy/ide-4drives.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-18 02:46:35 +0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-18 02:46:35 +0400
commitdfd87842a97e848cb5d62a5249d3f479c5f92c4b (patch)
treebb02496c9cd49a7b864642ee9d0186be0c1f85b6 /drivers/ide/legacy/ide-4drives.c
parente4079df0c273719f539aaa7cc19ed17c9a5b0aba (diff)
downloadlinux-dfd87842a97e848cb5d62a5249d3f479c5f92c4b.tar.xz
ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers
Do explicit port setup in legacy VLB host drivers instead of depending on init_ide_data(). This way hwif->io_ports[] and hwif->irq are always correctly set regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/legacy/ide-4drives.c')
-rw-r--r--drivers/ide/legacy/ide-4drives.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/ide/legacy/ide-4drives.c b/drivers/ide/legacy/ide-4drives.c
index 5aa7e93cfd31..ecd7f3553554 100644
--- a/drivers/ide/legacy/ide-4drives.c
+++ b/drivers/ide/legacy/ide-4drives.c
@@ -13,6 +13,7 @@ static int __init ide_4drives_init(void)
{
ide_hwif_t *hwif, *mate;
u8 idx[4] = { 0, 1, 0xff, 0xff };
+ hw_regs_t hw;
if (probe_4drives == 0)
return -ENODEV;
@@ -20,11 +21,14 @@ static int __init ide_4drives_init(void)
hwif = &ide_hwifs[0];
mate = &ide_hwifs[1];
- memcpy(mate->io_ports, hwif->io_ports, sizeof(hwif->io_ports));
+ memset(&hw, 0, sizeof(hw));
- mate->irq = hwif->irq;
+ ide_std_init_ports(&hw, 0x1f0, 0x3f6);
+ hw.irq = 14;
+ hw.chipset = ide_4drives;
- mate->chipset = hwif->chipset = ide_4drives;
+ ide_init_port_hw(hwif, &hw);
+ ide_init_port_hw(mate, &hw);
mate->drives[0].select.all ^= 0x20;
mate->drives[1].select.all ^= 0x20;