diff options
Diffstat (limited to 'drivers/ide/legacy/qd65xx.c')
-rw-r--r-- | drivers/ide/legacy/qd65xx.c | 19 |
1 files changed, 17 insertions, 2 deletions
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 = { | |||
352 | static int __init qd_probe(int base) | 352 | static 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; |