aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_sis.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_sis.c')
-rw-r--r--drivers/ata/pata_sis.c177
1 files changed, 16 insertions, 161 deletions
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index dcd8457a8377..3ed628670cd7 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -517,196 +517,51 @@ static struct scsi_host_template sis_sht = {
517 ATA_BMDMA_SHT(DRV_NAME), 517 ATA_BMDMA_SHT(DRV_NAME),
518}; 518};
519 519
520static const struct ata_port_operations sis_133_ops = { 520static struct ata_port_operations sis_133_for_sata_ops = {
521 .inherits = &ata_bmdma_port_ops,
521 .set_piomode = sis_133_set_piomode, 522 .set_piomode = sis_133_set_piomode,
522 .set_dmamode = sis_133_set_dmamode, 523 .set_dmamode = sis_133_set_dmamode,
523 .mode_filter = ata_pci_default_filter,
524
525 .tf_load = ata_tf_load,
526 .tf_read = ata_tf_read,
527 .check_status = ata_check_status,
528 .exec_command = ata_exec_command,
529 .dev_select = ata_std_dev_select,
530
531 .freeze = ata_bmdma_freeze,
532 .thaw = ata_bmdma_thaw,
533 .error_handler = sis_error_handler,
534 .post_internal_cmd = ata_bmdma_post_internal_cmd,
535 .cable_detect = sis_133_cable_detect, 524 .cable_detect = sis_133_cable_detect,
525};
536 526
537 .bmdma_setup = ata_bmdma_setup, 527static struct ata_port_operations sis_base_ops = {
538 .bmdma_start = ata_bmdma_start, 528 .inherits = &ata_bmdma_port_ops,
539 .bmdma_stop = ata_bmdma_stop, 529 .error_handler = sis_error_handler,
540 .bmdma_status = ata_bmdma_status,
541 .qc_prep = ata_qc_prep,
542 .qc_issue = ata_qc_issue_prot,
543 .data_xfer = ata_data_xfer,
544
545 .irq_handler = ata_interrupt,
546 .irq_clear = ata_bmdma_irq_clear,
547 .irq_on = ata_irq_on,
548
549 .port_start = ata_sff_port_start,
550}; 530};
551 531
552static const struct ata_port_operations sis_133_for_sata_ops = { 532static struct ata_port_operations sis_133_ops = {
533 .inherits = &sis_base_ops,
553 .set_piomode = sis_133_set_piomode, 534 .set_piomode = sis_133_set_piomode,
554 .set_dmamode = sis_133_set_dmamode, 535 .set_dmamode = sis_133_set_dmamode,
555 .mode_filter = ata_pci_default_filter,
556
557 .tf_load = ata_tf_load,
558 .tf_read = ata_tf_read,
559 .check_status = ata_check_status,
560 .exec_command = ata_exec_command,
561 .dev_select = ata_std_dev_select,
562
563 .freeze = ata_bmdma_freeze,
564 .thaw = ata_bmdma_thaw,
565 .error_handler = ata_bmdma_error_handler,
566 .post_internal_cmd = ata_bmdma_post_internal_cmd,
567 .cable_detect = sis_133_cable_detect, 536 .cable_detect = sis_133_cable_detect,
568
569 .bmdma_setup = ata_bmdma_setup,
570 .bmdma_start = ata_bmdma_start,
571 .bmdma_stop = ata_bmdma_stop,
572 .bmdma_status = ata_bmdma_status,
573 .qc_prep = ata_qc_prep,
574 .qc_issue = ata_qc_issue_prot,
575 .data_xfer = ata_data_xfer,
576
577 .irq_handler = ata_interrupt,
578 .irq_clear = ata_bmdma_irq_clear,
579 .irq_on = ata_irq_on,
580
581 .port_start = ata_sff_port_start,
582}; 537};
583 538
584static const struct ata_port_operations sis_133_early_ops = { 539static struct ata_port_operations sis_133_early_ops = {
540 .inherits = &sis_base_ops,
585 .set_piomode = sis_100_set_piomode, 541 .set_piomode = sis_100_set_piomode,
586 .set_dmamode = sis_133_early_set_dmamode, 542 .set_dmamode = sis_133_early_set_dmamode,
587 .mode_filter = ata_pci_default_filter,
588
589 .tf_load = ata_tf_load,
590 .tf_read = ata_tf_read,
591 .check_status = ata_check_status,
592 .exec_command = ata_exec_command,
593 .dev_select = ata_std_dev_select,
594
595 .freeze = ata_bmdma_freeze,
596 .thaw = ata_bmdma_thaw,
597 .error_handler = sis_error_handler,
598 .post_internal_cmd = ata_bmdma_post_internal_cmd,
599 .cable_detect = sis_66_cable_detect, 543 .cable_detect = sis_66_cable_detect,
600
601 .bmdma_setup = ata_bmdma_setup,
602 .bmdma_start = ata_bmdma_start,
603 .bmdma_stop = ata_bmdma_stop,
604 .bmdma_status = ata_bmdma_status,
605 .qc_prep = ata_qc_prep,
606 .qc_issue = ata_qc_issue_prot,
607 .data_xfer = ata_data_xfer,
608
609 .irq_handler = ata_interrupt,
610 .irq_clear = ata_bmdma_irq_clear,
611 .irq_on = ata_irq_on,
612
613 .port_start = ata_sff_port_start,
614}; 544};
615 545
616static const struct ata_port_operations sis_100_ops = { 546static struct ata_port_operations sis_100_ops = {
547 .inherits = &sis_base_ops,
617 .set_piomode = sis_100_set_piomode, 548 .set_piomode = sis_100_set_piomode,
618 .set_dmamode = sis_100_set_dmamode, 549 .set_dmamode = sis_100_set_dmamode,
619 .mode_filter = ata_pci_default_filter,
620
621 .tf_load = ata_tf_load,
622 .tf_read = ata_tf_read,
623 .check_status = ata_check_status,
624 .exec_command = ata_exec_command,
625 .dev_select = ata_std_dev_select,
626
627 .freeze = ata_bmdma_freeze,
628 .thaw = ata_bmdma_thaw,
629 .error_handler = sis_error_handler,
630 .post_internal_cmd = ata_bmdma_post_internal_cmd,
631 .cable_detect = sis_66_cable_detect, 550 .cable_detect = sis_66_cable_detect,
632
633 .bmdma_setup = ata_bmdma_setup,
634 .bmdma_start = ata_bmdma_start,
635 .bmdma_stop = ata_bmdma_stop,
636 .bmdma_status = ata_bmdma_status,
637 .qc_prep = ata_qc_prep,
638 .qc_issue = ata_qc_issue_prot,
639 .data_xfer = ata_data_xfer,
640
641 .irq_handler = ata_interrupt,
642 .irq_clear = ata_bmdma_irq_clear,
643 .irq_on = ata_irq_on,
644
645 .port_start = ata_sff_port_start,
646}; 551};
647 552
648static const struct ata_port_operations sis_66_ops = { 553static struct ata_port_operations sis_66_ops = {
554 .inherits = &sis_base_ops,
649 .set_piomode = sis_old_set_piomode, 555 .set_piomode = sis_old_set_piomode,
650 .set_dmamode = sis_66_set_dmamode, 556 .set_dmamode = sis_66_set_dmamode,
651 .mode_filter = ata_pci_default_filter,
652
653 .tf_load = ata_tf_load,
654 .tf_read = ata_tf_read,
655 .check_status = ata_check_status,
656 .exec_command = ata_exec_command,
657 .dev_select = ata_std_dev_select,
658 .cable_detect = sis_66_cable_detect, 557 .cable_detect = sis_66_cable_detect,
659
660 .freeze = ata_bmdma_freeze,
661 .thaw = ata_bmdma_thaw,
662 .error_handler = sis_error_handler,
663 .post_internal_cmd = ata_bmdma_post_internal_cmd,
664
665 .bmdma_setup = ata_bmdma_setup,
666 .bmdma_start = ata_bmdma_start,
667 .bmdma_stop = ata_bmdma_stop,
668 .bmdma_status = ata_bmdma_status,
669 .qc_prep = ata_qc_prep,
670 .qc_issue = ata_qc_issue_prot,
671 .data_xfer = ata_data_xfer,
672
673 .irq_handler = ata_interrupt,
674 .irq_clear = ata_bmdma_irq_clear,
675 .irq_on = ata_irq_on,
676
677 .port_start = ata_sff_port_start,
678}; 558};
679 559
680static const struct ata_port_operations sis_old_ops = { 560static struct ata_port_operations sis_old_ops = {
561 .inherits = &sis_base_ops,
681 .set_piomode = sis_old_set_piomode, 562 .set_piomode = sis_old_set_piomode,
682 .set_dmamode = sis_old_set_dmamode, 563 .set_dmamode = sis_old_set_dmamode,
683 .mode_filter = ata_pci_default_filter,
684
685 .tf_load = ata_tf_load,
686 .tf_read = ata_tf_read,
687 .check_status = ata_check_status,
688 .exec_command = ata_exec_command,
689 .dev_select = ata_std_dev_select,
690
691 .freeze = ata_bmdma_freeze,
692 .thaw = ata_bmdma_thaw,
693 .error_handler = sis_error_handler,
694 .post_internal_cmd = ata_bmdma_post_internal_cmd,
695 .cable_detect = ata_cable_40wire, 564 .cable_detect = ata_cable_40wire,
696
697 .bmdma_setup = ata_bmdma_setup,
698 .bmdma_start = ata_bmdma_start,
699 .bmdma_stop = ata_bmdma_stop,
700 .bmdma_status = ata_bmdma_status,
701 .qc_prep = ata_qc_prep,
702 .qc_issue = ata_qc_issue_prot,
703 .data_xfer = ata_data_xfer,
704
705 .irq_handler = ata_interrupt,
706 .irq_clear = ata_bmdma_irq_clear,
707 .irq_on = ata_irq_on,
708
709 .port_start = ata_sff_port_start,
710}; 565};
711 566
712static const struct ata_port_info sis_info = { 567static const struct ata_port_info sis_info = {