aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/sata_sx4.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c
index 1ce98afa69b6..eb05a3c82a9e 100644
--- a/drivers/ata/sata_sx4.c
+++ b/drivers/ata/sata_sx4.c
@@ -687,8 +687,11 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc)
687static unsigned int pdc20621_qc_issue(struct ata_queued_cmd *qc) 687static unsigned int pdc20621_qc_issue(struct ata_queued_cmd *qc)
688{ 688{
689 switch (qc->tf.protocol) { 689 switch (qc->tf.protocol) {
690 case ATA_PROT_DMA:
691 case ATA_PROT_NODATA: 690 case ATA_PROT_NODATA:
691 if (qc->tf.flags & ATA_TFLAG_POLLING)
692 break;
693 /*FALLTHROUGH*/
694 case ATA_PROT_DMA:
692 pdc20621_packet_start(qc); 695 pdc20621_packet_start(qc);
693 return 0; 696 return 0;
694 697
@@ -787,12 +790,7 @@ static inline unsigned int pdc20621_host_intr(struct ata_port *ap,
787 790
788static void pdc20621_irq_clear(struct ata_port *ap) 791static void pdc20621_irq_clear(struct ata_port *ap)
789{ 792{
790 struct ata_host *host = ap->host; 793 ioread8(ap->ioaddr.status_addr);
791 void __iomem *mmio = host->iomap[PDC_MMIO_BAR];
792
793 mmio += PDC_CHIP0_OFS;
794
795 readl(mmio + PDC_20621_SEQMASK);
796} 794}
797 795
798static irqreturn_t pdc20621_interrupt(int irq, void *dev_instance) 796static irqreturn_t pdc20621_interrupt(int irq, void *dev_instance)
@@ -877,14 +875,12 @@ static void pdc_freeze(struct ata_port *ap)
877static void pdc_thaw(struct ata_port *ap) 875static void pdc_thaw(struct ata_port *ap)
878{ 876{
879 void __iomem *mmio = ap->ioaddr.cmd_addr; 877 void __iomem *mmio = ap->ioaddr.cmd_addr;
880 void __iomem *mmio_base;
881 u32 tmp; 878 u32 tmp;
882 879
883 /* FIXME: start HDMA engine, if zero ATA engines running */ 880 /* FIXME: start HDMA engine, if zero ATA engines running */
884 881
885 /* reading SEQ mask register clears IRQ */ 882 /* clear IRQ */
886 mmio_base = ap->host->iomap[PDC_MMIO_BAR] + PDC_CHIP0_OFS; 883 ioread8(ap->ioaddr.status_addr);
887 readl(mmio_base + PDC_20621_SEQMASK);
888 884
889 /* turn IRQ back on */ 885 /* turn IRQ back on */
890 tmp = readl(mmio + PDC_CTLSTAT); 886 tmp = readl(mmio + PDC_CTLSTAT);
@@ -974,7 +970,7 @@ static int pdc_check_atapi_dma(struct ata_queued_cmd *qc)
974static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf) 970static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
975{ 971{
976 WARN_ON(tf->protocol == ATA_PROT_DMA || 972 WARN_ON(tf->protocol == ATA_PROT_DMA ||
977 tf->protocol == ATA_PROT_NODATA); 973 tf->protocol == ATAPI_PROT_DMA);
978 ata_sff_tf_load(ap, tf); 974 ata_sff_tf_load(ap, tf);
979} 975}
980 976
@@ -982,7 +978,7 @@ static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
982static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf) 978static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
983{ 979{
984 WARN_ON(tf->protocol == ATA_PROT_DMA || 980 WARN_ON(tf->protocol == ATA_PROT_DMA ||
985 tf->protocol == ATA_PROT_NODATA); 981 tf->protocol == ATAPI_PROT_DMA);
986 ata_sff_exec_command(ap, tf); 982 ata_sff_exec_command(ap, tf);
987} 983}
988 984