aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/ide-4drives.c
diff options
context:
space:
mode:
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)
13{ 13{
14 ide_hwif_t *hwif, *mate; 14 ide_hwif_t *hwif, *mate;
15 u8 idx[4] = { 0, 1, 0xff, 0xff }; 15 u8 idx[4] = { 0, 1, 0xff, 0xff };
16 hw_regs_t hw;
16 17
17 if (probe_4drives == 0) 18 if (probe_4drives == 0)
18 return -ENODEV; 19 return -ENODEV;
@@ -20,11 +21,14 @@ static int __init ide_4drives_init(void)
20 hwif = &ide_hwifs[0]; 21 hwif = &ide_hwifs[0];
21 mate = &ide_hwifs[1]; 22 mate = &ide_hwifs[1];
22 23
23 memcpy(mate->io_ports, hwif->io_ports, sizeof(hwif->io_ports)); 24 memset(&hw, 0, sizeof(hw));
24 25
25 mate->irq = hwif->irq; 26 ide_std_init_ports(&hw, 0x1f0, 0x3f6);
27 hw.irq = 14;
28 hw.chipset = ide_4drives;
26 29
27 mate->chipset = hwif->chipset = ide_4drives; 30 ide_init_port_hw(hwif, &hw);
31 ide_init_port_hw(mate, &hw);
28 32
29 mate->drives[0].select.all ^= 0x20; 33 mate->drives[0].select.all ^= 0x20;
30 mate->drives[1].select.all ^= 0x20; 34 mate->drives[1].select.all ^= 0x20;