U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>,
	u-boot@lists.denx.de, sr@denx.de
Cc: trini@konsulko.com, git@amd.com
Subject: Re: [PATCH] pci: zynqmp: Fix the pcireg base
Date: Wed, 21 May 2025 15:10:47 +0200	[thread overview]
Message-ID: <fcffae16-227e-405e-858f-e7481e2658ac@amd.com> (raw)
In-Reply-To: <20250516092314.939424-1-venkatesh.abbarapu@amd.com>



On 5/16/25 11:23, Venkatesh Yadav Abbarapu wrote:
> The pcireg base is not assigned to any address, reading the
> pcireg base with PS_LINKUP_OFFSET which is incorrect and
> giving random values. So update the pcireg base from
> devicetree so that we can read the valid PCIE link status
> and PHY ready status.
> 
> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
> ---
>   drivers/pci/pcie-xilinx-nwl.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/pci/pcie-xilinx-nwl.c b/drivers/pci/pcie-xilinx-nwl.c
> index 7ef2bdf57b5..e03ab3be912 100644
> --- a/drivers/pci/pcie-xilinx-nwl.c
> +++ b/drivers/pci/pcie-xilinx-nwl.c
> @@ -303,6 +303,13 @@ static int nwl_pcie_parse_dt(struct nwl_pcie *pcie)
>   		return PTR_ERR(pcie->breg_base);
>   	pcie->phys_breg_base = res.start;
>   
> +	ret = dev_read_resource_byname(dev, "pcireg", &res);
> +	if (ret)
> +		return ret;
> +	pcie->pcireg_base = devm_ioremap(dev, res.start, resource_size(&res));
> +	if (IS_ERR(pcie->pcireg_base))
> +		return PTR_ERR(pcie->pcireg_base);
> +
>   	ret = dev_read_resource_byname(dev, "cfg", &res);
>   	if (ret)
>   		return ret;

Applied.
M

      parent reply	other threads:[~2025-05-21 13:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-16  9:23 [PATCH] pci: zynqmp: Fix the pcireg base Venkatesh Yadav Abbarapu
2025-05-19  6:45 ` Stefan Roese
2025-05-21 13:10 ` Michal Simek [this message]

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=fcffae16-227e-405e-858f-e7481e2658ac@amd.com \
    --to=michal.simek@amd.com \
    --cc=git@amd.com \
    --cc=sr@denx.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=venkatesh.abbarapu@amd.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