diff mbox

[U-Boot,1/4] m68k: restore bi_enetaddr & bi_enet1addr in bd_t for bootm compatibility.

Message ID 1277296554-23169-1-git-send-email-phdm@macqel.be
State Not Applicable
Delegated to: Marek Vasut
Headers show

Commit Message

Philippe De Muyter June 23, 2010, 12:35 p.m. UTC
---
 arch/m68k/include/asm/u-boot.h |    4 ++++
 arch/m68k/lib/bootm.c          |    8 ++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/arch/m68k/include/asm/u-boot.h b/arch/m68k/include/asm/u-boot.h
index a0f2983..91bb240 100644
--- a/arch/m68k/include/asm/u-boot.h
+++ b/arch/m68k/include/asm/u-boot.h
@@ -48,6 +48,7 @@  typedef struct bd_info {
 	unsigned long bi_bootflags;	/* boot / reboot flag (for LynxOS) */
 	unsigned long bi_boot_params;	/* where this board expects params */
 	unsigned long bi_ip_addr;	/* IP Address */
+	unsigned char bi_enetaddr[6];	/* OLD: see README.enetaddr */
 	unsigned short bi_ethspeed;	/* Ethernet speed in Mbps */
 	unsigned long bi_intfreq;	/* Internal Freq, in MHz */
 	unsigned long bi_busfreq;	/* Bus Freq, in MHz */
@@ -60,6 +61,9 @@  typedef struct bd_info {
 	unsigned long bi_flbfreq;	/* Flexbus Freq in MHz */
 #endif
 	unsigned long bi_baudrate;	/* Console Baudrate */
+#ifdef CONFIG_HAS_ETH1
+	unsigned char bi_enet1addr[6];	/* OLD: see README.enetaddr */
+#endif
 } bd_t;
 
 #endif				/* __ASSEMBLY__ */
diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c
index e5ed6eb..255a490 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -32,6 +32,7 @@ 
 #ifdef CONFIG_SHOW_BOOT_PROGRESS
 # include <status_led.h>
 #endif
+#include <net.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -96,6 +97,13 @@  int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
 	}
 	set_clocks_in_mhz(kbd);
 
+#if defined(CONFIG_CMD_NET)
+	eth_getenv_enetaddr ("ethaddr", kbd->bi_enetaddr);
+#if defined(CONFIG_HAS_ETH1)
+	eth_getenv_enetaddr ("eth1addr", kbd->bi_enet1addr);
+#endif
+#endif
+
 	kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong))images->ep;
 
 	rd_len = images->rd_end - images->rd_start;