diff options
author | Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> | 2024-03-27 14:43:34 +0530 |
---|---|---|
committer | Krzysztof Wilczyński <kwilczynski@kernel.org> | 2024-04-10 17:50:06 +0000 |
commit | 570d7715eed8a29ac5bd96c7694f060a991e5a31 (patch) | |
tree | df0aab3641df6f1af1eaddb7fd18fb050b35924b /drivers/pci/controller/dwc/pcie-qcom-ep.c | |
parent | c8682a3314c1e247b253a5ffa22e8cc4cd7156cc (diff) |
PCI: dwc: ep: Introduce dw_pcie_ep_cleanup() API for drivers supporting PERST#
For DWC glue drivers supporting PERST# (currently Qcom and Tegra194), some
of the DWC resources like eDMA should be cleaned up during the PERST#
assert time.
So let's introduce a dw_pcie_ep_cleanup() API that could be called by these
drivers to cleanup the DWC specific resources. Currently, it just removes
eDMA.
Closes: https://lore.kernel.org/linux-pci/ZWYmX8Y%2F7Q9WMxES@x1-carbon
Link: https://lore.kernel.org/linux-pci/20240327-pci-dbi-rework-v12-5-082625472414@linaro.org
Reported-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-qcom-ep.c')
-rw-r--r-- | drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c index 36e5e80cd22f..59b1c0110288 100644 --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c @@ -507,6 +507,7 @@ static void qcom_pcie_perst_assert(struct dw_pcie *pci) return; } + dw_pcie_ep_cleanup(&pci->ep); qcom_pcie_disable_resources(pcie_ep); pcie_ep->link_status = QCOM_PCIE_EP_LINK_DISABLED; } |