]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
PCI: intel-gw: Add .start_link() callback
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 17 Apr 2026 08:35:49 +0000 (10:35 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 11 May 2026 23:19:15 +0000 (18:19 -0500)
The pcie-intel-gw driver had no .start_link() callback.  Add one so the
driver works again and does not abort with the following error messages
during probing:

  intel-gw-pcie d1000000.pcie: host bridge /soc/pcie@d1000000 ranges:
  intel-gw-pcie d1000000.pcie:      MEM 0x00dc000000..0x00ddffffff -> 0x00dc000000
  intel-combo-phy d0c00000.combo-phy: Set combo mode: combophy[1]: mode: PCIe single lane mode
  intel-gw-pcie d1000000.pcie: No outbound iATU found
  intel-gw-pcie d1000000.pcie: Cannot initialize host
  intel-gw-pcie d1000000.pcie: probe with driver intel-gw-pcie failed with error -22
  intel-gw-pcie c1100000.pcie: host bridge /soc/pcie@c1100000 ranges:
  intel-gw-pcie c1100000.pcie:      MEM 0x00ce000000..0x00cfffffff -> 0x00ce000000
  intel-combo-phy c0c00000.combo-phy: Set combo mode: combophy[3]: mode: PCIe single lane mode
  intel-gw-pcie c1100000.pcie: No outbound iATU found
  intel-gw-pcie c1100000.pcie: Cannot initialize host
  intel-gw-pcie c1100000.pcie: probe with driver intel-gw-pcie failed with error -22

Fixes: c5097b9869a1 ("Revert "PCI: dwc: Wait for link up only if link is started"")
Fixes: da56a1bfbab5 ("PCI: dwc: Wait for link up only if link is started")
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
[bhelgaas: remove timestamps]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20260417-pcie-intel-gw-v5-5-0a2b933fe04f@dev.tdt.de
drivers/pci/controller/dwc/pcie-intel-gw.c

index 6d9499d954674a26a74bff56b7fb5759767424c0..afd933050c92ee31c477e0b1738ab1136bdcfbf6 100644 (file)
@@ -284,6 +284,16 @@ static void intel_pcie_turn_off(struct intel_pcie *pcie)
        pcie_rc_cfg_wr_mask(pcie, PCI_COMMAND, PCI_COMMAND_MEMORY, 0);
 }
 
+static int intel_pcie_start_link(struct dw_pcie *pci)
+{
+       struct intel_pcie *pcie = dev_get_drvdata(pci->dev);
+
+       intel_pcie_device_rst_deassert(pcie);
+       intel_pcie_ltssm_enable(pcie);
+
+       return 0;
+}
+
 static int intel_pcie_host_setup(struct intel_pcie *pcie)
 {
        int ret;
@@ -310,25 +320,12 @@ static int intel_pcie_host_setup(struct intel_pcie *pcie)
        intel_pcie_link_setup(pcie);
        intel_pcie_init_n_fts(pci);
 
-       ret = dw_pcie_setup_rc(&pci->pp);
-       if (ret)
-               goto err;
-
        dw_pcie_upconfig_setup(pci);
 
-       intel_pcie_device_rst_deassert(pcie);
-       intel_pcie_ltssm_enable(pcie);
-
-       ret = dw_pcie_wait_for_link(pci);
-       if (ret)
-               goto err;
-
        intel_pcie_core_irq_enable(pcie);
 
        return 0;
 
-err:
-       phy_exit(pcie->phy);
 phy_err:
        clk_disable_unprepare(pcie->core_clk);
 clk_err:
@@ -386,6 +383,7 @@ static int intel_pcie_rc_init(struct dw_pcie_rp *pp)
 }
 
 static const struct dw_pcie_ops intel_pcie_ops = {
+       .start_link = intel_pcie_start_link,
 };
 
 static const struct dw_pcie_host_ops intel_pcie_dw_ops = {