aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_scc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_scc.c')
-rw-r--r--drivers/ata/pata_scc.c38
1 files changed, 12 insertions, 26 deletions
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
index 77ff829af176..86b25fef34a9 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -416,6 +416,17 @@ static void scc_dev_select (struct ata_port *ap, unsigned int device)
416} 416}
417 417
418/** 418/**
419 * scc_set_devctl - Write device control reg
420 * @ap: port where the device is
421 * @ctl: value to write
422 */
423
424static void scc_set_devctl(struct ata_port *ap, u8 ctl)
425{
426 out_be32(ap->ioaddr.ctl_addr, ctl);
427}
428
429/**
419 * scc_bmdma_setup - Set up PCI IDE BMDMA transaction 430 * scc_bmdma_setup - Set up PCI IDE BMDMA transaction
420 * @qc: Info associated with this ATA transaction. 431 * @qc: Info associated with this ATA transaction.
421 * 432 *
@@ -840,31 +851,6 @@ static u8 scc_irq_on (struct ata_port *ap)
840} 851}
841 852
842/** 853/**
843 * scc_freeze - Freeze BMDMA controller port
844 * @ap: port to freeze
845 *
846 * Note: Original code is ata_sff_freeze().
847 */
848
849static void scc_freeze (struct ata_port *ap)
850{
851 struct ata_ioports *ioaddr = &ap->ioaddr;
852
853 ap->ctl |= ATA_NIEN;
854 ap->last_ctl = ap->ctl;
855
856 out_be32(ioaddr->ctl_addr, ap->ctl);
857
858 /* Under certain circumstances, some controllers raise IRQ on
859 * ATA_NIEN manipulation. Also, many controllers fail to mask
860 * previously pending IRQ on ATA_NIEN assertion. Clear it.
861 */
862 ap->ops->sff_check_status(ap);
863
864 ap->ops->sff_irq_clear(ap);
865}
866
867/**
868 * scc_pata_prereset - prepare for reset 854 * scc_pata_prereset - prepare for reset
869 * @ap: ATA port to be reset 855 * @ap: ATA port to be reset
870 * @deadline: deadline jiffies for the operation 856 * @deadline: deadline jiffies for the operation
@@ -977,6 +963,7 @@ static struct ata_port_operations scc_pata_ops = {
977 .sff_check_status = scc_check_status, 963 .sff_check_status = scc_check_status,
978 .sff_check_altstatus = scc_check_altstatus, 964 .sff_check_altstatus = scc_check_altstatus,
979 .sff_dev_select = scc_dev_select, 965 .sff_dev_select = scc_dev_select,
966 .sff_set_devctl = scc_set_devctl,
980 967
981 .bmdma_setup = scc_bmdma_setup, 968 .bmdma_setup = scc_bmdma_setup,
982 .bmdma_start = scc_bmdma_start, 969 .bmdma_start = scc_bmdma_start,
@@ -984,7 +971,6 @@ static struct ata_port_operations scc_pata_ops = {
984 .bmdma_status = scc_bmdma_status, 971 .bmdma_status = scc_bmdma_status,
985 .sff_data_xfer = scc_data_xfer, 972 .sff_data_xfer = scc_data_xfer,
986 973
987 .freeze = scc_freeze,
988 .prereset = scc_pata_prereset, 974 .prereset = scc_pata_prereset,
989 .softreset = scc_softreset, 975 .softreset = scc_softreset,
990 .postreset = scc_postreset, 976 .postreset = scc_postreset,