aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci/controller/cadence/pcie-cadence.h
diff options
context:
space:
mode:
authorSiddharth Vadapalli <s-vadapalli@ti.com>2025-04-17 18:14:06 +0530
committerBjorn Helgaas <bhelgaas@google.com>2025-06-02 16:02:37 -0500
commit47f25da6c5ea55494f4de5ca1ecf6c456b4b3e2a (patch)
tree067ced3c232b27cef98a24e4317ca1e7ba919a9b /drivers/pci/controller/cadence/pcie-cadence.h
parentPCI: cadence: Add support to build pcie-cadence library as a kernel module (diff)
downloadwireguard-linux-47f25da6c5ea55494f4de5ca1ecf6c456b4b3e2a.tar.xz
wireguard-linux-47f25da6c5ea55494f4de5ca1ecf6c456b4b3e2a.zip
PCI: cadence-host: Introduce cdns_pcie_host_disable() helper for cleanup
Introduce the helper function cdns_pcie_host_disable() which will undo the configuration performed by cdns_pcie_host_setup(). Also, export it for use by existing callers of cdns_pcie_host_setup(), thereby allowing them to cleanup on their exit path. Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://patch.msgid.link/20250417124408.2752248-3-s-vadapalli@ti.com
Diffstat (limited to '')
-rw-r--r--drivers/pci/controller/cadence/pcie-cadence.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/controller/cadence/pcie-cadence.h b/drivers/pci/controller/cadence/pcie-cadence.h
index 033cade8bbf5..40ff5aadc94f 100644
--- a/drivers/pci/controller/cadence/pcie-cadence.h
+++ b/drivers/pci/controller/cadence/pcie-cadence.h
@@ -512,6 +512,7 @@ static inline bool cdns_pcie_link_up(struct cdns_pcie *pcie)
int cdns_pcie_host_link_setup(struct cdns_pcie_rc *rc);
int cdns_pcie_host_init(struct cdns_pcie_rc *rc);
int cdns_pcie_host_setup(struct cdns_pcie_rc *rc);
+void cdns_pcie_host_disable(struct cdns_pcie_rc *rc);
void __iomem *cdns_pci_map_bus(struct pci_bus *bus, unsigned int devfn,
int where);
#else
@@ -530,6 +531,10 @@ static inline int cdns_pcie_host_setup(struct cdns_pcie_rc *rc)
return 0;
}
+static inline void cdns_pcie_host_disable(struct cdns_pcie_rc *rc)
+{
+}
+
static inline void __iomem *cdns_pci_map_bus(struct pci_bus *bus, unsigned int devfn,
int where)
{