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:
signature.asc
Description: PGP signature