mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 12:46:14 +02:00
nios2: Add a reset_cpu() function
The current do_reset() is called from a command context. Add a function which can be used from anywhere, as is done on ARM. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
5ee545a9db
commit
6557eb73d6
@ -35,11 +35,17 @@ int checkboard(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
void reset_cpu(void)
|
||||
{
|
||||
disable_interrupts();
|
||||
/* indirect call to go beyond 256MB limitation of toolchain */
|
||||
nios2_callr(gd->arch.reset_addr);
|
||||
}
|
||||
|
||||
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
{
|
||||
reset_cpu();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user