From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Add fdt_fixup_ethernet helper to set mac addresses
Date: Wed, 21 Nov 2007 21:44:45 +0100 [thread overview]
Message-ID: <200711212144.45369.sr@denx.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0711211416150.19478@blarg.am.freescale.net>
On Wednesday 21 November 2007, Kumar Gala wrote:
> Added a fixup helper that uses aliases to set mac addresses
> in the device tree based on the bd_t
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> common/fdt_support.c | 38 ++++++++++++++++++++++++++++++++++++++
> include/fdt_support.h | 1 +
> 2 files changed, 39 insertions(+), 0 deletions(-)
>
> diff --git a/common/fdt_support.c b/common/fdt_support.c
> index d5743b4..0e61f6d 100644
> --- a/common/fdt_support.c
> +++ b/common/fdt_support.c
> @@ -386,4 +386,42 @@ void do_fixup_by_path_u32(void *fdt, const char *path,
> const char *prop, do_fixup_by_path(fdt, path, prop, &val, sizeof(val),
> create);
> }
>
> +void fdt_fixup_ethernet(void *fdt, bd_t *bd)
> +{
> + int node;
> + const char *path;
> +
> + node = fdt_path_offset(fdt, "/aliases");
> + if (node >= 0) {
> +#if defined(CONFIG_HAS_ETH0)
> + path = fdt_getprop(fdt, node, "ethernet0", NULL);
> + if (path) {
Seems you have some whitespace problems here.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
prev parent reply other threads:[~2007-11-21 20:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-21 20:16 [U-Boot-Users] [PATCH] Add fdt_fixup_ethernet helper to set mac addresses Kumar Gala
2007-11-21 20:44 ` Stefan Roese [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=200711212144.45369.sr@denx.de \
--to=sr@denx.de \
--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.