[PATCH v2 2/5] usb: ehci-mx6: Replace fdtdec_get_addr() with fdtdec_get_addr_size_auto_noparent()
alice.guo at oss.nxp.com
alice.guo at oss.nxp.com
Tue Dec 9 03:47:09 CET 2025
From: Alice Guo <alice.guo at nxp.com>
Replace fdtdec_get_addr() with fdtdec_get_addr_size_auto_noparent() so
that address and size are decoded according to the device tree’s
actual #address-cells and #size-cells.
Signed-off-by: Alice Guo <alice.guo at nxp.com>
---
drivers/usb/host/ehci-mx6.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 1838ed252cc..fdaf1002190 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -551,8 +551,8 @@ static int ehci_usb_phy_mode(struct udevice *dev)
if (phy_off < 0)
return -EINVAL;
- addr = (void __iomem *)fdtdec_get_addr(blob, phy_off,
- "reg");
+ addr = (void __iomem *)fdtdec_get_addr_size_auto_noparent(blob, phy_off,
+ "reg", 0, NULL, false);
if ((fdt_addr_t)addr == FDT_ADDR_T_NONE)
return -EINVAL;
@@ -620,13 +620,15 @@ static int mx6_parse_dt_addrs(struct udevice *dev)
if (misc_off < 0)
return -EINVAL;
- addr = (void __iomem *)fdtdec_get_addr(blob, phy_off, "reg");
+ addr = (void __iomem *)fdtdec_get_addr_size_auto_noparent(blob, phy_off,
+ "reg", 0, NULL, false);
if ((fdt_addr_t)addr == FDT_ADDR_T_NONE)
addr = NULL;
priv->phy_addr = addr;
- addr = (void __iomem *)fdtdec_get_addr(blob, misc_off, "reg");
+ addr = (void __iomem *)fdtdec_get_addr_size_auto_noparent(blob, misc_off,
+ "reg", 0, NULL, false);
if ((fdt_addr_t)addr == FDT_ADDR_T_NONE)
return -EINVAL;
@@ -646,7 +648,8 @@ static int mx6_parse_dt_addrs(struct udevice *dev)
if (anatop_off < 0)
return -EINVAL;
- addr = (void __iomem *)fdtdec_get_addr(blob, anatop_off, "reg");
+ addr = (void __iomem *)fdtdec_get_addr_size_auto_noparent(blob, anatop_off,
+ "reg", 0, NULL, false);
if ((fdt_addr_t)addr == FDT_ADDR_T_NONE)
return -EINVAL;
--
2.43.0
More information about the U-Boot
mailing list