[PATCH 3/3] misc: atsha204a: fix i2c address readout from DTS

Adrian Fiergolski adrian.fiergolski at fastree3d.com
Tue Dec 21 17:17:22 CET 2021


This patch replaces use fdtdec_get_addr with recommended fdtdec_get_addr_size_auto_parent.

Signed-off-by: Adrian Fiergolski <adrian.fiergolski at fastree3d.com>
---
 drivers/misc/atsha204a-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
index d264477927..1008b914c2 100644
--- a/drivers/misc/atsha204a-i2c.c
+++ b/drivers/misc/atsha204a-i2c.c
@@ -388,7 +388,7 @@ static int atsha204a_of_to_plat(struct udevice *dev)
 	fdt_addr_t *priv = dev_get_priv(dev);
 	fdt_addr_t addr;
 
-	addr = fdtdec_get_addr(gd->fdt_blob, dev_of_offset(dev), "reg");
+	addr = fdtdec_get_addr_size_auto_noparent(gd->fdt_blob, dev_of_offset(dev), "reg", 0, NULL, false);
 	if (addr == FDT_ADDR_T_NONE) {
 		debug("Can't get ATSHA204A I2C base address\n");
 		return -ENXIO;
-- 
2.34.1



More information about the U-Boot mailing list