Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Ioana Ciornei <ioana.ciornei@nxp.com>
Cc: "Roy Zang" <roy.zang@nxp.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
	"Frank Li" <Frank.Li@nxp.com>,
	linux-pci@vger.kernel.org, imx@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: layerscape: fix index passed to syscon_regmap_lookup_by_phandle_args
Date: Thu, 27 Mar 2025 12:55:57 -0500	[thread overview]
Message-ID: <20250327175557.GA1438048@bhelgaas> (raw)
In-Reply-To: <20250327151949.2765193-1-ioana.ciornei@nxp.com>

On Thu, Mar 27, 2025 at 05:19:49PM +0200, Ioana Ciornei wrote:
> The arg_count variable passed to the
> syscon_regmap_lookup_by_phandle_args() function represents the number of
> argument cells following the phandle. In this case, the number of
> arguments should be 1 instead of 2 since the dt property looks like
> below.
> 	fsl,pcie-scfg = <&scfg 0>;
> 
> Without this fix, layerscape-pcie fails with the following message on
> LS1043A:
> 
> [    0.157041] OF: /soc/pcie@3500000: phandle scfg@1570000 needs 2, found 1
> [    0.157050] layerscape-pcie 3500000.pcie: No syscfg phandle specified
> [    0.157053] layerscape-pcie 3500000.pcie: probe with driver layerscape-pcie failed with error -22
> 
> Fixes: 149fc35734e5 ("PCI: layerscape: Use syscon_regmap_lookup_by_phandle_args")
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>

Thanks, applied to pci/controller/layerscape for v6.15.  Hopefully the
last change for this cycle :)

Thanks for the message sample.  I dropped the timestamps because
they're not really relevant here.

> ---
>  drivers/pci/controller/dwc/pci-layerscape.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c
> index 239a05b36e8e..a44b5c256d6e 100644
> --- a/drivers/pci/controller/dwc/pci-layerscape.c
> +++ b/drivers/pci/controller/dwc/pci-layerscape.c
> @@ -356,7 +356,7 @@ static int ls_pcie_probe(struct platform_device *pdev)
>  	if (pcie->drvdata->scfg_support) {
>  		pcie->scfg =
>  			syscon_regmap_lookup_by_phandle_args(dev->of_node,
> -							     "fsl,pcie-scfg", 2,
> +							     "fsl,pcie-scfg", 1,
>  							     index);
>  		if (IS_ERR(pcie->scfg)) {
>  			dev_err(dev, "No syscfg phandle specified\n");
> -- 
> 2.34.1
> 

  parent reply	other threads:[~2025-03-27 17:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-27 15:19 [PATCH] PCI: layerscape: fix index passed to syscon_regmap_lookup_by_phandle_args Ioana Ciornei
2025-03-27 15:30 ` Krzysztof Kozlowski
2025-03-27 15:32   ` Roy Zang
2025-03-27 15:35 ` Frank Li
2025-03-27 17:55 ` Bjorn Helgaas [this message]
2025-03-27 18:15   ` Bjorn Helgaas

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=20250327175557.GA1438048@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=imx@lists.linux.dev \
    --cc=ioana.ciornei@nxp.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=robh@kernel.org \
    --cc=roy.zang@nxp.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