[PATCH v2 3/3] PCI: dwc: Create debugfs files in DWC driver

From: Shradha Todi
Date: Thu Nov 30 2023 - 08:52:33 EST


Add call to initialize debugfs from DWC driver and create the RASDES
debugfs hierarchy for each platform driver. Since it can be used for
both DW HOST controller as well as DW EP controller, add it in the
common setup function.

Signed-off-by: Shradha Todi <shradha.t@xxxxxxxxxxx>
---
drivers/pci/controller/dwc/pcie-designware.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
index 064b4951afd8..16c9018c2ada 100644
--- a/drivers/pci/controller/dwc/pcie-designware.c
+++ b/drivers/pci/controller/dwc/pcie-designware.c
@@ -1074,4 +1074,8 @@ void dw_pcie_setup(struct dw_pcie *pci)
break;
}
dw_pcie_writel_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL, val);
+
+ val = dwc_pcie_rasdes_debugfs_init(pci);
+ if (val)
+ dev_err(pci->dev, "Couldn't create debugfs files\n");
}
--
2.17.1