aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_mv.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-03-24 23:22:47 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-17 15:44:16 -0400
commit358f9a77a668660729e705fde9c3cf69f013aa98 (patch)
treea249660fdd9f252925eff9eaac3ed7836c839f91 /drivers/ata/sata_mv.c
parentc1bc899f5805771926c9198e2ab4d77122c356a1 (diff)
libata: implement and use ata_noop_irq_clear()
->irq_clear() is used to clear IRQ bit of a SFF controller and isn't useful for drivers which don't use libata SFF HSM implementation. However, it's a required callback and many drivers implement their own noop version as placeholder. This patch implements ata_noop_irq_clear and use it to replace those custom placeholders. Also, SFF drivers which don't support BMDMA don't need to use ata_bmdma_irq_clear(). It becomes noop if BMDMA address isn't initialized. Convert them to use ata_noop_irq_clear(). Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r--drivers/ata/sata_mv.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index a4944c8ad46d..b3b3da4eaa03 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -461,7 +461,6 @@ struct mv_hw_ops {
461 void (*reset_bus)(struct ata_host *host, void __iomem *mmio); 461 void (*reset_bus)(struct ata_host *host, void __iomem *mmio);
462}; 462};
463 463
464static void mv_irq_clear(struct ata_port *ap);
465static int mv_scr_read(struct ata_port *ap, unsigned int sc_reg_in, u32 *val); 464static int mv_scr_read(struct ata_port *ap, unsigned int sc_reg_in, u32 *val);
466static int mv_scr_write(struct ata_port *ap, unsigned int sc_reg_in, u32 val); 465static int mv_scr_write(struct ata_port *ap, unsigned int sc_reg_in, u32 val);
467static int mv5_scr_read(struct ata_port *ap, unsigned int sc_reg_in, u32 *val); 466static int mv5_scr_read(struct ata_port *ap, unsigned int sc_reg_in, u32 *val);
@@ -564,7 +563,7 @@ static const struct ata_port_operations mv5_ops = {
564 .qc_issue = mv_qc_issue, 563 .qc_issue = mv_qc_issue,
565 .data_xfer = ata_data_xfer, 564 .data_xfer = ata_data_xfer,
566 565
567 .irq_clear = mv_irq_clear, 566 .irq_clear = ata_noop_irq_clear,
568 .irq_on = ata_irq_on, 567 .irq_on = ata_irq_on,
569 568
570 .error_handler = mv_error_handler, 569 .error_handler = mv_error_handler,
@@ -592,7 +591,7 @@ static const struct ata_port_operations mv6_ops = {
592 .qc_issue = mv_qc_issue, 591 .qc_issue = mv_qc_issue,
593 .data_xfer = ata_data_xfer, 592 .data_xfer = ata_data_xfer,
594 593
595 .irq_clear = mv_irq_clear, 594 .irq_clear = ata_noop_irq_clear,
596 .irq_on = ata_irq_on, 595 .irq_on = ata_irq_on,
597 596
598 .error_handler = mv_error_handler, 597 .error_handler = mv_error_handler,
@@ -620,7 +619,7 @@ static const struct ata_port_operations mv_iie_ops = {
620 .qc_issue = mv_qc_issue, 619 .qc_issue = mv_qc_issue,
621 .data_xfer = ata_data_xfer, 620 .data_xfer = ata_data_xfer,
622 621
623 .irq_clear = mv_irq_clear, 622 .irq_clear = ata_noop_irq_clear,
624 .irq_on = ata_irq_on, 623 .irq_on = ata_irq_on,
625 624
626 .error_handler = mv_error_handler, 625 .error_handler = mv_error_handler,
@@ -801,10 +800,6 @@ static inline int mv_get_hc_count(unsigned long port_flags)
801 return ((port_flags & MV_FLAG_DUAL_HC) ? 2 : 1); 800 return ((port_flags & MV_FLAG_DUAL_HC) ? 2 : 1);
802} 801}
803 802
804static void mv_irq_clear(struct ata_port *ap)
805{
806}
807
808static void mv_set_edma_ptrs(void __iomem *port_mmio, 803static void mv_set_edma_ptrs(void __iomem *port_mmio,
809 struct mv_host_priv *hpriv, 804 struct mv_host_priv *hpriv,
810 struct mv_port_priv *pp) 805 struct mv_port_priv *pp)