diff options
author | Vidya Sagar <vidyas@nvidia.com> | 2018-03-04 05:11:52 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-06 15:19:01 -0500 |
commit | 7644b097513bf14335c0e1b5df800986f9c4aae2 (patch) | |
tree | a1ff347973490f944c565c211b2f0a7314528716 | |
parent | d5a3b620767c9e340c8e1ff6bdd125c201c2435a (diff) |
PCI: tegra: EP: Program updated N_FTS & FTS values
Programs updated N_FTS & FTS values to avoid link entry/exit issues
with ASPM-L0s state
Bug 200383205
Change-Id: Id0095ce7d2a1de654e9dda5556eda8e1ccc808e2
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1668098
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/pci/endpoint/pcie-tegra-dw-ep.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/pci/endpoint/pcie-tegra-dw-ep.c b/drivers/pci/endpoint/pcie-tegra-dw-ep.c index 2776d6155..f8802f72f 100644 --- a/drivers/pci/endpoint/pcie-tegra-dw-ep.c +++ b/drivers/pci/endpoint/pcie-tegra-dw-ep.c | |||
@@ -168,12 +168,19 @@ | |||
168 | #define L0S_ENTRANCE_LAT_MASK 0x07000000 | 168 | #define L0S_ENTRANCE_LAT_MASK 0x07000000 |
169 | #define L1_ENTRANCE_LAT_SHIFT 27 | 169 | #define L1_ENTRANCE_LAT_SHIFT 27 |
170 | #define L1_ENTRANCE_LAT_MASK 0x38000000 | 170 | #define L1_ENTRANCE_LAT_MASK 0x38000000 |
171 | #define N_FTS_SHIFT 8 | ||
172 | #define N_FTS_MASK 0xFF | ||
173 | #define N_FTS_VAL 52 | ||
171 | 174 | ||
172 | #define CFG_TIMER_CTRL_MAX_FUNC_NUM_OFF 0x718 | 175 | #define CFG_TIMER_CTRL_MAX_FUNC_NUM_OFF 0x718 |
173 | #define CFG_TIMER_CTRL_ACK_NAK_SHIFT (19) | 176 | #define CFG_TIMER_CTRL_ACK_NAK_SHIFT (19) |
174 | 177 | ||
175 | #define CFG_LINK_CAP_L1SUB 0x1C4 | 178 | #define CFG_LINK_CAP_L1SUB 0x1C4 |
176 | 179 | ||
180 | #define PORT_LOGIC_GEN2_CTRL 0x80C | ||
181 | #define FTS_MASK 0xFF | ||
182 | #define FTS_VAL 52 | ||
183 | |||
177 | #define GEN3_RELATED_OFF 0x890 | 184 | #define GEN3_RELATED_OFF 0x890 |
178 | #define GEN3_RELATED_OFF_GEN3_ZRXDC_NONCOMPL BIT(0) | 185 | #define GEN3_RELATED_OFF_GEN3_ZRXDC_NONCOMPL BIT(0) |
179 | #define GEN3_RELATED_OFF_GEN3_EQ_DISABLE BIT(16) | 186 | #define GEN3_RELATED_OFF_GEN3_EQ_DISABLE BIT(16) |
@@ -711,6 +718,17 @@ static void pex_ep_event_pex_rst_deassert(struct tegra_pcie_dw_ep *pcie) | |||
711 | 718 | ||
712 | writew(pcie->device_id, pcie->dbi_base + PCI_DEVICE_ID); | 719 | writew(pcie->device_id, pcie->dbi_base + PCI_DEVICE_ID); |
713 | 720 | ||
721 | /* Configure N_FTS & FTS */ | ||
722 | val = readl(pcie->dbi_base + PORT_LOGIC_ACK_F_ASPM_CTRL); | ||
723 | val &= ~(N_FTS_MASK << N_FTS_SHIFT); | ||
724 | val |= N_FTS_VAL << N_FTS_SHIFT; | ||
725 | writel(val, pcie->dbi_base + PORT_LOGIC_ACK_F_ASPM_CTRL); | ||
726 | |||
727 | val = readl(pcie->dbi_base + PORT_LOGIC_GEN2_CTRL); | ||
728 | val &= ~FTS_MASK; | ||
729 | val |= FTS_VAL; | ||
730 | writel(val, pcie->dbi_base + PORT_LOGIC_GEN2_CTRL); | ||
731 | |||
714 | if (pcie->max_speed >= 1 && pcie->max_speed <= 4) { | 732 | if (pcie->max_speed >= 1 && pcie->max_speed <= 4) { |
715 | val = readl(pcie->dbi_base + EP_CFG_LINK_CAP); | 733 | val = readl(pcie->dbi_base + EP_CFG_LINK_CAP); |
716 | val &= ~EP_CFG_LINK_CAP_MAX_SPEED_MASK; | 734 | val &= ~EP_CFG_LINK_CAP_MAX_SPEED_MASK; |