diff options
author | Shinya Kuribayashi <skuribay@ruby.dti.ne.jp> | 2008-03-25 21:30:07 +0900 |
---|---|---|
committer | Shinya Kuribayashi <skuribay@ruby.dti.ne.jp> | 2008-03-25 21:30:07 +0900 |
commit | b0c66af53ec9385ac2d1cc2e5d7d1ecdc81caf34 (patch) | |
tree | ed0880f3e56382fa40111c83587ec1b830d42939 /cpu/mips | |
parent | decaba6f5cf386d569ac3997bebb871b966c6b18 (diff) |
[MIPS] Introduce _machine_restart
Handles machine specific functions by using weak functions.
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Diffstat (limited to 'cpu/mips')
-rw-r--r-- | cpu/mips/cpu.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/cpu/mips/cpu.c b/cpu/mips/cpu.c index de70c4d61..8b43d8eb3 100644 --- a/cpu/mips/cpu.c +++ b/cpu/mips/cpu.c @@ -23,9 +23,9 @@ #include <common.h> #include <command.h> -#include <asm/inca-ip.h> #include <asm/mipsregs.h> #include <asm/cacheops.h> +#include <asm/reboot.h> #define cache_op(op,addr) \ __asm__ __volatile__( \ @@ -37,15 +37,14 @@ : \ : "i" (op), "R" (*(unsigned char *)(addr))) +void __attribute__((weak)) _machine_restart(void) +{ +} + int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { -#if defined(CONFIG_INCA_IP) - *INCA_IP_WDT_RST_REQ = 0x3f; -#elif defined(CONFIG_PURPLE) || defined(CONFIG_TB0229) - void (*f)(void) = (void *) 0xbfc00000; + _machine_restart(); - f(); -#endif fprintf(stderr, "*** reset failed ***\n"); return 0; } |