[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200430185522.4116-3-james.quinlan@broadcom.com>
Date: Thu, 30 Apr 2020 14:55:20 -0400
From: Jim Quinlan <james.quinlan@...adcom.com>
To: james.quinlan@...adcom.com
Cc: Jim Quinlan <james.quinlan@...adcom.com>,
Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Florian Fainelli <f.fainelli@...il.com>,
bcm-kernel-feedback-list@...adcom.com (maintainer:BROADCOM BCM7XXX ARM
ARCHITECTURE),
linux-rpi-kernel@...ts.infradead.org (moderated list:BROADCOM
BCM2711/BCM2835 ARM ARCHITECTURE),
linux-arm-kernel@...ts.infradead.org (moderated list:BROADCOM
BCM2711/BCM2835 ARM ARCHITECTURE),
linux-pci@...r.kernel.org (open list:PCI NATIVE HOST BRIDGE AND
ENDPOINT DRIVERS), linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 3/5] PCI: brcmstb: enable CRS
From: Jim Quinlan <jquinlan@...adcom.com>
Configuration Retry Request Status is off by default on this
PCIe controller. Turn it on.
Signed-off-by: Jim Quinlan <jquinlan@...adcom.com>
---
drivers/pci/controller/pcie-brcmstb.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 5b0dec5971b8..2bc913c0262c 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -34,6 +34,9 @@
#define BRCM_PCIE_CAP_REGS 0x00ac
/* Broadcom STB PCIe Register Offsets */
+#define PCIE_RC_CFG_PCIE_ROOT_CAP_CONTROL 0x00c8
+#define PCIE_RC_CFG_PCIE_ROOT_CAP_CONTROL_RC_CRS_EN_MASK 0x10
+
#define PCIE_RC_CFG_VENDOR_VENDOR_SPECIFIC_REG1 0x0188
#define PCIE_RC_CFG_VENDOR_VENDOR_SPECIFIC_REG1_ENDIAN_MODE_BAR2_MASK 0xc
#define PCIE_RC_CFG_VENDOR_SPCIFIC_REG1_LITTLE_ENDIAN 0x0
@@ -827,6 +830,12 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie)
pci_speed_string(pcie_link_speed[cls]), nlw,
ssc_good ? "(SSC)" : "(!SSC)");
+ /* Enable configuration request retry (CRS) */
+ tmp = readl(base + PCIE_RC_CFG_PCIE_ROOT_CAP_CONTROL);
+ u32p_replace_bits(&tmp, 1,
+ PCIE_RC_CFG_PCIE_ROOT_CAP_CONTROL_RC_CRS_EN_MASK);
+ writel(tmp, base + PCIE_RC_CFG_PCIE_ROOT_CAP_CONTROL);
+
/* PCIe->SCB endian mode for BAR */
tmp = readl(base + PCIE_RC_CFG_VENDOR_VENDOR_SPECIFIC_REG1);
u32p_replace_bits(&tmp, PCIE_RC_CFG_VENDOR_SPCIFIC_REG1_LITTLE_ENDIAN,
--
2.17.1
Powered by blists - more mailing lists