diff options
author | Kumar Gala <kumar.gala@linaro.org> | 2017-01-12 12:39:45 -0600 |
---|---|---|
committer | Kumar Gala <kumar.gala@linaro.org> | 2017-01-23 15:15:55 -0600 |
commit | 82027c68f9640c11d093303a583ae4753f718237 (patch) | |
tree | 195e00b636ea34fd86f8b9660858dcddefc321c7 /arch | |
parent | 88bbd6ccb110bc4aacc4fa07bd1b1fbe0c3a842b (diff) |
arm: cmsis: Convert DO_REBOOT to use CMSIS
CMSIS provides a complete implentation for reboot, we can utilize it
directly and reduce zephyr specific code.
Jira: ZEP-1568
Change-Id: Ia9d1abd5c1e02e724423b94867ea452bc806ef79
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/core/cortex_m/scb.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/arch/arm/core/cortex_m/scb.c b/arch/arm/core/cortex_m/scb.c index 495948539..168413b37 100644 --- a/arch/arm/core/cortex_m/scb.c +++ b/arch/arm/core/cortex_m/scb.c @@ -17,8 +17,7 @@ #include <kernel.h> #include <arch/cpu.h> #include <misc/util.h> - -#define SCB_AIRCR_VECTKEY_EN_W 0x05FA +#include <arch/arm/cortex_m/cmsis.h> #if defined(CONFIG_SOC_TI_LM3S6965_QEMU) /* @@ -48,21 +47,7 @@ static void software_reboot(void) } #define DO_REBOOT() software_reboot() #else -static void reboot_through_sysresetreq(void) -{ - union __aircr reg; - - reg.val = __scs.scb.aircr.val; - reg.bit.vectkey = SCB_AIRCR_VECTKEY_EN_W; - reg.bit.sysresetreq = 1; - __scs.scb.aircr.val = reg.val; - - /* the reboot is not immediate, so wait here until it takes effect */ - for (;;) { - ; - } -} -#define DO_REBOOT() reboot_through_sysresetreq() +#define DO_REBOOT() NVIC_SystemReset() #endif /** |