Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: Sherry Sun <sherry.sun@nxp.com>
To: hongxing.zhu@nxp.com, l.stach@pengutronix.de, Frank.Li@nxp.com,
	bhelgaas@google.com, lpieralisi@kernel.org,
	kwilczynski@kernel.org, mani@kernel.org, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, s.hauer@pengutronix.de,
	festevam@gmail.com
Cc: imx@lists.linux.dev, kernel@pengutronix.de,
	linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH V6 03/12] PCI: dwc: Parse Root Port nodes in dw_pcie_host_init()
Date: Wed, 25 Feb 2026 18:55:14 +0800	[thread overview]
Message-ID: <20260225105523.748775-4-sherry.sun@nxp.com> (raw)
In-Reply-To: <20260225105523.748775-1-sherry.sun@nxp.com>

Add support for parsing Root Port child nodes in dw_pcie_host_init()
using pci_host_common_parse_ports(). This allows DWC-based drivers to
specify Root Port properties (like reset GPIOs) in individual Root Port
nodes rather than in the host bridge node.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
---
 drivers/pci/controller/dwc/pcie-designware-host.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
index 6ae6189e9b8a..6ceb146e9a04 100644
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -20,6 +20,7 @@
 #include <linux/platform_device.h>
 
 #include "../../pci.h"
+#include "../pci-host-common.h"
 #include "pcie-designware.h"
 
 static struct pci_ops dw_pcie_ops;
@@ -581,6 +582,13 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
 
 	pp->bridge = bridge;
 
+	/* Parse Root Port nodes if present */
+	ret = pci_host_common_parse_ports(dev, bridge);
+	if (ret && ret != -ENOENT) {
+		dev_err(dev, "Failed to parse Root Port nodes: %d\n", ret);
+		return ret;
+	}
+
 	ret = dw_pcie_host_get_resources(pp);
 	if (ret)
 		return ret;
-- 
2.37.1


  parent reply	other threads:[~2026-02-25 10:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25 10:55 [PATCH V6 00/12] pci-imx6: Add support for parsing the reset property in new Root Port binding Sherry Sun
2026-02-25 10:55 ` [PATCH V6 01/12] dt-bindings: PCI: fsl,imx6q-pcie: Add reset GPIO in Root Port node Sherry Sun
2026-02-25 10:55 ` [PATCH V6 02/12] PCI: host-generic: Add common helpers for parsing Root Port properties Sherry Sun
2026-02-25 10:55 ` Sherry Sun [this message]
2026-02-25 10:55 ` [PATCH V6 04/12] PCI: imx6: Add support for parsing the reset property in new Root Port binding Sherry Sun
2026-02-25 10:55 ` [PATCH V6 05/12] arm: dts: imx6qdl: Add Root Port node and PERST property Sherry Sun
2026-02-25 10:55 ` [PATCH V6 06/12] arm: dts: imx6sx: " Sherry Sun
2026-02-25 10:55 ` [PATCH V6 07/12] arm: dts: imx7d: " Sherry Sun
2026-02-25 10:55 ` [PATCH V6 08/12] arm64: dts: imx8mm: " Sherry Sun
2026-02-25 10:55 ` [PATCH V6 09/12] arm64: dts: imx8mp: " Sherry Sun
2026-02-25 10:55 ` [PATCH V6 10/12] arm64: dts: imx8mq: " Sherry Sun
2026-02-25 10:55 ` [PATCH V6 11/12] arm64: dts: imx8dxl/qm/qxp: " Sherry Sun
2026-02-25 10:55 ` [PATCH V6 12/12] arm64: dts: imx95: " Sherry Sun
2026-02-25 13:18 ` [PATCH V6 00/12] pci-imx6: Add support for parsing the reset property in new Root Port binding Manivannan Sadhasivam
2026-02-26  3:13   ` Sherry Sun

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=20260225105523.748775-4-sherry.sun@nxp.com \
    --to=sherry.sun@nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=hongxing.zhu@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --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=s.hauer@pengutronix.de \
    /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