openrisc: Add board info printout to cmd_bdinfo
authorStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Fri, 18 Nov 2011 19:21:34 +0000 (19:21 +0000)
committerWolfgang Denk <wd@denx.de>
Fri, 13 Jan 2012 20:16:52 +0000 (21:16 +0100)
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
common/cmd_bdinfo.c

index 67cb0dad8345c8baf1ef563c53ea52aedb080683..97f29456f97e7454813e88e84096d5ee4cd3dd32 100644 (file)
@@ -475,6 +475,28 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        return 0;
 }
 
+#elif defined(CONFIG_OPENRISC)
+
+int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+       bd_t *bd = gd->bd;
+
+       print_num("mem start",          (ulong)bd->bi_memstart);
+       print_lnum("mem size",          (u64)bd->bi_memsize);
+       print_num("flash start",        (ulong)bd->bi_flashstart);
+       print_num("flash size",         (ulong)bd->bi_flashsize);
+       print_num("flash offset",       (ulong)bd->bi_flashoffset);
+
+#if defined(CONFIG_CMD_NET)
+       print_eth(0);
+       printf("ip_addr     = %pI4\n", &bd->bi_ip_addr);
+#endif
+
+       printf("baudrate    = %ld bps\n", bd->bi_baudrate);
+
+       return 0;
+}
+
 #else
  #error "a case for this architecture does not exist!"
 #endif