diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/sata_mv.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index f6a716ef5a16..a39779aed8f5 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -2546,7 +2546,7 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, | |||
2546 | hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); | 2546 | hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); |
2547 | int fix_phy_mode4 = | 2547 | int fix_phy_mode4 = |
2548 | hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); | 2548 | hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); |
2549 | u32 m2, tmp; | 2549 | u32 m2, m3; |
2550 | 2550 | ||
2551 | if (fix_phy_mode2) { | 2551 | if (fix_phy_mode2) { |
2552 | m2 = readl(port_mmio + PHY_MODE2); | 2552 | m2 = readl(port_mmio + PHY_MODE2); |
@@ -2563,27 +2563,27 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, | |||
2563 | udelay(200); | 2563 | udelay(200); |
2564 | } | 2564 | } |
2565 | 2565 | ||
2566 | /* who knows what this magic does */ | 2566 | /* |
2567 | tmp = readl(port_mmio + PHY_MODE3); | 2567 | * Gen-II/IIe PHY_MODE3 errata RM#2: |
2568 | tmp &= ~0x7F800000; | 2568 | * Achieves better receiver noise performance than the h/w default: |
2569 | tmp |= 0x2A800000; | 2569 | */ |
2570 | writel(tmp, port_mmio + PHY_MODE3); | 2570 | m3 = readl(port_mmio + PHY_MODE3); |
2571 | m3 = (m3 & 0x1f) | (0x5555601 << 5); | ||
2572 | writel(m3, port_mmio + PHY_MODE3); | ||
2571 | 2573 | ||
2572 | if (fix_phy_mode4) { | 2574 | if (fix_phy_mode4) { |
2573 | u32 m4; | 2575 | u32 m4; |
2574 | 2576 | ||
2575 | m4 = readl(port_mmio + PHY_MODE4); | 2577 | m4 = readl(port_mmio + PHY_MODE4); |
2576 | 2578 | ||
2577 | if (hp_flags & MV_HP_ERRATA_60X1B2) | ||
2578 | tmp = readl(port_mmio + PHY_MODE3); | ||
2579 | |||
2580 | /* workaround for errata FEr SATA#10 (part 1) */ | 2579 | /* workaround for errata FEr SATA#10 (part 1) */ |
2581 | m4 = (m4 & ~(1 << 1)) | (1 << 0); | 2580 | m4 = (m4 & ~(1 << 1)) | (1 << 0); |
2582 | 2581 | ||
2583 | writel(m4, port_mmio + PHY_MODE4); | 2582 | /* enforce bit restrictions on GenIIe devices */ |
2583 | if (IS_GEN_IIE(hpriv)) | ||
2584 | m4 = (m4 & ~0x5DE3FFFC) | (1 << 2); | ||
2584 | 2585 | ||
2585 | if (hp_flags & MV_HP_ERRATA_60X1B2) | 2586 | writel(m4, port_mmio + PHY_MODE4); |
2586 | writel(tmp, port_mmio + PHY_MODE3); | ||
2587 | } | 2587 | } |
2588 | 2588 | ||
2589 | /* Revert values of pre-emphasis and signal amps to the saved ones */ | 2589 | /* Revert values of pre-emphasis and signal amps to the saved ones */ |