]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: dwc: Replace certain BAR_RESERVED with BAR_DISABLED in glue drivers
authorNiklas Cassel <cassel@kernel.org>
Thu, 12 Mar 2026 13:02:34 +0000 (14:02 +0100)
committerManivannan Sadhasivam <mani@kernel.org>
Sun, 15 Mar 2026 16:34:28 +0000 (22:04 +0530)
commit5a95fecbdd4216d0451c9e7e332ffd0b6e239f0e
treee4645c80830e8b927155001951d2857ab5245c88
parent33642e9e36dc084e4fc9245a266c9843bc8303b9
PCI: dwc: Replace certain BAR_RESERVED with BAR_DISABLED in glue drivers

Most DWC based EPC glue drivers that have BARs marked as BAR_RESERVED in
epc_features also call dw_pcie_ep_reset_bar() for these reserved BARs in
ep->ops->init(). (The only exception is pci-keystone.c.)

An EPF driver will be able to get/enable BARs that have been disabled/reset
using dw_pcie_ep_reset_bar(), except if the BAR is marked as BAR_RESERVED
(see pci_epc_get_next_free_bar()).

Thus, all EPC drivers that have BARs marked as BAR_RESERVED in epc_features
and call dw_pcie_ep_reset_bar(), should really have these BARs marked as
BAR_DISABLED. If dw_pcie_ep_reset_bar() is not called by the glue driver,
the BARs are kept as BAR_RESERVED.

No EPC drivers outside drivers/pci/controllers/dwc mark their BARs as
BAR_RESERVED, so there is nothing to do in non-DWC based EPC drivers.

Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Tested-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Tested-by: Koichiro Den <den@valinux.co.jp>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260312130229.2282001-18-cassel@kernel.org
drivers/pci/controller/dwc/pci-imx6.c
drivers/pci/controller/dwc/pci-keystone.c
drivers/pci/controller/dwc/pcie-rcar-gen4.c
drivers/pci/controller/dwc/pcie-tegra194.c
drivers/pci/controller/dwc/pcie-uniphier-ep.c