]> git.sur5r.net Git - u-boot/commitdiff
add Blackfin-specific bdinfo command
authorMike Frysinger <vapier@gentoo.org>
Tue, 5 Feb 2008 00:26:55 +0000 (19:26 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 5 Feb 2008 00:26:55 +0000 (19:26 -0500)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
common/cmd_bdinfo.c

index c28a155453099fda3e5d7ca4ab232f89a87527d3..3a4dbcf6bd2bd39d4812fa7761479b7177034272 100644 (file)
@@ -273,6 +273,37 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        return 0;
 }
 
+#elif defined(CONFIG_BLACKFIN)
+
+int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+       int i;
+       bd_t *bd = gd->bd;
+
+       printf("U-Boot      = %s\n", bd->bi_r_version);
+       printf("CPU         = %s\n", bd->bi_cpu);
+       printf("Board       = %s\n", bd->bi_board_name);
+       printf("VCO         = %lu MHz\n", bd->bi_vco / 1000000);
+       printf("CCLK        = %lu MHz\n", bd->bi_cclk / 1000000);
+       printf("SCLK        = %lu MHz\n", bd->bi_sclk / 1000000);
+
+       print_num("boot_params", (ulong)bd->bi_boot_params);
+       print_num("memstart",    (ulong)bd->bi_memstart);
+       print_num("memsize",     (ulong)bd->bi_memsize);
+       print_num("flashstart",  (ulong)bd->bi_flashstart);
+       print_num("flashsize",   (ulong)bd->bi_flashsize);
+       print_num("flashoffset", (ulong)bd->bi_flashoffset);
+
+       puts("ethaddr     =");
+       for (i = 0; i < 6; ++i)
+               printf("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
+       puts("\nip_addr     = ");
+       print_IPaddr(bd->bi_ip_addr);
+       printf("\nbaudrate    = %d bps\n", bd->bi_baudrate);
+
+       return 0;
+}
+
 #else /* ! PPC, which leaves MIPS */
 
 int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])