[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240611-relapsing-hurt-3a5f37743784@spud>
Date: Tue, 11 Jun 2024 14:12:45 +0100
From: Conor Dooley <conor@...nel.org>
To: Conor Dooley <conor.dooley@...rochip.com>
Cc: Daire McNamara <daire.mcnamara@...rochip.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Rob Herring <robh@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, linux-pci@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org
Subject: Re: [PATCH v1 2/2] PCI: microchip: rework reg region handing
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:
>
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists