mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 18:11:33 +00:00
clk: renesas: Switch to fdtdec_get_addr_size_auto_noparent() on Gen2
The fdtdec_get_addr() does not take into account values set in #address-cells and #size-cells , but assumes them to be 1 for 32bit systems and 2 for 64bit systems. This is true for most DTs, however there are exceptions. Switch to fdtdec_get_addr_size_auto_noparent(), which takes the #address/size-cells values into consideration, otherwise the reset controller node register offset is incorrectly parsed. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
This commit is contained in:
parent
f455d78a19
commit
061ef41fcf
1 changed files with 2 additions and 1 deletions
|
@ -291,7 +291,8 @@ int gen2_clk_probe(struct udevice *dev)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
rst_base = fdtdec_get_addr(gd->fdt_blob, ret, "reg");
|
||||
rst_base = fdtdec_get_addr_size_auto_noparent(gd->fdt_blob, ret, "reg",
|
||||
0, NULL, false);
|
||||
if (rst_base == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue