devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Conor Dooley <conor.dooley@microchip.com>
Cc: "Daire McNamara" <daire.mcnamara@microchip.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCH v1 2/2] PCI: microchip: rework reg region handing
Date: Tue, 11 Jun 2024 14:12:45 +0100	[thread overview]
Message-ID: <20240611-relapsing-hurt-3a5f37743784@spud> (raw)
In-Reply-To: <20240527-flint-whacky-4fb21c38476b@wendy>

[-- Attachment #1: Type: text/plain, Size: 1508 bytes --]

On Mon, May 27, 2024 at 10:37:17AM +0100, Conor Dooley wrote:
> @@ -1150,28 +1129,44 @@ static int mc_host_probe(struct platform_device *pdev)
>  
>  	port->dev = dev;
>  
> -	port->axi_base_addr = devm_platform_ioremap_resource(pdev, 1);
> -	if (IS_ERR(port->axi_base_addr))
> -		return PTR_ERR(port->axi_base_addr);
> +	/*
> +	 * The original, incorrect, binding that lumped the control and
> +	 * bridge addresses together still needs to be handled by the driver.
> +	 */
> +	axi_base_addr = devm_platform_ioremap_resource_byname(pdev, "apb");

I noticed yesterday that this will print an error during boot, which I
don't really want for the devices using the updated format. I'll send a
v2 tomorrow with the reg region probing inverted.

Thanks,
Conor.

> +	if (!IS_ERR(axi_base_addr)) {
> +		port->bridge_base_addr = axi_base_addr + MC_PCIE1_BRIDGE_ADDR;
> +		port->ctrl_base_addr = axi_base_addr + MC_PCIE1_CTRL_ADDR;
> +		goto addrs_set;
> +	}
>  
> +	port->bridge_base_addr = devm_platform_ioremap_resource_byname(pdev, "bridge");
> +	if (IS_ERR(port->bridge_base_addr))
> +		return dev_err_probe(dev, PTR_ERR(port->bridge_base_addr),
> +				     "legacy apb register and bridge region missing");
> +
> +	port->ctrl_base_addr = devm_platform_ioremap_resource_byname(pdev, "ctrl");
> +	if (IS_ERR(port->ctrl_base_addr))
> +		return dev_err_probe(dev, PTR_ERR(port->ctrl_base_addr),
> +				     "legacy apb register and ctrl region missing");
> +
> +addrs_set:
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2024-06-11 13:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-27  9:37 [PATCH v1 0/2] PCI: microchip: support using either instance 1 or 2 Conor Dooley
2024-05-27  9:37 ` [PATCH v1 1/2] dt-bindings: PCI: microchip,pcie-host: fix reg properties Conor Dooley
2024-05-27 12:24   ` Krzysztof Kozlowski
2024-05-27  9:37 ` [PATCH v1 2/2] PCI: microchip: rework reg region handing Conor Dooley
2024-06-11 13:12   ` Conor Dooley [this message]
2024-06-11 17:10   ` Bjorn Helgaas
2024-06-11 17:56     ` Conor Dooley

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=20240611-relapsing-hurt-3a5f37743784@spud \
    --to=conor@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=daire.mcnamara@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=robh@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).