diff options
| author | Yuantian Tang <andy.tang@nxp.com> | 2017-03-09 04:13:29 -0500 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2017-03-09 11:55:23 -0500 |
| commit | 6022c5cadf1a43ca30f431f128daa6163909ad60 (patch) | |
| tree | 616b2d8b4e90d1fbcbcd00f4a5a192b28dbf4fda | |
| parent | 0580b762a4d6b70817476b90042813f8573283fa (diff) | |
ahci: qoriq: correct the sata ecc setting error
Sata ecc is controlled by only 1 bit which is 24bit in big-endian
in ecc register. So only setting 24bit to disable sata ecc prevents
other bits from being overwritten in ecc register.
Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
| -rw-r--r-- | drivers/ata/ahci_qoriq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c index 85d833289f28..4c96f3ac4976 100644 --- a/drivers/ata/ahci_qoriq.c +++ b/drivers/ata/ahci_qoriq.c | |||
| @@ -177,7 +177,8 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv) | |||
| 177 | case AHCI_LS1043A: | 177 | case AHCI_LS1043A: |
| 178 | if (!qpriv->ecc_addr) | 178 | if (!qpriv->ecc_addr) |
| 179 | return -EINVAL; | 179 | return -EINVAL; |
| 180 | writel(ECC_DIS_ARMV8_CH2, qpriv->ecc_addr); | 180 | writel(readl(qpriv->ecc_addr) | ECC_DIS_ARMV8_CH2, |
| 181 | qpriv->ecc_addr); | ||
| 181 | writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1); | 182 | writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1); |
| 182 | writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); | 183 | writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); |
| 183 | if (qpriv->is_dmacoherent) | 184 | if (qpriv->is_dmacoherent) |
| @@ -194,7 +195,8 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv) | |||
| 194 | case AHCI_LS1046A: | 195 | case AHCI_LS1046A: |
| 195 | if (!qpriv->ecc_addr) | 196 | if (!qpriv->ecc_addr) |
| 196 | return -EINVAL; | 197 | return -EINVAL; |
| 197 | writel(ECC_DIS_ARMV8_CH2, qpriv->ecc_addr); | 198 | writel(readl(qpriv->ecc_addr) | ECC_DIS_ARMV8_CH2, |
| 199 | qpriv->ecc_addr); | ||
| 198 | writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1); | 200 | writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1); |
| 199 | writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); | 201 | writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); |
| 200 | if (qpriv->is_dmacoherent) | 202 | if (qpriv->is_dmacoherent) |
