From a0335b5223d64c607dfd4e142d24a4aa61059190 Mon Sep 17 00:00:00 2001 From: Maureen Helm Date: Thu, 28 Feb 2019 11:34:16 -0600 Subject: [PATCH] soc: openisa_rv32m1: Implement sys_arch_reboot() Implements sys_arch_reboot() on the openisa_rv32m1 soc to enable zephyr micropython on the rv32m1_vega board. Signed-off-by: Maureen Helm --- soc/riscv32/openisa_rv32m1/soc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/soc/riscv32/openisa_rv32m1/soc.c b/soc/riscv32/openisa_rv32m1/soc.c index 7fbac461b82..c4d8da52970 100644 --- a/soc/riscv32/openisa_rv32m1/soc.c +++ b/soc/riscv32/openisa_rv32m1/soc.c @@ -59,6 +59,13 @@ static const scg_lpfll_config_t rv32m1_lpfll_cfg = { .trimConfig = NULL, }; +void sys_arch_reboot(int type) +{ + ARG_UNUSED(type); + + EVENT_UNIT->SLPCTRL |= EVENT_SLPCTRL_SYSRSTREQST_MASK; +} + void _arch_irq_enable(unsigned int irq) { if (IS_ENABLED(CONFIG_MULTI_LEVEL_INTERRUPTS)) {