aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/qd65xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/legacy/qd65xx.c')
-rw-r--r--drivers/ide/legacy/qd65xx.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c
index 0c81d2d0b941..85104bc79a1d 100644
--- a/drivers/ide/legacy/qd65xx.c
+++ b/drivers/ide/legacy/qd65xx.c
@@ -389,6 +389,7 @@ static void __exit qd_unsetup(ide_hwif_t *hwif)
389static int __init qd_probe(int base) 389static int __init qd_probe(int base)
390{ 390{
391 ide_hwif_t *hwif; 391 ide_hwif_t *hwif;
392 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
392 u8 config; 393 u8 config;
393 u8 unit; 394 u8 unit;
394 395
@@ -419,9 +420,9 @@ static int __init qd_probe(int base)
419 420
420 hwif->set_pio_mode = &qd6500_set_pio_mode; 421 hwif->set_pio_mode = &qd6500_set_pio_mode;
421 422
422 probe_hwif_init(hwif); 423 idx[0] = unit;
423 424
424 ide_proc_register_port(hwif); 425 ide_device_add(idx);
425 426
426 return 1; 427 return 1;
427 } 428 }
@@ -453,11 +454,11 @@ static int __init qd_probe(int base)
453 454
454 hwif->set_pio_mode = &qd6580_set_pio_mode; 455 hwif->set_pio_mode = &qd6580_set_pio_mode;
455 456
456 probe_hwif_init(hwif); 457 idx[0] = unit;
457 458
458 qd_write_reg(QD_DEF_CONTR,QD_CONTROL_PORT); 459 ide_device_add(idx);
459 460
460 ide_proc_register_port(hwif); 461 qd_write_reg(QD_DEF_CONTR, QD_CONTROL_PORT);
461 462
462 return 1; 463 return 1;
463 } else { 464 } else {
@@ -474,19 +475,17 @@ static int __init qd_probe(int base)
474 475
475 hwif->set_pio_mode = &qd6580_set_pio_mode; 476 hwif->set_pio_mode = &qd6580_set_pio_mode;
476 477
477 probe_hwif_init(hwif);
478
479 qd_setup(mate, base, config | (control << 8), 478 qd_setup(mate, base, config | (control << 8),
480 QD6580_DEF_DATA2, QD6580_DEF_DATA2); 479 QD6580_DEF_DATA2, QD6580_DEF_DATA2);
481 480
482 mate->set_pio_mode = &qd6580_set_pio_mode; 481 mate->set_pio_mode = &qd6580_set_pio_mode;
483 482
484 probe_hwif_init(mate); 483 idx[0] = 0;
484 idx[1] = 1;
485 485
486 qd_write_reg(QD_DEF_CONTR,QD_CONTROL_PORT); 486 ide_device_add(idx);
487 487
488 ide_proc_register_port(hwif); 488 qd_write_reg(QD_DEF_CONTR, QD_CONTROL_PORT);
489 ide_proc_register_port(mate);
490 489
491 return 0; /* no other qd65xx possible */ 490 return 0; /* no other qd65xx possible */
492 } 491 }