From: Paweł Anikiel Date: Fri, 17 Jun 2022 10:47:22 +0000 (+0200) Subject: sysreset: socfpga: Use parent device for reading base address X-Git-Tag: baikal/mips/sdk5.9~3^2~10^2~5 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=3e79fa1d0687c5db65395ed9cd75827863fc137e;p=uboot.git sysreset: socfpga: Use parent device for reading base address This driver is a child of the rstmgr driver, both of which share the same devicetree node. As a result, passing the child's udevice pointer to dev_read_addr_ptr results in a failure of reading the #address-cells property. Use the parent udevice pointer instead. Signed-off-by: Paweł Anikiel Reviewed-by: Simon Glass --- diff --git a/drivers/sysreset/sysreset_socfpga.c b/drivers/sysreset/sysreset_socfpga.c index e38296ac3f..9b62dd5eab 100644 --- a/drivers/sysreset/sysreset_socfpga.c +++ b/drivers/sysreset/sysreset_socfpga.c @@ -40,7 +40,7 @@ static int socfpga_sysreset_probe(struct udevice *dev) { struct socfpga_sysreset_data *data = dev_get_priv(dev); - data->rstmgr_base = dev_read_addr_ptr(dev); + data->rstmgr_base = dev_read_addr_ptr(dev_get_parent(dev)); return 0; }