[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240625093813.112555-4-shradha.t@samsung.com>
Date: Tue, 25 Jun 2024 15:08:13 +0530
From: Shradha Todi <shradha.t@...sung.com>
To: linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Cc: manivannan.sadhasivam@...aro.org, lpieralisi@...nel.org, kw@...ux.com,
robh@...nel.org, bhelgaas@...gle.com, jingoohan1@...il.com,
fancer.lancer@...il.com, yoshihiro.shimoda.uh@...esas.com,
conor.dooley@...rochip.com, pankaj.dubey@...sung.com, gost.dev@...sung.com,
Shradha Todi <shradha.t@...sung.com>
Subject: [PATCH 3/3] PCI: dwc: Create debugfs files in DWC driver
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@...sung.com>
---
drivers/pci/controller/dwc/pcie-designware-host.c | 2 ++
drivers/pci/controller/dwc/pcie-designware.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
index d15a5c2d5b48..c2e6f8484000 100644
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -537,6 +537,8 @@ void dw_pcie_host_deinit(struct dw_pcie_rp *pp)
pci_stop_root_bus(pp->bridge->bus);
pci_remove_root_bus(pp->bridge->bus);
+ dwc_pcie_rasdes_debugfs_deinit(pci);
+
dw_pcie_stop_link(pci);
dw_pcie_edma_remove(pci);
diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
index b74e4a97558e..ebb21ba75388 100644
--- a/drivers/pci/controller/dwc/pcie-designware.c
+++ b/drivers/pci/controller/dwc/pcie-designware.c
@@ -1084,4 +1084,8 @@ void dw_pcie_setup(struct dw_pcie *pci)
dw_pcie_writel_dbi(pci, PCIE_PORT_LINK_CONTROL, val);
dw_pcie_link_set_max_link_width(pci, pci->num_lanes);
+
+ val = dwc_pcie_rasdes_debugfs_init(pci);
+ if (val)
+ dev_err(pci->dev, "Couldn't create debugfs files\n");
}
--
2.17.1
Powered by blists - more mailing lists