aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/legacy/ali14xx.c12
-rw-r--r--drivers/ide/legacy/dtc2278.c12
-rw-r--r--drivers/ide/legacy/ht6560b.c12
-rw-r--r--drivers/ide/legacy/ide-4drives.c10
-rw-r--r--drivers/ide/legacy/qd65xx.c19
-rw-r--r--drivers/ide/legacy/umc8672.c12
6 files changed, 72 insertions, 5 deletions
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c
index d4d1a6bea599..bc8b1f8de614 100644
--- a/drivers/ide/legacy/ali14xx.c
+++ b/drivers/ide/legacy/ali14xx.c
@@ -200,6 +200,7 @@ static const struct ide_port_info ali14xx_port_info = {
200static int __init ali14xx_probe(void) 200static int __init ali14xx_probe(void)
201{ 201{
202 static u8 idx[4] = { 0, 1, 0xff, 0xff }; 202 static u8 idx[4] = { 0, 1, 0xff, 0xff };
203 hw_regs_t hw[2];
203 204
204 printk(KERN_DEBUG "ali14xx: base=0x%03x, regOn=0x%02x.\n", 205 printk(KERN_DEBUG "ali14xx: base=0x%03x, regOn=0x%02x.\n",
205 basePort, regOn); 206 basePort, regOn);
@@ -210,6 +211,17 @@ static int __init ali14xx_probe(void)
210 return 1; 211 return 1;
211 } 212 }
212 213
214 memset(&hw, 0, sizeof(hw));
215
216 ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
217 hw[0].irq = 14;
218
219 ide_std_init_ports(&hw[1], 0x170, 0x376);
220 hw[1].irq = 15;
221
222 ide_init_port_hw(&ide_hwifs[0], &hw[0]);
223 ide_init_port_hw(&ide_hwifs[1], &hw[1]);
224
213 ide_hwifs[0].set_pio_mode = &ali14xx_set_pio_mode; 225 ide_hwifs[0].set_pio_mode = &ali14xx_set_pio_mode;
214 ide_hwifs[1].set_pio_mode = &ali14xx_set_pio_mode; 226 ide_hwifs[1].set_pio_mode = &ali14xx_set_pio_mode;
215 227
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c
index 73396f70f2b7..5f69cd2ea6f7 100644
--- a/drivers/ide/legacy/dtc2278.c
+++ b/drivers/ide/legacy/dtc2278.c
@@ -103,6 +103,7 @@ static int __init dtc2278_probe(void)
103 unsigned long flags; 103 unsigned long flags;
104 ide_hwif_t *hwif, *mate; 104 ide_hwif_t *hwif, *mate;
105 static u8 idx[4] = { 0, 1, 0xff, 0xff }; 105 static u8 idx[4] = { 0, 1, 0xff, 0xff };
106 hw_regs_t hw[2];
106 107
107 hwif = &ide_hwifs[0]; 108 hwif = &ide_hwifs[0];
108 mate = &ide_hwifs[1]; 109 mate = &ide_hwifs[1];
@@ -128,6 +129,17 @@ static int __init dtc2278_probe(void)
128#endif 129#endif
129 local_irq_restore(flags); 130 local_irq_restore(flags);
130 131
132 memset(&hw, 0, sizeof(hw));
133
134 ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
135 hw[0].irq = 14;
136
137 ide_std_init_ports(&hw[1], 0x170, 0x376);
138 hw[1].irq = 15;
139
140 ide_init_port_hw(hwif, &hw[0]);
141 ide_init_port_hw(mate, &hw[1]);
142
131 hwif->set_pio_mode = &dtc2278_set_pio_mode; 143 hwif->set_pio_mode = &dtc2278_set_pio_mode;
132 144
133 ide_device_add(idx, &dtc2278_port_info); 145 ide_device_add(idx, &dtc2278_port_info);
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c
index 314e6c6aeb6c..88fe9070c9c3 100644
--- a/drivers/ide/legacy/ht6560b.c
+++ b/drivers/ide/legacy/ht6560b.c
@@ -340,6 +340,7 @@ static int __init ht6560b_init(void)
340{ 340{
341 ide_hwif_t *hwif, *mate; 341 ide_hwif_t *hwif, *mate;
342 static u8 idx[4] = { 0, 1, 0xff, 0xff }; 342 static u8 idx[4] = { 0, 1, 0xff, 0xff };
343 hw_regs_t hw[2];
343 344
344 if (probe_ht6560b == 0) 345 if (probe_ht6560b == 0)
345 return -ENODEV; 346 return -ENODEV;
@@ -358,6 +359,17 @@ static int __init ht6560b_init(void)
358 goto release_region; 359 goto release_region;
359 } 360 }
360 361
362 memset(&hw, 0, sizeof(hw));
363
364 ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
365 hw[0].irq = 14;
366
367 ide_std_init_ports(&hw[1], 0x170, 0x376);
368 hw[1].irq = 15;
369
370 ide_init_port_hw(hwif, &hw[0]);
371 ide_init_port_hw(mate, &hw[1]);
372
361 hwif->selectproc = &ht6560b_selectproc; 373 hwif->selectproc = &ht6560b_selectproc;
362 hwif->set_pio_mode = &ht6560b_set_pio_mode; 374 hwif->set_pio_mode = &ht6560b_set_pio_mode;
363 375
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;
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c
index 2f4f47ad602f..7016bdf4fcc1 100644
--- a/drivers/ide/legacy/qd65xx.c
+++ b/drivers/ide/legacy/qd65xx.c
@@ -352,9 +352,9 @@ static const struct ide_port_info qd65xx_port_info __initdata = {
352static int __init qd_probe(int base) 352static int __init qd_probe(int base)
353{ 353{
354 ide_hwif_t *hwif; 354 ide_hwif_t *hwif;
355 u8 config, unit;
355 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; 356 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
356 u8 config; 357 hw_regs_t hw[2];
357 u8 unit;
358 358
359 config = inb(QD_CONFIG_PORT); 359 config = inb(QD_CONFIG_PORT);
360 360
@@ -363,6 +363,14 @@ static int __init qd_probe(int base)
363 363
364 unit = ! (config & QD_CONFIG_IDE_BASEPORT); 364 unit = ! (config & QD_CONFIG_IDE_BASEPORT);
365 365
366 memset(&hw, 0, sizeof(hw));
367
368 ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
369 hw[0].irq = 14;
370
371 ide_std_init_ports(&hw[1], 0x170, 0x376);
372 hw[1].irq = 15;
373
366 if ((config & 0xf0) == QD_CONFIG_QD6500) { 374 if ((config & 0xf0) == QD_CONFIG_QD6500) {
367 375
368 if (qd_testreg(base)) return 1; /* bad register */ 376 if (qd_testreg(base)) return 1; /* bad register */
@@ -379,6 +387,8 @@ static int __init qd_probe(int base)
379 return 1; 387 return 1;
380 } 388 }
381 389
390 ide_init_port_hw(hwif, &hw[unit]);
391
382 qd_setup(hwif, base, config); 392 qd_setup(hwif, base, config);
383 393
384 hwif->port_init_devs = qd6500_port_init_devs; 394 hwif->port_init_devs = qd6500_port_init_devs;
@@ -416,6 +426,8 @@ static int __init qd_probe(int base)
416 printk(KERN_INFO "%s: qd6580: single IDE board\n", 426 printk(KERN_INFO "%s: qd6580: single IDE board\n",
417 hwif->name); 427 hwif->name);
418 428
429 ide_init_port_hw(hwif, &hw[unit]);
430
419 qd_setup(hwif, base, config | (control << 8)); 431 qd_setup(hwif, base, config | (control << 8));
420 432
421 hwif->port_init_devs = qd6580_port_init_devs; 433 hwif->port_init_devs = qd6580_port_init_devs;
@@ -435,6 +447,9 @@ static int __init qd_probe(int base)
435 printk(KERN_INFO "%s&%s: qd6580: dual IDE board\n", 447 printk(KERN_INFO "%s&%s: qd6580: dual IDE board\n",
436 hwif->name, mate->name); 448 hwif->name, mate->name);
437 449
450 ide_init_port_hw(hwif, &hw[0]);
451 ide_init_port_hw(mate, &hw[1]);
452
438 qd_setup(hwif, base, config | (control << 8)); 453 qd_setup(hwif, base, config | (control << 8));
439 454
440 hwif->port_init_devs = qd6580_port_init_devs; 455 hwif->port_init_devs = qd6580_port_init_devs;
diff --git a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c
index 5696ba026005..bc1944811b99 100644
--- a/drivers/ide/legacy/umc8672.c
+++ b/drivers/ide/legacy/umc8672.c
@@ -130,6 +130,7 @@ static int __init umc8672_probe(void)
130{ 130{
131 unsigned long flags; 131 unsigned long flags;
132 static u8 idx[4] = { 0, 1, 0xff, 0xff }; 132 static u8 idx[4] = { 0, 1, 0xff, 0xff };
133 hw_regs_t hw[2];
133 134
134 if (!request_region(0x108, 2, "umc8672")) { 135 if (!request_region(0x108, 2, "umc8672")) {
135 printk(KERN_ERR "umc8672: ports 0x108-0x109 already in use.\n"); 136 printk(KERN_ERR "umc8672: ports 0x108-0x109 already in use.\n");
@@ -148,6 +149,17 @@ static int __init umc8672_probe(void)
148 umc_set_speeds (current_speeds); 149 umc_set_speeds (current_speeds);
149 local_irq_restore(flags); 150 local_irq_restore(flags);
150 151
152 memset(&hw, 0, sizeof(hw));
153
154 ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
155 hw[0].irq = 14;
156
157 ide_std_init_ports(&hw[1], 0x170, 0x376);
158 hw[1].irq = 15;
159
160 ide_init_port_hw(&ide_hwifs[0], &hw[0]);
161 ide_init_port_hw(&ide_hwifs[1], &hw[1]);
162
151 ide_hwifs[0].set_pio_mode = &umc_set_pio_mode; 163 ide_hwifs[0].set_pio_mode = &umc_set_pio_mode;
152 ide_hwifs[1].set_pio_mode = &umc_set_pio_mode; 164 ide_hwifs[1].set_pio_mode = &umc_set_pio_mode;
153 165