]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
pci: imx: Use dev_read_addr_index_ptr()
authorPeng Fan <peng.fan@nxp.com>
Tue, 26 May 2026 08:09:12 +0000 (16:09 +0800)
committerNeil Armstrong <neil.armstrong@linaro.org>
Wed, 1 Jul 2026 09:42:52 +0000 (11:42 +0200)
Use dev_read_addr_index_ptr() which support both live device tree and flat
DT backends, avoiding direct dependency on devfdt_* helpers.

No functional changes

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260526-devfdt-pci-v1-4-ed7f31d73938@nxp.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
drivers/pci/pcie_imx.c

index 8d853ecf2c22331c98b6cb77817ebfd97431ada9..c8b8e171e39c27aeb5170a0c35fa573fa1dba66f 100644 (file)
@@ -774,8 +774,8 @@ static int imx_pcie_of_to_plat(struct udevice *dev)
 {
        struct imx_pcie_priv *priv = dev_get_priv(dev);
 
-       priv->dbi_base = devfdt_get_addr_index_ptr(dev, 0);
-       priv->cfg_base = devfdt_get_addr_index_ptr(dev, 1);
+       priv->dbi_base = dev_read_addr_index_ptr(dev, 0);
+       priv->cfg_base = dev_read_addr_index_ptr(dev, 1);
        if (!priv->dbi_base || !priv->cfg_base)
                return -EINVAL;