diff options
author | Tang Yuantian <Yuantian.Tang@nxp.com> | 2016-08-08 21:51:22 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-08-10 00:03:33 -0400 |
commit | 16af080e47785d14919bf94bf8a4097c5c8529fb (patch) | |
tree | 76764acbf773889be650df25af68d8f3db9be6af /drivers/ata | |
parent | 107a077d19341b4d47ae06f0bd24883b94e64628 (diff) |
ahci: qoriq: enable snoopable sata read and write
By default the SATA IP on the qoriq SoCs does not generating
coherent/snoopable transactions. This patch enable it in the
sata axicc register.
In addition, the dma-coherent property must be set on the
SATA controller nodes.
Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci_qoriq.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c index ed357a184ee4..925c4b6a753b 100644 --- a/drivers/ata/ahci_qoriq.c +++ b/drivers/ata/ahci_qoriq.c | |||
@@ -30,17 +30,20 @@ | |||
30 | #define PORT_PHY3 0xB0 | 30 | #define PORT_PHY3 0xB0 |
31 | #define PORT_PHY4 0xB4 | 31 | #define PORT_PHY4 0xB4 |
32 | #define PORT_PHY5 0xB8 | 32 | #define PORT_PHY5 0xB8 |
33 | #define PORT_AXICC 0xBC | ||
33 | #define PORT_TRANS 0xC8 | 34 | #define PORT_TRANS 0xC8 |
34 | 35 | ||
35 | /* port register default value */ | 36 | /* port register default value */ |
36 | #define AHCI_PORT_PHY_1_CFG 0xa003fffe | 37 | #define AHCI_PORT_PHY_1_CFG 0xa003fffe |
37 | #define AHCI_PORT_TRANS_CFG 0x08000029 | 38 | #define AHCI_PORT_TRANS_CFG 0x08000029 |
39 | #define AHCI_PORT_AXICC_CFG 0x3fffffff | ||
38 | 40 | ||
39 | /* for ls1021a */ | 41 | /* for ls1021a */ |
40 | #define LS1021A_PORT_PHY2 0x28183414 | 42 | #define LS1021A_PORT_PHY2 0x28183414 |
41 | #define LS1021A_PORT_PHY3 0x0e080e06 | 43 | #define LS1021A_PORT_PHY3 0x0e080e06 |
42 | #define LS1021A_PORT_PHY4 0x064a080b | 44 | #define LS1021A_PORT_PHY4 0x064a080b |
43 | #define LS1021A_PORT_PHY5 0x2aa86470 | 45 | #define LS1021A_PORT_PHY5 0x2aa86470 |
46 | #define LS1021A_AXICC_ADDR 0xC0 | ||
44 | 47 | ||
45 | #define SATA_ECC_DISABLE 0x00020000 | 48 | #define SATA_ECC_DISABLE 0x00020000 |
46 | 49 | ||
@@ -158,16 +161,19 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv) | |||
158 | writel(LS1021A_PORT_PHY4, reg_base + PORT_PHY4); | 161 | writel(LS1021A_PORT_PHY4, reg_base + PORT_PHY4); |
159 | writel(LS1021A_PORT_PHY5, reg_base + PORT_PHY5); | 162 | writel(LS1021A_PORT_PHY5, reg_base + PORT_PHY5); |
160 | writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); | 163 | writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); |
164 | writel(AHCI_PORT_AXICC_CFG, reg_base + LS1021A_AXICC_ADDR); | ||
161 | break; | 165 | break; |
162 | 166 | ||
163 | case AHCI_LS1043A: | 167 | case AHCI_LS1043A: |
164 | writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1); | 168 | writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1); |
165 | writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); | 169 | writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); |
170 | writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC); | ||
166 | break; | 171 | break; |
167 | 172 | ||
168 | case AHCI_LS2080A: | 173 | case AHCI_LS2080A: |
169 | writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1); | 174 | writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1); |
170 | writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); | 175 | writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); |
176 | writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC); | ||
171 | break; | 177 | break; |
172 | } | 178 | } |
173 | 179 | ||