diff options
Diffstat (limited to 'drivers/ata/pata_scc.c')
-rw-r--r-- | drivers/ata/pata_scc.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index fba5bed0a641..701d0addae73 100644 --- a/drivers/ata/pata_scc.c +++ b/drivers/ata/pata_scc.c | |||
@@ -266,7 +266,7 @@ unsigned long scc_mode_filter(struct ata_device *adev, unsigned long mask) | |||
266 | printk(KERN_INFO "%s: limit ATAPI UDMA to UDMA4\n", DRV_NAME); | 266 | printk(KERN_INFO "%s: limit ATAPI UDMA to UDMA4\n", DRV_NAME); |
267 | mask &= ~(0xE0 << ATA_SHIFT_UDMA); | 267 | mask &= ~(0xE0 << ATA_SHIFT_UDMA); |
268 | } | 268 | } |
269 | return ata_pci_default_filter(adev, mask); | 269 | return ata_bmdma_mode_filter(adev, mask); |
270 | } | 270 | } |
271 | 271 | ||
272 | /** | 272 | /** |
@@ -274,7 +274,7 @@ unsigned long scc_mode_filter(struct ata_device *adev, unsigned long mask) | |||
274 | * @ap: Port to which output is sent | 274 | * @ap: Port to which output is sent |
275 | * @tf: ATA taskfile register set | 275 | * @tf: ATA taskfile register set |
276 | * | 276 | * |
277 | * Note: Original code is ata_tf_load(). | 277 | * Note: Original code is ata_sff_tf_load(). |
278 | */ | 278 | */ |
279 | 279 | ||
280 | static void scc_tf_load (struct ata_port *ap, const struct ata_taskfile *tf) | 280 | static void scc_tf_load (struct ata_port *ap, const struct ata_taskfile *tf) |
@@ -341,7 +341,7 @@ static u8 scc_check_status (struct ata_port *ap) | |||
341 | * @ap: Port from which input is read | 341 | * @ap: Port from which input is read |
342 | * @tf: ATA taskfile register set for storing input | 342 | * @tf: ATA taskfile register set for storing input |
343 | * | 343 | * |
344 | * Note: Original code is ata_tf_read(). | 344 | * Note: Original code is ata_sff_tf_read(). |
345 | */ | 345 | */ |
346 | 346 | ||
347 | static void scc_tf_read (struct ata_port *ap, struct ata_taskfile *tf) | 347 | static void scc_tf_read (struct ata_port *ap, struct ata_taskfile *tf) |
@@ -373,7 +373,7 @@ static void scc_tf_read (struct ata_port *ap, struct ata_taskfile *tf) | |||
373 | * @ap: port to which command is being issued | 373 | * @ap: port to which command is being issued |
374 | * @tf: ATA taskfile register set | 374 | * @tf: ATA taskfile register set |
375 | * | 375 | * |
376 | * Note: Original code is ata_exec_command(). | 376 | * Note: Original code is ata_sff_exec_command(). |
377 | */ | 377 | */ |
378 | 378 | ||
379 | static void scc_exec_command (struct ata_port *ap, | 379 | static void scc_exec_command (struct ata_port *ap, |
@@ -382,7 +382,7 @@ static void scc_exec_command (struct ata_port *ap, | |||
382 | DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command); | 382 | DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command); |
383 | 383 | ||
384 | out_be32(ap->ioaddr.command_addr, tf->command); | 384 | out_be32(ap->ioaddr.command_addr, tf->command); |
385 | ata_pause(ap); | 385 | ata_sff_pause(ap); |
386 | } | 386 | } |
387 | 387 | ||
388 | /** | 388 | /** |
@@ -396,14 +396,14 @@ static u8 scc_check_altstatus (struct ata_port *ap) | |||
396 | } | 396 | } |
397 | 397 | ||
398 | /** | 398 | /** |
399 | * scc_std_dev_select - Select device 0/1 on ATA bus | 399 | * scc_dev_select - Select device 0/1 on ATA bus |
400 | * @ap: ATA channel to manipulate | 400 | * @ap: ATA channel to manipulate |
401 | * @device: ATA device (numbered from zero) to select | 401 | * @device: ATA device (numbered from zero) to select |
402 | * | 402 | * |
403 | * Note: Original code is ata_std_dev_select(). | 403 | * Note: Original code is ata_sff_dev_select(). |
404 | */ | 404 | */ |
405 | 405 | ||
406 | static void scc_std_dev_select (struct ata_port *ap, unsigned int device) | 406 | static void scc_dev_select (struct ata_port *ap, unsigned int device) |
407 | { | 407 | { |
408 | u8 tmp; | 408 | u8 tmp; |
409 | 409 | ||
@@ -413,7 +413,7 @@ static void scc_std_dev_select (struct ata_port *ap, unsigned int device) | |||
413 | tmp = ATA_DEVICE_OBS | ATA_DEV1; | 413 | tmp = ATA_DEVICE_OBS | ATA_DEV1; |
414 | 414 | ||
415 | out_be32(ap->ioaddr.device_addr, tmp); | 415 | out_be32(ap->ioaddr.device_addr, tmp); |
416 | ata_pause(ap); | 416 | ata_sff_pause(ap); |
417 | } | 417 | } |
418 | 418 | ||
419 | /** | 419 | /** |
@@ -514,7 +514,7 @@ static int scc_bus_post_reset(struct ata_port *ap, unsigned int devmask, | |||
514 | * BSY bit to clear | 514 | * BSY bit to clear |
515 | */ | 515 | */ |
516 | if (dev0) { | 516 | if (dev0) { |
517 | rc = ata_wait_ready(ap, deadline); | 517 | rc = ata_sff_wait_ready(ap, deadline); |
518 | if (rc && rc != -ENODEV) | 518 | if (rc && rc != -ENODEV) |
519 | return rc; | 519 | return rc; |
520 | } | 520 | } |
@@ -535,7 +535,7 @@ static int scc_bus_post_reset(struct ata_port *ap, unsigned int devmask, | |||
535 | msleep(50); /* give drive a breather */ | 535 | msleep(50); /* give drive a breather */ |
536 | } | 536 | } |
537 | if (dev1) { | 537 | if (dev1) { |
538 | rc = ata_wait_ready(ap, deadline); | 538 | rc = ata_sff_wait_ready(ap, deadline); |
539 | if (rc && rc != -ENODEV) | 539 | if (rc && rc != -ENODEV) |
540 | return rc; | 540 | return rc; |
541 | } | 541 | } |
@@ -571,7 +571,7 @@ static unsigned int scc_bus_softreset(struct ata_port *ap, unsigned int devmask, | |||
571 | out_be32(ioaddr->ctl_addr, ap->ctl); | 571 | out_be32(ioaddr->ctl_addr, ap->ctl); |
572 | 572 | ||
573 | /* wait a while before checking status */ | 573 | /* wait a while before checking status */ |
574 | ata_wait_after_reset(ap, deadline); | 574 | ata_sff_wait_after_reset(ap, deadline); |
575 | 575 | ||
576 | /* Before we perform post reset processing we want to see if | 576 | /* Before we perform post reset processing we want to see if |
577 | * the bus shows 0xFF because the odd clown forgets the D7 | 577 | * the bus shows 0xFF because the odd clown forgets the D7 |
@@ -586,16 +586,16 @@ static unsigned int scc_bus_softreset(struct ata_port *ap, unsigned int devmask, | |||
586 | } | 586 | } |
587 | 587 | ||
588 | /** | 588 | /** |
589 | * scc_std_softreset - reset host port via ATA SRST | 589 | * scc_softreset - reset host port via ATA SRST |
590 | * @ap: port to reset | 590 | * @ap: port to reset |
591 | * @classes: resulting classes of attached devices | 591 | * @classes: resulting classes of attached devices |
592 | * @deadline: deadline jiffies for the operation | 592 | * @deadline: deadline jiffies for the operation |
593 | * | 593 | * |
594 | * Note: Original code is ata_std_softreset(). | 594 | * Note: Original code is ata_sff_softreset(). |
595 | */ | 595 | */ |
596 | 596 | ||
597 | static int scc_std_softreset(struct ata_link *link, unsigned int *classes, | 597 | static int scc_softreset(struct ata_link *link, unsigned int *classes, |
598 | unsigned long deadline) | 598 | unsigned long deadline) |
599 | { | 599 | { |
600 | struct ata_port *ap = link->ap; | 600 | struct ata_port *ap = link->ap; |
601 | unsigned int slave_possible = ap->flags & ATA_FLAG_SLAVE_POSS; | 601 | unsigned int slave_possible = ap->flags & ATA_FLAG_SLAVE_POSS; |
@@ -628,10 +628,10 @@ static int scc_std_softreset(struct ata_link *link, unsigned int *classes, | |||
628 | } | 628 | } |
629 | 629 | ||
630 | /* determine by signature whether we have ATA or ATAPI devices */ | 630 | /* determine by signature whether we have ATA or ATAPI devices */ |
631 | classes[0] = ata_dev_try_classify(&ap->link.device[0], | 631 | classes[0] = ata_sff_dev_classify(&ap->link.device[0], |
632 | devmask & (1 << 0), &err); | 632 | devmask & (1 << 0), &err); |
633 | if (slave_possible && err != 0x81) | 633 | if (slave_possible && err != 0x81) |
634 | classes[1] = ata_dev_try_classify(&ap->link.device[1], | 634 | classes[1] = ata_sff_dev_classify(&ap->link.device[1], |
635 | devmask & (1 << 1), &err); | 635 | devmask & (1 << 1), &err); |
636 | 636 | ||
637 | out: | 637 | out: |
@@ -695,7 +695,7 @@ static void scc_bmdma_stop (struct ata_queued_cmd *qc) | |||
695 | printk(KERN_WARNING "%s: Internal Bus Error\n", DRV_NAME); | 695 | printk(KERN_WARNING "%s: Internal Bus Error\n", DRV_NAME); |
696 | out_be32(bmid_base + SCC_DMA_INTST, INTSTS_BMSINT); | 696 | out_be32(bmid_base + SCC_DMA_INTST, INTSTS_BMSINT); |
697 | /* TBD: SW reset */ | 697 | /* TBD: SW reset */ |
698 | scc_std_softreset(&ap->link, &classes, deadline); | 698 | scc_softreset(&ap->link, &classes, deadline); |
699 | continue; | 699 | continue; |
700 | } | 700 | } |
701 | 701 | ||
@@ -721,7 +721,7 @@ static void scc_bmdma_stop (struct ata_queued_cmd *qc) | |||
721 | in_be32(bmid_base + SCC_DMA_CMD) & ~ATA_DMA_START); | 721 | in_be32(bmid_base + SCC_DMA_CMD) & ~ATA_DMA_START); |
722 | 722 | ||
723 | /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */ | 723 | /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */ |
724 | ata_altstatus(ap); /* dummy read */ | 724 | ata_sff_altstatus(ap); /* dummy read */ |
725 | } | 725 | } |
726 | 726 | ||
727 | /** | 727 | /** |
@@ -742,7 +742,7 @@ static u8 scc_bmdma_status (struct ata_port *ap) | |||
742 | return host_stat; | 742 | return host_stat; |
743 | 743 | ||
744 | /* errata A252,A308 workaround: Step4 */ | 744 | /* errata A252,A308 workaround: Step4 */ |
745 | if ((ata_altstatus(ap) & ATA_ERR) && (int_status & INTSTS_INTRQ)) | 745 | if ((ata_sff_altstatus(ap) & ATA_ERR) && (int_status & INTSTS_INTRQ)) |
746 | return (host_stat | ATA_DMA_INTR); | 746 | return (host_stat | ATA_DMA_INTR); |
747 | 747 | ||
748 | /* errata A308 workaround Step5 */ | 748 | /* errata A308 workaround Step5 */ |
@@ -773,7 +773,7 @@ static u8 scc_bmdma_status (struct ata_port *ap) | |||
773 | * @buflen: buffer length | 773 | * @buflen: buffer length |
774 | * @rw: read/write | 774 | * @rw: read/write |
775 | * | 775 | * |
776 | * Note: Original code is ata_data_xfer(). | 776 | * Note: Original code is ata_sff_data_xfer(). |
777 | */ | 777 | */ |
778 | 778 | ||
779 | static unsigned int scc_data_xfer (struct ata_device *dev, unsigned char *buf, | 779 | static unsigned int scc_data_xfer (struct ata_device *dev, unsigned char *buf, |
@@ -815,7 +815,7 @@ static unsigned int scc_data_xfer (struct ata_device *dev, unsigned char *buf, | |||
815 | * scc_irq_on - Enable interrupts on a port. | 815 | * scc_irq_on - Enable interrupts on a port. |
816 | * @ap: Port on which interrupts are enabled. | 816 | * @ap: Port on which interrupts are enabled. |
817 | * | 817 | * |
818 | * Note: Original code is ata_irq_on(). | 818 | * Note: Original code is ata_sff_irq_on(). |
819 | */ | 819 | */ |
820 | 820 | ||
821 | static u8 scc_irq_on (struct ata_port *ap) | 821 | static u8 scc_irq_on (struct ata_port *ap) |
@@ -835,13 +835,13 @@ static u8 scc_irq_on (struct ata_port *ap) | |||
835 | } | 835 | } |
836 | 836 | ||
837 | /** | 837 | /** |
838 | * scc_bmdma_freeze - Freeze BMDMA controller port | 838 | * scc_freeze - Freeze BMDMA controller port |
839 | * @ap: port to freeze | 839 | * @ap: port to freeze |
840 | * | 840 | * |
841 | * Note: Original code is ata_bmdma_freeze(). | 841 | * Note: Original code is ata_sff_freeze(). |
842 | */ | 842 | */ |
843 | 843 | ||
844 | static void scc_bmdma_freeze (struct ata_port *ap) | 844 | static void scc_freeze (struct ata_port *ap) |
845 | { | 845 | { |
846 | struct ata_ioports *ioaddr = &ap->ioaddr; | 846 | struct ata_ioports *ioaddr = &ap->ioaddr; |
847 | 847 | ||
@@ -868,18 +868,18 @@ static void scc_bmdma_freeze (struct ata_port *ap) | |||
868 | static int scc_pata_prereset(struct ata_link *link, unsigned long deadline) | 868 | static int scc_pata_prereset(struct ata_link *link, unsigned long deadline) |
869 | { | 869 | { |
870 | link->ap->cbl = ATA_CBL_PATA80; | 870 | link->ap->cbl = ATA_CBL_PATA80; |
871 | return ata_std_prereset(link, deadline); | 871 | return ata_sff_prereset(link, deadline); |
872 | } | 872 | } |
873 | 873 | ||
874 | /** | 874 | /** |
875 | * scc_std_postreset - standard postreset callback | 875 | * scc_postreset - standard postreset callback |
876 | * @ap: the target ata_port | 876 | * @ap: the target ata_port |
877 | * @classes: classes of attached devices | 877 | * @classes: classes of attached devices |
878 | * | 878 | * |
879 | * Note: Original code is ata_std_postreset(). | 879 | * Note: Original code is ata_sff_postreset(). |
880 | */ | 880 | */ |
881 | 881 | ||
882 | static void scc_std_postreset(struct ata_link *link, unsigned int *classes) | 882 | static void scc_postreset(struct ata_link *link, unsigned int *classes) |
883 | { | 883 | { |
884 | struct ata_port *ap = link->ap; | 884 | struct ata_port *ap = link->ap; |
885 | 885 | ||
@@ -905,13 +905,13 @@ static void scc_std_postreset(struct ata_link *link, unsigned int *classes) | |||
905 | } | 905 | } |
906 | 906 | ||
907 | /** | 907 | /** |
908 | * scc_bmdma_irq_clear - Clear PCI IDE BMDMA interrupt. | 908 | * scc_irq_clear - Clear PCI IDE BMDMA interrupt. |
909 | * @ap: Port associated with this ATA transaction. | 909 | * @ap: Port associated with this ATA transaction. |
910 | * | 910 | * |
911 | * Note: Original code is ata_bmdma_irq_clear(). | 911 | * Note: Original code is ata_sff_irq_clear(). |
912 | */ | 912 | */ |
913 | 913 | ||
914 | static void scc_bmdma_irq_clear (struct ata_port *ap) | 914 | static void scc_irq_clear (struct ata_port *ap) |
915 | { | 915 | { |
916 | void __iomem *mmio = ap->ioaddr.bmdma_addr; | 916 | void __iomem *mmio = ap->ioaddr.bmdma_addr; |
917 | 917 | ||
@@ -972,7 +972,7 @@ static struct ata_port_operations scc_pata_ops = { | |||
972 | .exec_command = scc_exec_command, | 972 | .exec_command = scc_exec_command, |
973 | .check_status = scc_check_status, | 973 | .check_status = scc_check_status, |
974 | .check_altstatus = scc_check_altstatus, | 974 | .check_altstatus = scc_check_altstatus, |
975 | .dev_select = scc_std_dev_select, | 975 | .dev_select = scc_dev_select, |
976 | 976 | ||
977 | .bmdma_setup = scc_bmdma_setup, | 977 | .bmdma_setup = scc_bmdma_setup, |
978 | .bmdma_start = scc_bmdma_start, | 978 | .bmdma_start = scc_bmdma_start, |
@@ -980,13 +980,13 @@ static struct ata_port_operations scc_pata_ops = { | |||
980 | .bmdma_status = scc_bmdma_status, | 980 | .bmdma_status = scc_bmdma_status, |
981 | .data_xfer = scc_data_xfer, | 981 | .data_xfer = scc_data_xfer, |
982 | 982 | ||
983 | .freeze = scc_bmdma_freeze, | 983 | .freeze = scc_freeze, |
984 | .prereset = scc_pata_prereset, | 984 | .prereset = scc_pata_prereset, |
985 | .softreset = scc_std_softreset, | 985 | .softreset = scc_softreset, |
986 | .postreset = scc_std_postreset, | 986 | .postreset = scc_postreset, |
987 | .post_internal_cmd = scc_bmdma_stop, | 987 | .post_internal_cmd = scc_bmdma_stop, |
988 | 988 | ||
989 | .irq_clear = scc_bmdma_irq_clear, | 989 | .irq_clear = scc_irq_clear, |
990 | .irq_on = scc_irq_on, | 990 | .irq_on = scc_irq_on, |
991 | 991 | ||
992 | .port_start = scc_port_start, | 992 | .port_start = scc_port_start, |
@@ -1140,8 +1140,8 @@ static int scc_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1140 | if (rc) | 1140 | if (rc) |
1141 | return rc; | 1141 | return rc; |
1142 | 1142 | ||
1143 | return ata_host_activate(host, pdev->irq, ata_interrupt, IRQF_SHARED, | 1143 | return ata_host_activate(host, pdev->irq, ata_sff_interrupt, |
1144 | &scc_sht); | 1144 | IRQF_SHARED, &scc_sht); |
1145 | } | 1145 | } |
1146 | 1146 | ||
1147 | static struct pci_driver scc_pci_driver = { | 1147 | static struct pci_driver scc_pci_driver = { |