arm: rework _ScbSystemReset() into sys_arch_reboot()

Rename the function and allow it to handle the 'type'
argument, which is ignored in this case.

Change-Id: I3d3493bea4511b2d026747505e7e52c5acc85012
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Benjamin Walsh 2015-10-26 13:38:18 -04:00 committed by Anas Nashif
commit c4a093a24e
2 changed files with 8 additions and 2 deletions

View file

@ -38,14 +38,21 @@
* *
* @return N/A * @return N/A
*/ */
void _ScbSystemReset(void) void sys_arch_reboot(int type)
{ {
union __aircr reg; union __aircr reg;
ARG_UNUSED(type);
reg.val = __scs.scb.aircr.val; reg.val = __scs.scb.aircr.val;
reg.bit.vectkey = SCB_AIRCR_VECTKEY_EN_W; reg.bit.vectkey = SCB_AIRCR_VECTKEY_EN_W;
reg.bit.sysresetreq = 1; reg.bit.sysresetreq = 1;
__scs.scb.aircr.val = reg.val; __scs.scb.aircr.val = reg.val;
/* the reboot is not immediate, so wait here until it takes effect */
for (;;) {
;
}
} }
/** /**

View file

@ -61,7 +61,6 @@ extern "C" {
#include <misc/util.h> #include <misc/util.h>
#include <stdint.h> #include <stdint.h>
extern void _ScbSystemReset(void);
extern void _ScbNumPriGroupSet(unsigned int n); extern void _ScbNumPriGroupSet(unsigned int n);
/** /**