[PATCH] pinctrl: single: Fix address size reading
Jan Kiszka
jan.kiszka at siemens.com
Thu May 27 15:19:48 CEST 2021
From: Jan Kiszka <jan.kiszka at siemens.com>
dev_read_addr_size() is inconsistent in too many ways. In particular,
it does not retrieve the correct address/size cell number from the DT.
dev_read_addr_size_index() does the right thing, so use that for now.
This fixes reading the address size e.g. on boards with the 64-bit
AM65x where some pinctrl nodes only use 32-bit addresses and sizes.
Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
---
drivers/pinctrl/pinctrl-single.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index ebb7602dde..2769b7a7fd 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -509,7 +509,7 @@ static int single_of_to_plat(struct udevice *dev)
return -EINVAL;
}
- addr = dev_read_addr_size(dev, "reg", &size);
+ addr = dev_read_addr_size_index(dev, 0, &size);
if (addr == FDT_ADDR_T_NONE) {
dev_err(dev, "failed to get base register size\n");
return -EINVAL;
--
2.26.2
More information about the U-Boot
mailing list