summaryrefslogtreecommitdiffstats
path: root/cpu/mcf52x2/cpu.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-06-10 19:27:47 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-06-10 19:27:47 +0200
commit4176c799645d8b35224345d899006993397635c1 (patch)
tree9d82c0fbda16231fe4edefcbb4a9bc23d67c0de5 /cpu/mcf52x2/cpu.c
parent9d4d3e3833ca7f4dada190ddcb3fea1da9bb9b5b (diff)
parent0e0ef590b263927a62d399dce0cf1b7aa8dee42e (diff)
downloadblackbird-obmc-uboot-4176c799645d8b35224345d899006993397635c1.tar.gz
blackbird-obmc-uboot-4176c799645d8b35224345d899006993397635c1.zip
Merge with /home/hs/U-Boot/u-boot-dev
Diffstat (limited to 'cpu/mcf52x2/cpu.c')
-rw-r--r--cpu/mcf52x2/cpu.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/cpu/mcf52x2/cpu.c b/cpu/mcf52x2/cpu.c
index e6e5d9bee9..aa6b2bd670 100644
--- a/cpu/mcf52x2/cpu.c
+++ b/cpu/mcf52x2/cpu.c
@@ -2,6 +2,10 @@
* (C) Copyright 2003
* Josef Baumgartner <josef.baumgartner@telex.de>
*
+ * MCF5282 additionals
+ * (C) Copyright 2005
+ * BuS Elektronik GmbH & Co. KG <esw@bus-elektronik.de>
+ *
* See file CREDITS for list of people who contributed to this
* project.
*
@@ -36,7 +40,8 @@
#endif
#ifdef CONFIG_M5282
-
+#include <asm/m5282.h>
+#include <asm/immap_5282.h>
#endif
#ifdef CONFIG_M5249
@@ -116,7 +121,6 @@ int checkcpu(void) {
return 0;
};
-
#if defined(CONFIG_WATCHDOG)
/* Called by macro WATCHDOG_RESET */
void watchdog_reset (void)
@@ -158,11 +162,25 @@ int watchdog_init (void)
#ifdef CONFIG_M5282
int checkcpu (void)
{
- puts ("CPU: Freescale Coldfire MCF5282\n");
+ unsigned char resetsource = MCFRESET_RSR;
+
+ printf ("CPU: Freescale Coldfire MCF5282 (PIN: %2.2x REV: %2.2x)\n",
+ MCFCCM_CIR>>8,MCFCCM_CIR & MCFCCM_CIR_PRN_MASK);
+ printf ("Reset:%s%s%s%s%s%s%s\n",
+ (resetsource & MCFRESET_RSR_LOL) ? " Loss of Lock" : "",
+ (resetsource & MCFRESET_RSR_LOC) ? " Loss of Clock" : "",
+ (resetsource & MCFRESET_RSR_EXT) ? " External" : "",
+ (resetsource & MCFRESET_RSR_POR) ? " Power On" : "",
+ (resetsource & MCFRESET_RSR_WDR) ? " Watchdog" : "",
+ (resetsource & MCFRESET_RSR_SOFT) ? " Software" : "",
+ (resetsource & MCFRESET_RSR_LVD) ? " Low Voltage" : ""
+ );
return 0;
}
-int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[]) {
+int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
+{
+ MCFRESET_RCR = MCFRESET_RCR_SOFTRST;
return 0;
};
#endif
OpenPOWER on IntegriCloud