forked from OERV-BSP/u-boot
dm: Use dev_get_addr() where possible
This is a convenient way for a driver to get the hardware address of a device, when regmap or syscon are not being used. Change existing callers to use it as an example to others. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
This commit is contained in:
@@ -343,8 +343,7 @@ static int gpio_tegra_bind(struct udevice *parent)
|
||||
if (!fdt_getprop(gd->fdt_blob, parent->of_offset, "interrupts", &len))
|
||||
return -EINVAL;
|
||||
bank_count = len / 3 / sizeof(u32);
|
||||
ctlr = (struct gpio_ctlr *)fdtdec_get_addr(gd->fdt_blob,
|
||||
parent->of_offset, "reg");
|
||||
ctlr = (struct gpio_ctlr *)dev_get_addr(parent);
|
||||
}
|
||||
#endif
|
||||
for (bank = 0; bank < bank_count; bank++) {
|
||||
|
||||
Reference in New Issue
Block a user