diff options
author | Tom Rini <trini@ti.com> | 2013-02-04 09:07:34 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-02-04 09:14:22 -0500 |
commit | 2d795c9621de274cb0cb8cf4af5941293f89c3be (patch) | |
tree | 726a2ee288654832876f3e81ff5f1d356e784e13 /common | |
parent | 10ec0f8a74a35f4b601dd1c84931962b809919bb (diff) | |
parent | 14d315b8b3e974a7f617a9b4454fc579161fb75b (diff) | |
download | u-boot-imx-2d795c9621de274cb0cb8cf4af5941293f89c3be.zip u-boot-imx-2d795c9621de274cb0cb8cf4af5941293f89c3be.tar.gz u-boot-imx-2d795c9621de274cb0cb8cf4af5941293f89c3be.tar.bz2 |
Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_bdinfo.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 6800c4f..85279d5 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -51,6 +51,25 @@ static void print_eth(int idx) } __maybe_unused +static void print_eths(void) +{ + struct eth_device *dev; + int i = 0; + + do { + dev = eth_get_dev_by_index(i); + if (dev) { + printf("eth%dname = %s\n", i, dev->name); + print_eth(i); + i++; + } + } while (dev); + + printf("current eth = %s\n", eth_get_name()); + printf("ip_addr = %s\n", getenv("ipaddr")); +} + +__maybe_unused static void print_lnum(const char *name, unsigned long long value) { printf("%-12s= 0x%.8llX\n", name, value); @@ -195,10 +214,9 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) print_num("sram size ", (ulong)bd->bi_sramsize); #endif #if defined(CONFIG_CMD_NET) - print_eth(0); - printf("ip_addr = %s\n", getenv("ipaddr")); + print_eths(); #endif - printf("baudrate = %u bps\n", (ulong)bd->bi_baudrate); + printf("baudrate = %u bps\n", bd->bi_baudrate); return 0; } @@ -366,8 +384,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } #if defined(CONFIG_CMD_NET) - print_eth(0); - printf("ip_addr = %s\n", getenv("ipaddr")); + print_eths(); #endif printf("baudrate = %u bps\n", bd->bi_baudrate); #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) |