mbox series

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

Message ID 20230818051103.2427590-1-chanho61.park@samsung.com
Headers show
Series introduce EVT_DM_POST_INIT_R to fix VF2 boot fail | expand


Chanho Park Aug. 18, 2023, 5:11 a.m. UTC
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

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(-)