fernly/cmd-reboot.c
Sean Cross 72f92b7fd2 cmd: Split commands into their own files
Commands shouldn't all live in main.c.  Move everything except
"help" into its own command file.
2014-09-11 14:18:51 +08:00

17 lines
239 B
C

#include <string.h>
#include "memio.h"
#include "printf.h"
static int wdt_reboot(void)
{
writel(0x1209, 0xa003001c);
return 0;
}
int cmd_reboot(int argc, char **argv)
{
printf("Rebooting...\n");
wdt_reboot();
while(1);
return 0;
}