diff mbox

[U-Boot,05/10] km/common: force set ethaddr after reading IVM

Message ID 1307348541-2466-6-git-send-email-holger.brunck@keymile.com
State Accepted
Commit e8195825716c0ef8cfaea513c8a3d9d3becf7e00
Headers show

Commit Message

Holger Brunck June 6, 2011, 8:22 a.m. UTC
The ethaddr is stored inside the inventory eeprom. During
boottime this value was read out and the ethaddr variable was
set. Previously this was only done if it ethaddr == NULL but
this is wrong for our ARM boards. Because ethaddr is at this
stage never NULL for ARM due to the random calculation of a
MAC address in mvgbe.c.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
---
 board/keymile/common/common.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Wolfgang Denk July 27, 2011, 9:44 p.m. UTC | #1
Dear Holger Brunck,

In message <1307348541-2466-6-git-send-email-holger.brunck@keymile.com> you wrote:
> The ethaddr is stored inside the inventory eeprom. During
> boottime this value was read out and the ethaddr variable was
> set. Previously this was only done if it ethaddr == NULL but
> this is wrong for our ARM boards. Because ethaddr is at this
> stage never NULL for ARM due to the random calculation of a
> MAC address in mvgbe.c.
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> cc: Heiko Schocher <hs@denx.de>
> cc: Wolfgang Denk <wd@denx.de>
> ---
>  board/keymile/common/common.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index 9be4c72..fef6253 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -278,8 +278,7 @@  static int ivm_analyze_block2(unsigned char *buf, int len)
 		sprintf((char *)valbuf, "%pM", buf);
 	}
 #endif
-	if (getenv("ethaddr") == NULL)
-		setenv((char *)"ethaddr", (char *)valbuf);
+	setenv((char *)"ethaddr", (char *)valbuf);
 
 	/* IVM_MacCount */
 	count = (buf[10] << 24) +