public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: move bootfile/ipaddr init into eth_initialize
Date: Mon, 16 Jan 2012 05:05:13 -0500	[thread overview]
Message-ID: <201201160505.17834.vapier@gentoo.org> (raw)
In-Reply-To: <20120116080323.C285917133E2@gemini.denx.de>

On Monday 16 January 2012 03:03:23 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > All arches init these variables the same way, so move the logic
> > into the core net code to avoid duplicating it everywhere else.
> 
> This is the wrong approach.
> 
> There are many more ieces of code in arch/*/lib/board.c which are
> duplicated across some or all architectures.  Instread of ripping
> these apart and fixing a bit here and a bit thre we should combine
> efforts and merge all arch/*/lib/board.c into a common file.

or, if we add bit by bit, we have an easily testable solution rather than one 
giant leap

> > --- a/arch/arm/lib/board.c
> > +++ b/arch/arm/lib/board.c
> > @@ -536,9 +536,6 @@ void board_init_r(gd_t *id, ulong dest_addr)
> > 
> >  	arm_pci_init();
> >  
> >  #endif
> > 
> > -	/* IP Address */
> > -	gd->bd->bi_ip_addr = getenv_IPaddr("ipaddr");
> 
> The code which you remove here does NOT depend on CONFIG_CMD_NET;
> note that this is intentional.

i noticed that, however, i'm not sure it matters.  i can't find any place in u-
boot that actually reads this variable.

arch/*/include/asm/u-boot.h: bi_ip_addr is declared as part of bd_t
arch/*/lib/board.c: bi_ip_addr gets initialized based on env
common/cmd_bdinfo.c: the value of bi_ip_addr gets displayed
common/cmd_nvedit.c: bi_ip_addr gets written when user does "setenv ipaddr"
board/esd/cpci405/cpci405.c: bi_ip_addr is written via the env
net/net.c: bi_ip_addr gets written as part of global env sync

is there any reason i shouldn't just rip out all bi_ip_addr handling ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120116/4969ee87/attachment.pgp>

  reply	other threads:[~2012-01-16 10:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-15 23:32 [U-Boot] [PATCH] net: move bootfile/ipaddr init into eth_initialize Mike Frysinger
2012-01-16  2:28 ` Thomas Chou
2012-01-16  8:03 ` Wolfgang Denk
2012-01-16 10:05   ` Mike Frysinger [this message]
2012-01-16 11:18     ` Wolfgang Denk
2012-01-16 19:59       ` Mike Frysinger
2012-01-17  2:10 ` [U-Boot] [PATCH 1/2] net: punt bd->bi_ip_addr Mike Frysinger
2012-01-17  2:10   ` [U-Boot] [PATCH 2/2] net: move bootfile init into eth_initialize Mike Frysinger
2012-04-04 14:22     ` Joe Hershberger
2012-04-04 14:21   ` [U-Boot] [PATCH 1/2] net: punt bd->bi_ip_addr Joe Hershberger
2012-04-05  4:53 ` [U-Boot] [PATCH 1/2 v2] " Mike Frysinger
2012-04-05  4:53   ` [U-Boot] [PATCH 2/2 v2] net: move bootfile init into eth_initialize Mike Frysinger
2012-05-15 23:01     ` Joe Hershberger
2012-05-15 23:00   ` [U-Boot] [PATCH 1/2 v2] net: punt bd->bi_ip_addr Joe Hershberger
2012-05-21  7:13   ` [U-Boot] [PATCH] Fix cmd_nvedit.c: warning: unused variable 'bd' Wolfgang Denk
2012-05-21 20:49     ` Joe Hershberger
2012-05-21 21:55       ` Wolfgang Denk
2012-05-21 21:56         ` Joe Hershberger
2012-05-21 22:01           ` Wolfgang Denk
2012-05-21 22:02             ` Joe Hershberger
2012-08-27 19:29   ` [U-Boot] [PATCH 1/2 v2] net: punt bd->bi_ip_addr Anatolij Gustschin

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=201201160505.17834.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox