diff options
Diffstat (limited to 'drivers/ata/sata_nv.c')
-rw-r--r-- | drivers/ata/sata_nv.c | 113 |
1 files changed, 18 insertions, 95 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 9e2b4cef48f2..7b7ba0e26903 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
@@ -404,106 +404,41 @@ static struct scsi_host_template nv_swncq_sht = { | |||
404 | .slave_configure = nv_swncq_slave_config, | 404 | .slave_configure = nv_swncq_slave_config, |
405 | }; | 405 | }; |
406 | 406 | ||
407 | static const struct ata_port_operations nv_generic_ops = { | 407 | static struct ata_port_operations nv_generic_ops = { |
408 | .tf_load = ata_tf_load, | 408 | .inherits = &ata_bmdma_port_ops, |
409 | .tf_read = ata_tf_read, | ||
410 | .exec_command = ata_exec_command, | ||
411 | .check_status = ata_check_status, | ||
412 | .dev_select = ata_std_dev_select, | ||
413 | .bmdma_setup = ata_bmdma_setup, | ||
414 | .bmdma_start = ata_bmdma_start, | ||
415 | .bmdma_stop = ata_bmdma_stop, | ||
416 | .bmdma_status = ata_bmdma_status, | ||
417 | .qc_prep = ata_qc_prep, | ||
418 | .qc_issue = ata_qc_issue_prot, | ||
419 | .mode_filter = ata_pci_default_filter, | ||
420 | .freeze = ata_bmdma_freeze, | ||
421 | .thaw = ata_bmdma_thaw, | ||
422 | .error_handler = nv_error_handler, | 409 | .error_handler = nv_error_handler, |
423 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
424 | .data_xfer = ata_data_xfer, | ||
425 | .irq_clear = ata_bmdma_irq_clear, | ||
426 | .irq_on = ata_irq_on, | ||
427 | .scr_read = nv_scr_read, | 410 | .scr_read = nv_scr_read, |
428 | .scr_write = nv_scr_write, | 411 | .scr_write = nv_scr_write, |
429 | .port_start = ata_sff_port_start, | ||
430 | }; | 412 | }; |
431 | 413 | ||
432 | static const struct ata_port_operations nv_nf2_ops = { | 414 | static struct ata_port_operations nv_nf2_ops = { |
433 | .tf_load = ata_tf_load, | 415 | .inherits = &nv_generic_ops, |
434 | .tf_read = ata_tf_read, | ||
435 | .exec_command = ata_exec_command, | ||
436 | .check_status = ata_check_status, | ||
437 | .dev_select = ata_std_dev_select, | ||
438 | .bmdma_setup = ata_bmdma_setup, | ||
439 | .bmdma_start = ata_bmdma_start, | ||
440 | .bmdma_stop = ata_bmdma_stop, | ||
441 | .bmdma_status = ata_bmdma_status, | ||
442 | .qc_prep = ata_qc_prep, | ||
443 | .qc_issue = ata_qc_issue_prot, | ||
444 | .mode_filter = ata_pci_default_filter, | ||
445 | .freeze = nv_nf2_freeze, | 416 | .freeze = nv_nf2_freeze, |
446 | .thaw = nv_nf2_thaw, | 417 | .thaw = nv_nf2_thaw, |
447 | .error_handler = nv_error_handler, | ||
448 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
449 | .data_xfer = ata_data_xfer, | ||
450 | .irq_clear = ata_bmdma_irq_clear, | ||
451 | .irq_on = ata_irq_on, | ||
452 | .scr_read = nv_scr_read, | ||
453 | .scr_write = nv_scr_write, | ||
454 | .port_start = ata_sff_port_start, | ||
455 | }; | 418 | }; |
456 | 419 | ||
457 | static const struct ata_port_operations nv_ck804_ops = { | 420 | static struct ata_port_operations nv_ck804_ops = { |
458 | .tf_load = ata_tf_load, | 421 | .inherits = &nv_generic_ops, |
459 | .tf_read = ata_tf_read, | ||
460 | .exec_command = ata_exec_command, | ||
461 | .check_status = ata_check_status, | ||
462 | .dev_select = ata_std_dev_select, | ||
463 | .bmdma_setup = ata_bmdma_setup, | ||
464 | .bmdma_start = ata_bmdma_start, | ||
465 | .bmdma_stop = ata_bmdma_stop, | ||
466 | .bmdma_status = ata_bmdma_status, | ||
467 | .qc_prep = ata_qc_prep, | ||
468 | .qc_issue = ata_qc_issue_prot, | ||
469 | .mode_filter = ata_pci_default_filter, | ||
470 | .freeze = nv_ck804_freeze, | 422 | .freeze = nv_ck804_freeze, |
471 | .thaw = nv_ck804_thaw, | 423 | .thaw = nv_ck804_thaw, |
472 | .error_handler = nv_error_handler, | ||
473 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
474 | .data_xfer = ata_data_xfer, | ||
475 | .irq_clear = ata_bmdma_irq_clear, | ||
476 | .irq_on = ata_irq_on, | ||
477 | .scr_read = nv_scr_read, | ||
478 | .scr_write = nv_scr_write, | ||
479 | .port_start = ata_sff_port_start, | ||
480 | .host_stop = nv_ck804_host_stop, | 424 | .host_stop = nv_ck804_host_stop, |
481 | }; | 425 | }; |
482 | 426 | ||
483 | static const struct ata_port_operations nv_adma_ops = { | 427 | static struct ata_port_operations nv_adma_ops = { |
484 | .tf_load = ata_tf_load, | 428 | .inherits = &nv_generic_ops, |
485 | .tf_read = nv_adma_tf_read, | 429 | |
486 | .check_atapi_dma = nv_adma_check_atapi_dma, | 430 | .check_atapi_dma = nv_adma_check_atapi_dma, |
487 | .exec_command = ata_exec_command, | 431 | .tf_read = nv_adma_tf_read, |
488 | .check_status = ata_check_status, | ||
489 | .dev_select = ata_std_dev_select, | ||
490 | .bmdma_setup = ata_bmdma_setup, | ||
491 | .bmdma_start = ata_bmdma_start, | ||
492 | .bmdma_stop = ata_bmdma_stop, | ||
493 | .bmdma_status = ata_bmdma_status, | ||
494 | .qc_defer = ata_std_qc_defer, | 432 | .qc_defer = ata_std_qc_defer, |
495 | .qc_prep = nv_adma_qc_prep, | 433 | .qc_prep = nv_adma_qc_prep, |
496 | .qc_issue = nv_adma_qc_issue, | 434 | .qc_issue = nv_adma_qc_issue, |
497 | .mode_filter = ata_pci_default_filter, | 435 | .irq_clear = nv_adma_irq_clear, |
436 | |||
498 | .freeze = nv_adma_freeze, | 437 | .freeze = nv_adma_freeze, |
499 | .thaw = nv_adma_thaw, | 438 | .thaw = nv_adma_thaw, |
500 | .error_handler = nv_adma_error_handler, | 439 | .error_handler = nv_adma_error_handler, |
501 | .post_internal_cmd = nv_adma_post_internal_cmd, | 440 | .post_internal_cmd = nv_adma_post_internal_cmd, |
502 | .data_xfer = ata_data_xfer, | 441 | |
503 | .irq_clear = nv_adma_irq_clear, | ||
504 | .irq_on = ata_irq_on, | ||
505 | .scr_read = nv_scr_read, | ||
506 | .scr_write = nv_scr_write, | ||
507 | .port_start = nv_adma_port_start, | 442 | .port_start = nv_adma_port_start, |
508 | .port_stop = nv_adma_port_stop, | 443 | .port_stop = nv_adma_port_stop, |
509 | #ifdef CONFIG_PM | 444 | #ifdef CONFIG_PM |
@@ -513,29 +448,17 @@ static const struct ata_port_operations nv_adma_ops = { | |||
513 | .host_stop = nv_adma_host_stop, | 448 | .host_stop = nv_adma_host_stop, |
514 | }; | 449 | }; |
515 | 450 | ||
516 | static const struct ata_port_operations nv_swncq_ops = { | 451 | static struct ata_port_operations nv_swncq_ops = { |
517 | .tf_load = ata_tf_load, | 452 | .inherits = &nv_generic_ops, |
518 | .tf_read = ata_tf_read, | 453 | |
519 | .exec_command = ata_exec_command, | ||
520 | .check_status = ata_check_status, | ||
521 | .dev_select = ata_std_dev_select, | ||
522 | .bmdma_setup = ata_bmdma_setup, | ||
523 | .bmdma_start = ata_bmdma_start, | ||
524 | .bmdma_stop = ata_bmdma_stop, | ||
525 | .bmdma_status = ata_bmdma_status, | ||
526 | .qc_defer = ata_std_qc_defer, | 454 | .qc_defer = ata_std_qc_defer, |
527 | .qc_prep = nv_swncq_qc_prep, | 455 | .qc_prep = nv_swncq_qc_prep, |
528 | .qc_issue = nv_swncq_qc_issue, | 456 | .qc_issue = nv_swncq_qc_issue, |
529 | .mode_filter = ata_pci_default_filter, | 457 | |
530 | .freeze = nv_mcp55_freeze, | 458 | .freeze = nv_mcp55_freeze, |
531 | .thaw = nv_mcp55_thaw, | 459 | .thaw = nv_mcp55_thaw, |
532 | .error_handler = nv_swncq_error_handler, | 460 | .error_handler = nv_swncq_error_handler, |
533 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | 461 | |
534 | .data_xfer = ata_data_xfer, | ||
535 | .irq_clear = ata_bmdma_irq_clear, | ||
536 | .irq_on = ata_irq_on, | ||
537 | .scr_read = nv_scr_read, | ||
538 | .scr_write = nv_scr_write, | ||
539 | #ifdef CONFIG_PM | 462 | #ifdef CONFIG_PM |
540 | .port_suspend = nv_swncq_port_suspend, | 463 | .port_suspend = nv_swncq_port_suspend, |
541 | .port_resume = nv_swncq_port_resume, | 464 | .port_resume = nv_swncq_port_resume, |