diff options
author | Richard Retanubun <RichardRetanubun at RuggedCom.com> | 2009-10-26 14:19:17 -0400 |
---|---|---|
committer | TsiChung Liew <tsicliew@gmail.com> | 2010-03-04 01:46:49 -0600 |
commit | bb907ab51fd04255923b7ecf9dab352078808351 (patch) | |
tree | 845252bb3e76fad2aa3889b37e716edcc8eb356c /cpu/mcf52x2/cpu.c | |
parent | 992d7129500d239d684c15fa2d61e0a8f2e64457 (diff) | |
download | u-boot-imx-bb907ab51fd04255923b7ecf9dab352078808351.zip u-boot-imx-bb907ab51fd04255923b7ecf9dab352078808351.tar.gz u-boot-imx-bb907ab51fd04255923b7ecf9dab352078808351.tar.bz2 |
MCF5271-only: Added a weak board_reset function to allow custom reset
This patch adds a board_reset function to allow boards to specify
their own custom reset sequence (e.g. resetting by timing out watchdog).
Tested only on MCF5271, can be expanded if needed.
Based on Mike Frysinger's suggestion on:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/70304
Signed-off-by: Richard Retanubun <RichardRetanubun at RuggedCom.com>
Diffstat (limited to 'cpu/mcf52x2/cpu.c')
-rw-r--r-- | cpu/mcf52x2/cpu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpu/mcf52x2/cpu.c b/cpu/mcf52x2/cpu.c index 2cfe631..c4c5d50 100644 --- a/cpu/mcf52x2/cpu.c +++ b/cpu/mcf52x2/cpu.c @@ -33,6 +33,7 @@ #include <command.h> #include <asm/immap.h> #include <netdev.h> +#include "cpu.h" DECLARE_GLOBAL_DATA_PTR; @@ -143,6 +144,11 @@ int checkcpu(void) int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) { + /* Call the board specific reset actions first. */ + if(board_reset) { + board_reset(); + } + mbar_writeByte(MCF_RCM_RCR, MCF_RCM_RCR_SOFTRST | MCF_RCM_RCR_FRCRSTOUT); return 0; |