diff options
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r-- | drivers/ata/sata_mv.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index a65ba636aaa8..5f3d524c3387 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -798,20 +798,18 @@ static u32 mv_scr_read(struct ata_port *ap, unsigned int sc_reg_in) | |||
798 | { | 798 | { |
799 | unsigned int ofs = mv_scr_offset(sc_reg_in); | 799 | unsigned int ofs = mv_scr_offset(sc_reg_in); |
800 | 800 | ||
801 | if (0xffffffffU != ofs) { | 801 | if (0xffffffffU != ofs) |
802 | return readl(mv_ap_base(ap) + ofs); | 802 | return readl(mv_ap_base(ap) + ofs); |
803 | } else { | 803 | else |
804 | return (u32) ofs; | 804 | return (u32) ofs; |
805 | } | ||
806 | } | 805 | } |
807 | 806 | ||
808 | static void mv_scr_write(struct ata_port *ap, unsigned int sc_reg_in, u32 val) | 807 | static void mv_scr_write(struct ata_port *ap, unsigned int sc_reg_in, u32 val) |
809 | { | 808 | { |
810 | unsigned int ofs = mv_scr_offset(sc_reg_in); | 809 | unsigned int ofs = mv_scr_offset(sc_reg_in); |
811 | 810 | ||
812 | if (0xffffffffU != ofs) { | 811 | if (0xffffffffU != ofs) |
813 | writelfl(val, mv_ap_base(ap) + ofs); | 812 | writelfl(val, mv_ap_base(ap) + ofs); |
814 | } | ||
815 | } | 813 | } |
816 | 814 | ||
817 | static void mv_edma_cfg(struct mv_host_priv *hpriv, void __iomem *port_mmio) | 815 | static void mv_edma_cfg(struct mv_host_priv *hpriv, void __iomem *port_mmio) |
@@ -1320,17 +1318,15 @@ static void mv_host_intr(struct ata_host *host, u32 relevant, unsigned int hc) | |||
1320 | int shift, port, port0, hard_port, handled; | 1318 | int shift, port, port0, hard_port, handled; |
1321 | unsigned int err_mask; | 1319 | unsigned int err_mask; |
1322 | 1320 | ||
1323 | if (hc == 0) { | 1321 | if (hc == 0) |
1324 | port0 = 0; | 1322 | port0 = 0; |
1325 | } else { | 1323 | else |
1326 | port0 = MV_PORTS_PER_HC; | 1324 | port0 = MV_PORTS_PER_HC; |
1327 | } | ||
1328 | 1325 | ||
1329 | /* we'll need the HC success int register in most cases */ | 1326 | /* we'll need the HC success int register in most cases */ |
1330 | hc_irq_cause = readl(hc_mmio + HC_IRQ_CAUSE_OFS); | 1327 | hc_irq_cause = readl(hc_mmio + HC_IRQ_CAUSE_OFS); |
1331 | if (hc_irq_cause) { | 1328 | if (hc_irq_cause) |
1332 | writelfl(~hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS); | 1329 | writelfl(~hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS); |
1333 | } | ||
1334 | 1330 | ||
1335 | VPRINTK("ENTER, hc%u relevant=0x%08x HC IRQ cause=0x%08x\n", | 1331 | VPRINTK("ENTER, hc%u relevant=0x%08x HC IRQ cause=0x%08x\n", |
1336 | hc,relevant,hc_irq_cause); | 1332 | hc,relevant,hc_irq_cause); |
@@ -1425,9 +1421,8 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance) | |||
1425 | /* check the cases where we either have nothing pending or have read | 1421 | /* check the cases where we either have nothing pending or have read |
1426 | * a bogus register value which can indicate HW removal or PCI fault | 1422 | * a bogus register value which can indicate HW removal or PCI fault |
1427 | */ | 1423 | */ |
1428 | if (!irq_stat || (0xffffffffU == irq_stat)) { | 1424 | if (!irq_stat || (0xffffffffU == irq_stat)) |
1429 | return IRQ_NONE; | 1425 | return IRQ_NONE; |
1430 | } | ||
1431 | 1426 | ||
1432 | n_hcs = mv_get_hc_count(host->ports[0]->flags); | 1427 | n_hcs = mv_get_hc_count(host->ports[0]->flags); |
1433 | spin_lock(&host->lock); | 1428 | spin_lock(&host->lock); |