summaryrefslogtreecommitdiff
path: root/drivers/pci/controller
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@mailbox.org>2026-07-07 22:35:39 +0200
committerBjorn Helgaas <bhelgaas@google.com>2026-07-09 16:27:50 -0500
commit09aad32189e4c7fa0fa624a4939acda4e4ef9ae7 (patch)
treeecd6b575a0145a2822cdac82d786a056b3c18e50 /drivers/pci/controller
parentdc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff)
downloadlinux-next-09aad32189e4c7fa0fa624a4939acda4e4ef9ae7.tar.gz
linux-next-09aad32189e4c7fa0fa624a4939acda4e4ef9ae7.zip
PCI: dwc: Move iMSI-RX check before calling 'pp->ops->init()'
The R-Car Gen4 PCIe controller integration configures MSI registers in the controller driver pp->ops->init() callback because they have to be configured while PERST# is asserted, and PERST# is asserted across the controller driver pp->ops->init() callback. A future change to the R-Car Gen4 pp->ops->init() callback will need to know whether iMSI-RX is in use. Assign pp->use_imsi_rx before calling pp->ops->init() so pp->use_imsi_rx is available. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260707203743.88299-2-marek.vasut+renesas@mailbox.org
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r--drivers/pci/controller/dwc/pcie-designware-host.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
index 06722259d2e3..f5a38e6fd8d7 100644
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -587,6 +587,12 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
if (ret)
return ret;
+ if (pci_msi_enabled()) {
+ pp->use_imsi_rx = !(pp->ops->msi_init ||
+ of_property_present(np, "msi-parent") ||
+ of_property_present(np, "msi-map"));
+ }
+
if (pp->ops->init) {
ret = pp->ops->init(pp);
if (ret)
@@ -594,10 +600,6 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
}
if (pci_msi_enabled()) {
- pp->use_imsi_rx = !(pp->ops->msi_init ||
- of_property_present(np, "msi-parent") ||
- of_property_present(np, "msi-map"));
-
/*
* For the use_imsi_rx case the default assignment is handled
* in the dw_pcie_msi_host_init().