Skip to content

Commit 9daf2a8

Browse files
Manikanta Maddireddygregkh
authored andcommitted
PCI: dwc: Apply ECRC workaround to DesignWare 5.00a as well
[ Upstream commit 40805f3 ] The ECRC (TLP digest) workaround was originally added for DesignWare version 4.90a. Tegra234 SoC has 5.00a DWC HW version, which has the same ATU TD override behaviour, so apply the workaround for 5.00a too. Fixes: a54e190 ("PCI: tegra194: Add Tegra234 PCIe support") Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Vidya Sagar <vidyas@nvidia.com> Link: https://patch.msgid.link/20260324190755.1094879-13-mmaddireddy@nvidia.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 5cb649c commit 9daf2a8

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

drivers/pci/controller/dwc/pcie-designware.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,13 @@ static inline void dw_pcie_writel_atu_ob(struct dw_pcie *pci, u32 index, u32 reg
486486
static inline u32 dw_pcie_enable_ecrc(u32 val)
487487
{
488488
/*
489-
* DesignWare core version 4.90A has a design issue where the 'TD'
490-
* bit in the Control register-1 of the ATU outbound region acts
491-
* like an override for the ECRC setting, i.e., the presence of TLP
492-
* Digest (ECRC) in the outgoing TLPs is solely determined by this
493-
* bit. This is contrary to the PCIe spec which says that the
494-
* enablement of the ECRC is solely determined by the AER
495-
* registers.
489+
* DWC versions 0x3530302a and 0x3536322a have a design issue where
490+
* the 'TD' bit in the Control register-1 of the ATU outbound
491+
* region acts like an override for the ECRC setting, i.e., the
492+
* presence of TLP Digest (ECRC) in the outgoing TLPs is solely
493+
* determined by this bit. This is contrary to the PCIe spec which
494+
* says that the enablement of the ECRC is solely determined by the
495+
* AER registers.
496496
*
497497
* Because of this, even when the ECRC is enabled through AER
498498
* registers, the transactions going through ATU won't have TLP
@@ -559,7 +559,7 @@ int dw_pcie_prog_outbound_atu(struct dw_pcie *pci,
559559
if (upper_32_bits(limit_addr) > upper_32_bits(parent_bus_addr) &&
560560
dw_pcie_ver_is_ge(pci, 460A))
561561
val |= PCIE_ATU_INCREASE_REGION_SIZE;
562-
if (dw_pcie_ver_is(pci, 490A))
562+
if (dw_pcie_ver_is(pci, 490A) || dw_pcie_ver_is(pci, 500A))
563563
val = dw_pcie_enable_ecrc(val);
564564
dw_pcie_writel_atu_ob(pci, atu->index, PCIE_ATU_REGION_CTRL1, val);
565565

0 commit comments

Comments
 (0)