mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Eckert <fe@dev.tdt.de>
To: "Chuanhua Lei" <lchuanhua@maxlinear.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Johan Hovold" <johan+linaro@kernel.org>,
	"Sajid Dalvi" <sdalvi@google.com>,
	"Ajay Agarwal" <ajayagarwal@google.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Florian Eckert <fe@dev.tdt.de>
Subject: [PATCH 3/5] PCI: intel-gw: Add start_link callback function
Date: Tue, 17 Mar 2026 11:12:51 +0100	[thread overview]
Message-ID: <20260317-pcie-intel-gw-v1-3-7fe13726ad4f@dev.tdt.de> (raw)
In-Reply-To: <20260317-pcie-intel-gw-v1-0-7fe13726ad4f@dev.tdt.de>

The pcie-intel-gw driver has no start_link callback function. This commit
adds the missing callback function so that the driver works again and does
not abort with an error during probing.

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>
---
 drivers/pci/controller/dwc/pcie-intel-gw.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/pci/controller/dwc/pcie-intel-gw.c b/drivers/pci/controller/dwc/pcie-intel-gw.c
index 6110a8adb8732dbbd5e9e2db68a0606ccf032ae1..6bd25f8da605032bfdb97596fb3a1f6a03e88bfc 100644
--- a/drivers/pci/controller/dwc/pcie-intel-gw.c
+++ b/drivers/pci/controller/dwc/pcie-intel-gw.c
@@ -285,6 +285,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,20 +320,8 @@ static int intel_pcie_host_setup(struct intel_pcie *pcie)
 	intel_pcie_ltssm_disable(pcie);
 	intel_pcie_link_setup(pcie);
 	intel_pcie_init_n_fts(pci);
-
-	ret = dw_pcie_setup_rc(&pci->pp);
-	if (ret)
-		goto phy_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 phy_err;
-
 	intel_pcie_core_irq_enable(pcie);
 
 	return 0;
@@ -386,6 +384,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 = {

-- 
2.47.3


  parent reply	other threads:[~2026-03-17 10:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 10:12 [PATCH 0/5] PCI: intel-gw: Fixes to make the driver working again Florian Eckert
2026-03-17 10:12 ` [PATCH 1/5] PCI: intel-gw: Move interrupt enable to own function Florian Eckert
2026-03-26 14:00   ` Manivannan Sadhasivam
2026-03-27  8:18     ` Florian Eckert
2026-03-27 10:00       ` Manivannan Sadhasivam
2026-03-17 10:12 ` [PATCH 2/5] PCI: intel-gw: Enable clock before phy init Florian Eckert
2026-03-26 16:08   ` Manivannan Sadhasivam
2026-03-27  7:42     ` Florian Eckert
2026-03-27 10:02       ` Manivannan Sadhasivam
2026-03-17 10:12 ` Florian Eckert [this message]
2026-03-26 16:13   ` [PATCH 3/5] PCI: intel-gw: Add start_link callback function Manivannan Sadhasivam
2026-03-17 10:12 ` [PATCH 4/5] PCI: intel-gw: Remove atu base assignment Florian Eckert
2026-03-26 16:15   ` Manivannan Sadhasivam
2026-03-27 11:44     ` Florian Eckert
2026-03-30  7:14       ` Manivannan Sadhasivam
2026-03-17 10:12 ` [PATCH 5/5] PCI: intel-gw: Remove unused define Florian Eckert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260317-pcie-intel-gw-v1-3-7fe13726ad4f@dev.tdt.de \
    --to=fe@dev.tdt.de \
    --cc=ajayagarwal@google.com \
    --cc=bhelgaas@google.com \
    --cc=johan+linaro@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=lchuanhua@maxlinear.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=robh@kernel.org \
    --cc=sdalvi@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®