[U-Boot] [PATCH] mpc512x: Add display of reset status register

Detlev Zundel dzu at denx.de
Fri Jan 22 13:43:00 CET 2010


Content of the RSR is put into gd early so we can output it together
with the CPU info.  The clearing of gd in board_init_f is redundant for
this architecture as it is done in cpu_init_f so we remove it.

Signed-off-by: Detlev Zundel <dzu at denx.de>
---
 cpu/mpc512x/cpu.c |    3 ++-
 lib_ppc/board.c   |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/cpu/mpc512x/cpu.c b/cpu/mpc512x/cpu.c
index f96a4c8..2908a0d 100644
--- a/cpu/mpc512x/cpu.c
+++ b/cpu/mpc512x/cpu.c
@@ -66,9 +66,10 @@ int checkcpu (void)
 	default:
 		puts ("unknown ");
 	}
-	printf ("at %s MHz, CSB at %s MHz\n",
+	printf ("at %s MHz, CSB at %s MHz ",
 		strmhz(buf1, clock),
 		strmhz(buf2, gd->csb_clk) );
+	printf("(RSR=0x%04lx)\n", gd->reset_status & 0xffff);
 	return 0;
 }
 
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index dd22f99..a615f36 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2000-2006
+ * (C) Copyright 2000-2010
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -379,7 +379,8 @@ void board_init_f (ulong bootflag)
 	__asm__ __volatile__("": : :"memory");
 
 #if !defined(CONFIG_CPM2) && !defined(CONFIG_MPC83xx) && \
-    !defined(CONFIG_MPC85xx) && !defined(CONFIG_MPC86xx)
+    !defined(CONFIG_MPC85xx) && !defined(CONFIG_MPC86xx) && \
+    !defined(CONFIG_MPC512X)
 	/* Clear initial global data */
 	memset ((void *) gd, 0, sizeof (gd_t));
 #endif
-- 
1.6.2.5



More information about the U-Boot mailing list