]> git.baikalelectronics.ru Git - uboot.git/commitdiff
sysreset: socfpga: Use parent device for reading base address
authorPaweł Anikiel <pan@semihalf.com>
Fri, 17 Jun 2022 10:47:22 +0000 (12:47 +0200)
committerTien Fong Chee <tien.fong.chee@intel.com>
Fri, 1 Jul 2022 06:57:14 +0000 (14:57 +0800)
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 <pan@semihalf.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/sysreset/sysreset_socfpga.c

index e38296ac3f35548ef618409782790e65c8c2434d..9b62dd5eab096e33394e71400463fb62f1fbb165 100644 (file)
@@ -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;
 }