[U-Boot] [PATCH 3/4] microblaze: Add bootup messages to board.c
monstr at monstr.eu
monstr at monstr.eu
Mon Jan 5 13:18:56 CET 2009
From: Michal Simek <monstr at monstr.eu>
Signed-off-by: Michal Simek <monstr at monstr.eu>
---
lib_microblaze/board.c | 31 +++++++++++++++++++++++++++++--
1 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/lib_microblaze/board.c b/lib_microblaze/board.c
index 4f48341..7b0bdc2 100644
--- a/lib_microblaze/board.c
+++ b/lib_microblaze/board.c
@@ -112,6 +112,10 @@ void board_init (void)
#if defined(CONFIG_CMD_FLASH)
ulong flash_size = 0;
#endif
+#if defined(CONFIG_CMD_NET)
+ char *s, *e;
+ int i;
+#endif
asm ("nop"); /* FIXME gd is not initialize - wait */
memset ((void *)gd, 0, CONFIG_SYS_GBL_DATA_SIZE);
gd->bd = (bd_t *) (gd + 1); /* At end of global data */
@@ -132,11 +136,35 @@ void board_init (void)
}
}
+ puts ("SDRAM :\n");
+ puts ("\tEnabling caches :\n");
+ printf ("\t\tIcache:%s\n", icache_status() ? "OK" : "FAIL");
+ printf ("\t\tDcache:%s\n", dcache_status() ? "OK" : "FAIL");
+ printf ("\tU-Boot Start:0x%08lx\n", TEXT_BASE);
+
#if defined(CONFIG_CMD_FLASH)
+ puts ("FLASH: ");
bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
if (0 < (flash_size = flash_init ())) {
bd->bi_flashsize = flash_size;
bd->bi_flashoffset = CONFIG_SYS_FLASH_BASE + flash_size;
+# ifdef CONFIG_SYS_FLASH_CHECKSUM
+ print_size (flash_size, "");
+ /*
+ * Compute and print flash CRC if flashchecksum is set to 'y'
+ *
+ * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX
+ */
+ s = getenv ("flashchecksum");
+ if (s && (*s == 'y')) {
+ printf (" CRC: %08X",
+ crc32 (0, (const unsigned char *) CONFIG_SYS_FLASH_BASE, flash_size)
+ );
+ }
+ putc ('\n');
+# else /* !CONFIG_SYS_FLASH_CHECKSUM */
+ print_size (flash_size, "\n");
+# endif /* CONFIG_SYS_FLASH_CHECKSUM */
} else {
puts ("Flash init FAILED");
bd->bi_flashstart = 0;
@@ -146,10 +174,9 @@ void board_init (void)
#endif
#if defined(CONFIG_CMD_NET)
- char *s, *e;
- int i;
/* board MAC address */
s = getenv ("ethaddr");
+ printf ("MAC:%s\n",s);
for (i = 0; i < 6; ++i) {
bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
if (s)
--
1.5.5.1
More information about the U-Boot
mailing list