diff options
Diffstat (limited to 'drivers/ide/legacy/qd65xx.c')
-rw-r--r-- | drivers/ide/legacy/qd65xx.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c index 37534bb483a7..60a6ed1088df 100644 --- a/drivers/ide/legacy/qd65xx.c +++ b/drivers/ide/legacy/qd65xx.c | |||
@@ -308,15 +308,10 @@ static int __init qd_testreg(int port) | |||
308 | static void __init qd_setup(ide_hwif_t *hwif, int base, int config, | 308 | static void __init qd_setup(ide_hwif_t *hwif, int base, int config, |
309 | unsigned int data0, unsigned int data1) | 309 | unsigned int data0, unsigned int data1) |
310 | { | 310 | { |
311 | hwif->chipset = ide_qd65xx; | ||
312 | hwif->channel = hwif->index; | ||
313 | hwif->select_data = base; | 311 | hwif->select_data = base; |
314 | hwif->config_data = config; | 312 | hwif->config_data = config; |
315 | hwif->drives[0].drive_data = data0; | 313 | hwif->drives[0].drive_data = data0; |
316 | hwif->drives[1].drive_data = data1; | 314 | hwif->drives[1].drive_data = data1; |
317 | hwif->drives[0].io_32bit = | ||
318 | hwif->drives[1].io_32bit = 1; | ||
319 | hwif->pio_mask = ATA_PIO4; | ||
320 | } | 315 | } |
321 | 316 | ||
322 | /* | 317 | /* |
@@ -356,6 +351,14 @@ static void __exit qd_unsetup(ide_hwif_t *hwif) | |||
356 | } | 351 | } |
357 | */ | 352 | */ |
358 | 353 | ||
354 | static const struct ide_port_info qd65xx_port_info __initdata = { | ||
355 | .chipset = ide_qd65xx, | ||
356 | .host_flags = IDE_HFLAG_IO_32BIT | | ||
357 | IDE_HFLAG_NO_DMA | | ||
358 | IDE_HFLAG_NO_AUTOTUNE, | ||
359 | .pio_mask = ATA_PIO4, | ||
360 | }; | ||
361 | |||
359 | /* | 362 | /* |
360 | * qd_probe: | 363 | * qd_probe: |
361 | * | 364 | * |
@@ -397,9 +400,9 @@ static int __init qd_probe(int base) | |||
397 | 400 | ||
398 | hwif->set_pio_mode = &qd6500_set_pio_mode; | 401 | hwif->set_pio_mode = &qd6500_set_pio_mode; |
399 | 402 | ||
400 | idx[0] = unit; | 403 | idx[unit] = unit; |
401 | 404 | ||
402 | ide_device_add(idx); | 405 | ide_device_add(idx, &qd65xx_port_info); |
403 | 406 | ||
404 | return 1; | 407 | return 1; |
405 | } | 408 | } |
@@ -431,9 +434,9 @@ static int __init qd_probe(int base) | |||
431 | 434 | ||
432 | hwif->set_pio_mode = &qd6580_set_pio_mode; | 435 | hwif->set_pio_mode = &qd6580_set_pio_mode; |
433 | 436 | ||
434 | idx[0] = unit; | 437 | idx[unit] = unit; |
435 | 438 | ||
436 | ide_device_add(idx); | 439 | ide_device_add(idx, &qd65xx_port_info); |
437 | 440 | ||
438 | outb(QD_DEF_CONTR, QD_CONTROL_PORT); | 441 | outb(QD_DEF_CONTR, QD_CONTROL_PORT); |
439 | 442 | ||
@@ -460,7 +463,7 @@ static int __init qd_probe(int base) | |||
460 | idx[0] = 0; | 463 | idx[0] = 0; |
461 | idx[1] = 1; | 464 | idx[1] = 1; |
462 | 465 | ||
463 | ide_device_add(idx); | 466 | ide_device_add(idx, &qd65xx_port_info); |
464 | 467 | ||
465 | outb(QD_DEF_CONTR, QD_CONTROL_PORT); | 468 | outb(QD_DEF_CONTR, QD_CONTROL_PORT); |
466 | 469 | ||