]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pinctrl: imx: use devfdt_get_addr_size_index
authorPeng Fan <peng.fan@nxp.com>
Tue, 6 Aug 2019 10:05:48 +0000 (10:05 +0000)
committerStefano Babic <sbabic@denx.de>
Tue, 8 Oct 2019 14:35:16 +0000 (16:35 +0200)
fdtdec_get_addr_size could not parse addr/size correctly is
using address-cells 2 and size-cells 2 on an ARM32 SoC.
So switch to use devfdt_get_addr_size_index.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/pinctrl/nxp/pinctrl-imx.c

index 0c9d15cb0c9a79f763776640df493e64f0c1f61a..69c4144365541d1481478bd991dbb02845951e9a 100644 (file)
@@ -214,9 +214,7 @@ int imx_pinctrl_probe(struct udevice *dev,
        if (info->flags & IMX8_USE_SCU)
                return 0;
 
-       addr = fdtdec_get_addr_size(gd->fdt_blob, dev_of_offset(dev), "reg",
-                                   &size);
-
+       addr = devfdt_get_addr_size_index(dev, 0, &size);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;