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:
parent
2ace19ede8
commit
c4a093a24e
2 changed files with 8 additions and 2 deletions
|
@ -38,14 +38,21 @@
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void _ScbSystemReset(void)
|
||||
void sys_arch_reboot(int type)
|
||||
{
|
||||
union __aircr reg;
|
||||
|
||||
ARG_UNUSED(type);
|
||||
|
||||
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 (;;) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -61,7 +61,6 @@ extern "C" {
|
|||
#include <misc/util.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern void _ScbSystemReset(void);
|
||||
extern void _ScbNumPriGroupSet(unsigned int n);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue