summaryrefslogtreecommitdiff
path: root/cpu/mips
diff options
context:
space:
mode:
authorShinya Kuribayashi <skuribay@ruby.dti.ne.jp>2008-03-25 21:30:07 +0900
committerShinya Kuribayashi <skuribay@ruby.dti.ne.jp>2008-03-25 21:30:07 +0900
commitb0c66af53ec9385ac2d1cc2e5d7d1ecdc81caf34 (patch)
treeed0880f3e56382fa40111c83587ec1b830d42939 /cpu/mips
parentdecaba6f5cf386d569ac3997bebb871b966c6b18 (diff)
downloadu-boot-imx-b0c66af53ec9385ac2d1cc2e5d7d1ecdc81caf34.zip
u-boot-imx-b0c66af53ec9385ac2d1cc2e5d7d1ecdc81caf34.tar.gz
u-boot-imx-b0c66af53ec9385ac2d1cc2e5d7d1ecdc81caf34.tar.bz2
[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.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/cpu/mips/cpu.c b/cpu/mips/cpu.c
index de70c4d..8b43d8e 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;
}