[PATCH v2 0/2] introduce EVT_DM_POST_INIT_R to fix VF2 boot fail

Chanho Park chanho61.park at samsung.com
Fri Aug 18 07:11:01 CEST 2023


Since the Patch 55171aedda88, VisionFive2 booting has been broken [1].
VisionFive2 board requires to enable CONFIG_TIMER_EARLY but booting went
to panic from initr_dm_devices due to lack of a timer device.

- Error logs
initcall sequence 00000000fffd8d38 failed at call 00000000402185e4
(err=-19)

We can reproduce it on Qemu Sifive HiFive Unleashed emulation[2] after
enabling CONFIG_TIMER_EARLY manually.

As suggested by Simon[3], we can address this by adding
EVT_DM_POST_INIT_R event and it's spy-callback function.

Changes from v1:
- Add EVT_DM_POST_INIT_R event type and emit it after relocation
- Make riscv_cpu_probe as the callback of EVT_DM_POST_INIT_R

[1]: https://lists.denx.de/pipermail/u-boot/2023-June/521220.html
[2]: https://www.qemu.org/docs/master/system/riscv/sifive_u.html#running-u-boot
[3]: https://lore.kernel.org/u-boot/CAPnjgZ2PbHVY_WLVq7XCd-HYKKwoh8R3LGXfOo7S6Sbvj0+ETA@mail.gmail.com/

Chanho Park (2):
  dm: event: add EVT_DM_POST_INIT_R event type
  riscv: cpu: make riscv_cpu_probe to EVT_DM_POST_INIT_R callback

 arch/riscv/cpu/cpu.c | 11 +++--------
 drivers/core/root.c  |  6 ++++--
 include/event.h      |  1 +
 3 files changed, 8 insertions(+), 10 deletions(-)

-- 
2.39.2



More information about the U-Boot mailing list