]> git.baikalelectronics.ru Git - uboot.git/commit
riscv: Fix arch_fixup_fdt always failing without /chosen
authorSean Anderson <seanga2@gmail.com>
Sat, 15 May 2021 02:36:16 +0000 (22:36 -0400)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Mon, 17 May 2021 08:46:33 +0000 (16:46 +0800)
commit6aa86c0f564a375992c73c33ee7ca355bd50f0ca
tree702f1012e4390d0941aae427dab1ce2c2d408c64
parent903a6def11bc2e5114f24fd12daf1a5c2d024a3c
riscv: Fix arch_fixup_fdt always failing without /chosen

If /chosen was missing, chosen_offset would never get updated with the new
/chosen node. This would cause fdt_setprop_u32 to fail. This patch fixes
this by setting chosen_offset. In addition, log any errors from setting
boot-hartid as well.

Fixes: dca9a8b4cf0 ("riscv: Add boot hartid to device tree")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
arch/riscv/lib/fdt_fixup.c