summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorManikanta Maddireddy <mmaddireddy@nvidia.com>2019-06-18 23:31:46 +0530
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2019-06-20 17:20:25 +0100
commitc635a815c8c73a985b0e723efd4ffd70e99729fc (patch)
treed43c63704de1d8d17348dd2892f1842372ae982d /drivers/pci
parent538123a29aebca0ba7c35d69bd4d2b91d9d81026 (diff)
downloadlinux-c635a815c8c73a985b0e723efd4ffd70e99729fc.tar.bz2
PCI: tegra: Advertise PCIe Advanced Error Reporting (AER) capability
Default root port setting hides AER capability. This patch enables the advertisement of AER capability by root port. Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/controller/pci-tegra.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
index dfb13aee6322..c9687b5a6794 100644
--- a/drivers/pci/controller/pci-tegra.c
+++ b/drivers/pci/controller/pci-tegra.c
@@ -180,6 +180,9 @@
#define RP_VEND_XP 0x00000f00
#define RP_VEND_XP_DL_UP (1 << 30)
+#define RP_VEND_CTL1 0x00000f48
+#define RP_VEND_CTL1_ERPT (1 << 13)
+
#define RP_VEND_CTL2 0x00000fa8
#define RP_VEND_CTL2_PCA_ENABLE (1 << 7)
@@ -479,6 +482,16 @@ static void tegra_pcie_port_reset(struct tegra_pcie_port *port)
afi_writel(port->pcie, value, ctrl);
}
+static void tegra_pcie_enable_rp_features(struct tegra_pcie_port *port)
+{
+ u32 value;
+
+ /* Enable AER capability */
+ value = readl(port->base + RP_VEND_CTL1);
+ value |= RP_VEND_CTL1_ERPT;
+ writel(value, port->base + RP_VEND_CTL1);
+}
+
static void tegra_pcie_port_enable(struct tegra_pcie_port *port)
{
unsigned long ctrl = tegra_pcie_port_get_pex_ctrl(port);
@@ -503,6 +516,8 @@ static void tegra_pcie_port_enable(struct tegra_pcie_port *port)
value |= RP_VEND_CTL2_PCA_ENABLE;
writel(value, port->base + RP_VEND_CTL2);
}
+
+ tegra_pcie_enable_rp_features(port);
}
static void tegra_pcie_port_disable(struct tegra_pcie_port *port)