From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] bdinfo: Fix bdinfo to show all MACs for Microblaze and ARM
Date: Thu, 8 Sep 2011 00:45:56 +0200 [thread overview]
Message-ID: <201109080045.57005.marek.vasut@gmail.com> (raw)
In-Reply-To: <1314783511-1480-1-git-send-email-monstr@monstr.eu>
On Wednesday, August 31, 2011 11:38:31 AM Michal Simek wrote:
> - Show all ethernet MACs in the system.
> - Show current ethernet device
>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> ---
> common/cmd_bdinfo.c | 32 ++++++++++++++++++++++++++++++--
> 1 files changed, 30 insertions(+), 2 deletions(-)
>
> diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
> index 6051120..01441de 100644
> --- a/common/cmd_bdinfo.c
> +++ b/common/cmd_bdinfo.c
> @@ -153,6 +153,11 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
> char * const argv[])
>
> int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> {
> +#if defined(CONFIG_CMD_NET)
> + struct eth_device *dev;
> + int i;
> +#endif
> +
> bd_t *bd = gd->bd;
> print_num("mem start ", (ulong)bd->bi_memstart);
> print_lnum("mem size ", (u64)bd->bi_memsize);
> @@ -164,7 +169,17 @@ 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);
> + i = 0;
> + while (1) {
> + dev = eth_get_dev_by_index(i);
> + if (dev) {
> + printf("eth%dname = %s\n", i, dev->name);
> + print_eth(i);
> + } else
> + break;
> + i++;
> + }
i = 0;
do {
dev = eth_get_dev_by_index(i++);
} while (dev);
i--;
... or something
prev parent reply other threads:[~2011-09-07 22:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 9:38 [U-Boot] [PATCH] bdinfo: Fix bdinfo to show all MACs for Microblaze and ARM Michal Simek
2011-09-07 21:05 ` Wolfgang Denk
2011-09-07 22:45 ` Marek Vasut [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201109080045.57005.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.