aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_amd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_amd.c')
-rw-r--r--drivers/ata/pata_amd.c191
1 files changed, 22 insertions, 169 deletions
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 90d786dfbec3..b0cb4eaf273c 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -356,204 +356,57 @@ static struct scsi_host_template amd_sht = {
356 ATA_BMDMA_SHT(DRV_NAME), 356 ATA_BMDMA_SHT(DRV_NAME),
357}; 357};
358 358
359static const struct ata_port_operations amd_base_port_ops = {
360 .inherits = &ata_bmdma_port_ops,
361 .error_handler = amd_error_handler,
362};
363
359static struct ata_port_operations amd33_port_ops = { 364static struct ata_port_operations amd33_port_ops = {
365 .inherits = &amd_base_port_ops,
366 .cable_detect = ata_cable_40wire,
360 .set_piomode = amd33_set_piomode, 367 .set_piomode = amd33_set_piomode,
361 .set_dmamode = amd33_set_dmamode, 368 .set_dmamode = amd33_set_dmamode,
362 .mode_filter = ata_pci_default_filter,
363 .tf_load = ata_tf_load,
364 .tf_read = ata_tf_read,
365 .check_status = ata_check_status,
366 .exec_command = ata_exec_command,
367 .dev_select = ata_std_dev_select,
368
369 .freeze = ata_bmdma_freeze,
370 .thaw = ata_bmdma_thaw,
371 .error_handler = amd_error_handler,
372 .post_internal_cmd = ata_bmdma_post_internal_cmd,
373 .cable_detect = ata_cable_40wire,
374
375 .bmdma_setup = ata_bmdma_setup,
376 .bmdma_start = ata_bmdma_start,
377 .bmdma_stop = ata_bmdma_stop,
378 .bmdma_status = ata_bmdma_status,
379
380 .qc_prep = ata_qc_prep,
381 .qc_issue = ata_qc_issue_prot,
382
383 .data_xfer = ata_data_xfer,
384
385 .irq_handler = ata_interrupt,
386 .irq_clear = ata_bmdma_irq_clear,
387 .irq_on = ata_irq_on,
388
389 .port_start = ata_sff_port_start,
390}; 369};
391 370
392static struct ata_port_operations amd66_port_ops = { 371static struct ata_port_operations amd66_port_ops = {
372 .inherits = &amd_base_port_ops,
373 .cable_detect = ata_cable_unknown,
393 .set_piomode = amd66_set_piomode, 374 .set_piomode = amd66_set_piomode,
394 .set_dmamode = amd66_set_dmamode, 375 .set_dmamode = amd66_set_dmamode,
395 .mode_filter = ata_pci_default_filter,
396 .tf_load = ata_tf_load,
397 .tf_read = ata_tf_read,
398 .check_status = ata_check_status,
399 .exec_command = ata_exec_command,
400 .dev_select = ata_std_dev_select,
401
402 .freeze = ata_bmdma_freeze,
403 .thaw = ata_bmdma_thaw,
404 .error_handler = amd_error_handler,
405 .post_internal_cmd = ata_bmdma_post_internal_cmd,
406 .cable_detect = ata_cable_unknown,
407
408 .bmdma_setup = ata_bmdma_setup,
409 .bmdma_start = ata_bmdma_start,
410 .bmdma_stop = ata_bmdma_stop,
411 .bmdma_status = ata_bmdma_status,
412
413 .qc_prep = ata_qc_prep,
414 .qc_issue = ata_qc_issue_prot,
415
416 .data_xfer = ata_data_xfer,
417
418 .irq_handler = ata_interrupt,
419 .irq_clear = ata_bmdma_irq_clear,
420 .irq_on = ata_irq_on,
421
422 .port_start = ata_sff_port_start,
423}; 376};
424 377
425static struct ata_port_operations amd100_port_ops = { 378static struct ata_port_operations amd100_port_ops = {
379 .inherits = &amd_base_port_ops,
380 .cable_detect = ata_cable_unknown,
426 .set_piomode = amd100_set_piomode, 381 .set_piomode = amd100_set_piomode,
427 .set_dmamode = amd100_set_dmamode, 382 .set_dmamode = amd100_set_dmamode,
428 .mode_filter = ata_pci_default_filter,
429 .tf_load = ata_tf_load,
430 .tf_read = ata_tf_read,
431 .check_status = ata_check_status,
432 .exec_command = ata_exec_command,
433 .dev_select = ata_std_dev_select,
434
435 .freeze = ata_bmdma_freeze,
436 .thaw = ata_bmdma_thaw,
437 .error_handler = amd_error_handler,
438 .post_internal_cmd = ata_bmdma_post_internal_cmd,
439 .cable_detect = ata_cable_unknown,
440
441 .bmdma_setup = ata_bmdma_setup,
442 .bmdma_start = ata_bmdma_start,
443 .bmdma_stop = ata_bmdma_stop,
444 .bmdma_status = ata_bmdma_status,
445
446 .qc_prep = ata_qc_prep,
447 .qc_issue = ata_qc_issue_prot,
448
449 .data_xfer = ata_data_xfer,
450
451 .irq_handler = ata_interrupt,
452 .irq_clear = ata_bmdma_irq_clear,
453 .irq_on = ata_irq_on,
454
455 .port_start = ata_sff_port_start,
456}; 383};
457 384
458static struct ata_port_operations amd133_port_ops = { 385static struct ata_port_operations amd133_port_ops = {
386 .inherits = &amd_base_port_ops,
387 .cable_detect = amd_cable_detect,
459 .set_piomode = amd133_set_piomode, 388 .set_piomode = amd133_set_piomode,
460 .set_dmamode = amd133_set_dmamode, 389 .set_dmamode = amd133_set_dmamode,
461 .mode_filter = ata_pci_default_filter, 390};
462 .tf_load = ata_tf_load,
463 .tf_read = ata_tf_read,
464 .check_status = ata_check_status,
465 .exec_command = ata_exec_command,
466 .dev_select = ata_std_dev_select,
467
468 .freeze = ata_bmdma_freeze,
469 .thaw = ata_bmdma_thaw,
470 .error_handler = amd_error_handler,
471 .post_internal_cmd = ata_bmdma_post_internal_cmd,
472 .cable_detect = amd_cable_detect,
473
474 .bmdma_setup = ata_bmdma_setup,
475 .bmdma_start = ata_bmdma_start,
476 .bmdma_stop = ata_bmdma_stop,
477 .bmdma_status = ata_bmdma_status,
478
479 .qc_prep = ata_qc_prep,
480 .qc_issue = ata_qc_issue_prot,
481
482 .data_xfer = ata_data_xfer,
483
484 .irq_handler = ata_interrupt,
485 .irq_clear = ata_bmdma_irq_clear,
486 .irq_on = ata_irq_on,
487 391
488 .port_start = ata_sff_port_start, 392static const struct ata_port_operations nv_base_port_ops = {
393 .inherits = &ata_bmdma_port_ops,
394 .cable_detect = ata_cable_ignore,
395 .mode_filter = nv_mode_filter,
396 .error_handler = nv_error_handler,
397 .host_stop = nv_host_stop,
489}; 398};
490 399
491static struct ata_port_operations nv100_port_ops = { 400static struct ata_port_operations nv100_port_ops = {
401 .inherits = &nv_base_port_ops,
492 .set_piomode = nv100_set_piomode, 402 .set_piomode = nv100_set_piomode,
493 .set_dmamode = nv100_set_dmamode, 403 .set_dmamode = nv100_set_dmamode,
494 .tf_load = ata_tf_load,
495 .tf_read = ata_tf_read,
496 .check_status = ata_check_status,
497 .exec_command = ata_exec_command,
498 .dev_select = ata_std_dev_select,
499
500 .freeze = ata_bmdma_freeze,
501 .thaw = ata_bmdma_thaw,
502 .error_handler = nv_error_handler,
503 .post_internal_cmd = ata_bmdma_post_internal_cmd,
504 .cable_detect = ata_cable_ignore,
505 .mode_filter = nv_mode_filter,
506
507 .bmdma_setup = ata_bmdma_setup,
508 .bmdma_start = ata_bmdma_start,
509 .bmdma_stop = ata_bmdma_stop,
510 .bmdma_status = ata_bmdma_status,
511
512 .qc_prep = ata_qc_prep,
513 .qc_issue = ata_qc_issue_prot,
514
515 .data_xfer = ata_data_xfer,
516
517 .irq_handler = ata_interrupt,
518 .irq_clear = ata_bmdma_irq_clear,
519 .irq_on = ata_irq_on,
520
521 .port_start = ata_sff_port_start,
522 .host_stop = nv_host_stop,
523}; 404};
524 405
525static struct ata_port_operations nv133_port_ops = { 406static struct ata_port_operations nv133_port_ops = {
407 .inherits = &nv_base_port_ops,
526 .set_piomode = nv133_set_piomode, 408 .set_piomode = nv133_set_piomode,
527 .set_dmamode = nv133_set_dmamode, 409 .set_dmamode = nv133_set_dmamode,
528 .tf_load = ata_tf_load,
529 .tf_read = ata_tf_read,
530 .check_status = ata_check_status,
531 .exec_command = ata_exec_command,
532 .dev_select = ata_std_dev_select,
533
534 .freeze = ata_bmdma_freeze,
535 .thaw = ata_bmdma_thaw,
536 .error_handler = nv_error_handler,
537 .post_internal_cmd = ata_bmdma_post_internal_cmd,
538 .cable_detect = ata_cable_ignore,
539 .mode_filter = nv_mode_filter,
540
541 .bmdma_setup = ata_bmdma_setup,
542 .bmdma_start = ata_bmdma_start,
543 .bmdma_stop = ata_bmdma_stop,
544 .bmdma_status = ata_bmdma_status,
545
546 .qc_prep = ata_qc_prep,
547 .qc_issue = ata_qc_issue_prot,
548
549 .data_xfer = ata_data_xfer,
550
551 .irq_handler = ata_interrupt,
552 .irq_clear = ata_bmdma_irq_clear,
553 .irq_on = ata_irq_on,
554
555 .port_start = ata_sff_port_start,
556 .host_stop = nv_host_stop,
557}; 410};
558 411
559static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id) 412static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)