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 <pan@semihalf.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
73d88cf971
commit
9ebca7095b
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ static int socfpga_sysreset_probe(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct socfpga_sysreset_data *data = dev_get_priv(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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue