2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/pci/controller/dwc
Manivannan Sadhasivam 473b2cf9c4
PCI: endpoint: Introduce 'epc_deinit' event and notify the EPF drivers
As like the 'epc_init' event, that is used to signal the EPF drivers about
the EPC initialization, let's introduce 'epc_deinit' event that is used to
signal EPC deinitialization.

The EPC deinitialization applies only when any sort of fundamental reset
is supported by the endpoint controller as per the PCIe spec.

Reference: PCIe r6.0, sec 4.2.5.9.1 and 6.6.1.

Currently, some EPC drivers like pcie-qcom-ep and pcie-tegra194 support
PERST# as the fundamental reset. So the 'deinit' event will be notified to
the EPF drivers when PERST# assert happens in the above mentioned EPC
drivers.

The EPF drivers, on receiving the event through the epc_deinit() callback
should reset the EPF state machine and also cleanup any configuration that
got affected by the fundamental reset like BAR, DMA etc...

This change also warrants skipping the cleanups in unbind() if already done
in epc_deinit().

Link: https://lore.kernel.org/r/20240606-pci-deinit-v1-2-4395534520dc@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
2024-07-04 14:40:53 +00:00
..
Kconfig PCI: dwc: Convert SOC_SIFIVE to ARCH_SIFIVE 2023-12-16 00:22:37 +00:00
Makefile PCI: rcar-gen4: Add R-Car Gen4 PCIe controller support for host mode 2023-10-23 12:40:10 +00:00
pci-dra7xx.c PCI: endpoint: Remove "core_init_notifier" flag 2024-04-10 17:52:42 +00:00
pci-exynos.c Merge branch 'pci/controller/remove-void-return' 2024-01-15 12:10:40 -06:00
pci-imx6.c PCI: endpoint: Remove "core_init_notifier" flag 2024-04-10 17:52:42 +00:00
pci-keystone.c PCI: endpoint: Remove "core_init_notifier" flag 2024-04-10 17:52:42 +00:00
pci-layerscape-ep.c PCI: endpoint: Remove "core_init_notifier" flag 2024-04-10 17:52:42 +00:00
pci-layerscape.c Merge branch 'pci/controller/layerscape' 2024-01-15 12:10:38 -06:00
pci-meson.c PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members 2024-01-06 07:51:08 +00:00
pcie-al.c PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members 2024-01-06 07:51:08 +00:00
pcie-armada8k.c PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members 2024-01-06 07:51:08 +00:00
pcie-artpec6.c PCI: endpoint: Remove "core_init_notifier" flag 2024-04-10 17:52:42 +00:00
pcie-bt1.c PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members 2024-01-06 07:51:08 +00:00
pcie-designware-ep.c PCI: endpoint: Introduce 'epc_deinit' event and notify the EPF drivers 2024-07-04 14:40:53 +00:00
pcie-designware-host.c PCI: dwc: Strengthen the MSI address allocation logic 2024-03-10 18:08:04 +00:00
pcie-designware-plat.c PCI: endpoint: Remove "core_init_notifier" flag 2024-04-10 17:52:42 +00:00
pcie-designware.c PCI: dwc: Expose dw_pcie_write_dbi2() to module 2023-10-23 12:39:17 +00:00
pcie-designware.h PCI: dwc: ep: Rename dw_pcie_ep_init_complete() to dw_pcie_ep_init_registers() 2024-04-10 17:51:28 +00:00
pcie-dw-rockchip.c Merge branch 'pci/irq-clean-up' 2024-01-15 12:10:40 -06:00
pcie-fu740.c PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members 2024-01-06 07:51:08 +00:00
pcie-hisi.c PCI: hisi: Avoid invalid address space conversions 2022-01-03 15:05:28 -06:00
pcie-histb.c PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members 2024-01-06 07:51:08 +00:00
pcie-intel-gw.c Merge branch 'pci/controller/dwc' 2024-01-15 12:10:37 -06:00
pcie-keembay.c PCI: endpoint: Remove "core_init_notifier" flag 2024-04-10 17:52:42 +00:00
pcie-kirin.c Merge branch 'pci/controller/remove-void-return' 2024-01-15 12:10:40 -06:00
pcie-qcom-ep.c PCI: endpoint: Introduce 'epc_deinit' event and notify the EPF drivers 2024-07-04 14:40:53 +00:00
pcie-qcom.c pci-v6.9-changes 2024-03-14 10:58:27 -07:00
pcie-rcar-gen4.c PCI: endpoint: Remove "core_init_notifier" flag 2024-04-10 17:52:42 +00:00
pcie-spear13xx.c PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members 2024-01-06 07:51:08 +00:00
pcie-tegra194-acpi.c PCI: dwc: Simplify in/outbound iATU setup methods 2022-08-01 15:15:09 -05:00
pcie-tegra194.c PCI: endpoint: Introduce 'epc_deinit' event and notify the EPF drivers 2024-07-04 14:40:53 +00:00
pcie-uniphier-ep.c PCI: endpoint: Remove "core_init_notifier" flag 2024-04-10 17:52:42 +00:00
pcie-uniphier.c Merge branch 'pci/irq-clean-up' 2024-01-15 12:10:40 -06:00
pcie-visconti.c PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members 2024-01-06 07:51:08 +00:00