mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 21:51:31 +00:00
common: cmd_bdinfo: Fix bdinfo to show all MACs for Microblaze and ARM
- Show all ethernet MACs in the system. - Show current ethernet device Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
2281ba5172
commit
9fc6a06ad3
1 changed files with 21 additions and 4 deletions
|
@ -50,6 +50,25 @@ static void print_eth(int idx)
|
||||||
printf("%-12s= %s\n", name, val);
|
printf("%-12s= %s\n", name, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__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
|
__maybe_unused
|
||||||
static void print_lnum(const char *name, unsigned long long value)
|
static void print_lnum(const char *name, unsigned long long value)
|
||||||
{
|
{
|
||||||
|
@ -195,8 +214,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||||
print_num("sram size ", (ulong)bd->bi_sramsize);
|
print_num("sram size ", (ulong)bd->bi_sramsize);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_CMD_NET)
|
#if defined(CONFIG_CMD_NET)
|
||||||
print_eth(0);
|
print_eths();
|
||||||
printf("ip_addr = %s\n", getenv("ipaddr"));
|
|
||||||
#endif
|
#endif
|
||||||
printf("baudrate = %u bps\n", (ulong)bd->bi_baudrate);
|
printf("baudrate = %u bps\n", (ulong)bd->bi_baudrate);
|
||||||
return 0;
|
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)
|
#if defined(CONFIG_CMD_NET)
|
||||||
print_eth(0);
|
print_eths();
|
||||||
printf("ip_addr = %s\n", getenv("ipaddr"));
|
|
||||||
#endif
|
#endif
|
||||||
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
printf("baudrate = %u bps\n", bd->bi_baudrate);
|
||||||
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
|
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
|
||||||
|
|
Loading…
Add table
Reference in a new issue