arch: riscv32: support CONFIG_WDOG_INIT
Borrow from an Arm Cortex-M convention where each Kconfig.soc can define a 'config WDOG_INIT' that does watchdog initialization early in the boot process if that SoC needs it. Some SoCs have watchdogs that are enabled by default and need to be turned off during reset handling (to be re-enabled if necessary by a Zephyr watchdog driver). Signed-off-by: Marti Bolivar <marti@foundries.io>
This commit is contained in:
parent
ef765b28cb
commit
449170548b
|
@ -53,6 +53,10 @@ aa_loop:
|
|||
li t0, CONFIG_ISR_STACK_SIZE
|
||||
add sp, sp, t0
|
||||
|
||||
#ifdef CONFIG_WDOG_INIT
|
||||
call _WdogInit
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Jump into C domain. _PrepC zeroes BSS, copies rw data into RAM,
|
||||
* and then enters kernel _Cstart
|
||||
|
|
Loading…
Reference in a new issue