1 From cbee64d544a2bd8b5e2ae17bcfdfe79480690292 Mon Sep 17 00:00:00 2001
2 From: Lionel Xu <r63889@freescale.com>
3 Date: Fri, 13 Nov 2009 19:54:10 +0800
4 Subject: [PATCH] ENGR00118428 MX233 Uboot: reslove the build error for branch imx_v2009.08
6 bd->bi_enetaddr was removed in one of the previous patchs, some changes must
7 be done to avoid building error.
9 Signed-off-by: Lionel Xu <r63889@freescale.com>
11 cpu/arm926ejs/stmp378x/timer.c | 1 -
12 drivers/net/enc28j60_eth.c | 11 +++++++----
13 lib_arm/board.c | 4 ++--
14 3 files changed, 9 insertions(+), 7 deletions(-)
16 diff --git a/cpu/arm926ejs/stmp378x/timer.c b/cpu/arm926ejs/stmp378x/timer.c
17 index 07834ac..40e7e32 100644
18 --- a/cpu/arm926ejs/stmp378x/timer.c
19 +++ b/cpu/arm926ejs/stmp378x/timer.c
24 -#include <arm926ejs.h>
25 #include <asm/arch/stmp378x.h>
26 #include <asm/arch/timrot.h>
28 diff --git a/drivers/net/enc28j60_eth.c b/drivers/net/enc28j60_eth.c
29 index c1c88d2..279ec08 100644
30 --- a/drivers/net/enc28j60_eth.c
31 +++ b/drivers/net/enc28j60_eth.c
32 @@ -336,6 +336,7 @@ static int rxResetCounter;
33 int eth_init(bd_t *bis)
35 unsigned char estatVal;
36 + unsigned char enetaddr[6];
38 /* taken from the Linux driver - dangerous stuff here! */
39 /* Wait for CLKRDY to become set (i.e., check that we can
40 @@ -347,7 +348,8 @@ int eth_init(bd_t *bis)
42 /* initialize controller */
44 - encInit(bis->bi_enetaddr);
45 + eth_getenv_enetaddr("ethaddr", enetaddr);
48 m_nic_bfs(CTL_REG_ECON1, ENC_ECON1_RXEN); /* enable receive */
50 @@ -971,12 +973,13 @@ static void encReset(void)
52 #ifndef CONFIG_ETHADDR
53 #include <asm/arch/ocotp.h>
54 -void enc_set_mac_addr(uchar *addr)
55 +void enc_set_mac_addr(void)
57 if (NULL == getenv("ethaddr")) {
66 /*set this bit to open the OTP banks for reading*/
67 diff --git a/lib_arm/board.c b/lib_arm/board.c
68 index fce188d..d6864bc 100644
71 @@ -443,8 +443,8 @@ extern void davinci_eth_set_mac_addr (const u_int8_t *addr);
72 #endif /* CONFIG_DRIVER_SMC91111 || CONFIG_DRIVER_LAN91C96 */
74 #if defined(CONFIG_ENC28J60_ETH) && !defined(CONFIG_ETHADDR)
75 - extern void enc_set_mac_addr (uchar *addr);
76 - enc_set_mac_addr (gd->bd->bi_enetaddr);
77 + extern void enc_set_mac_addr (void);
78 + enc_set_mac_addr ();
79 #endif /* CONFIG_ENC28J60_ETH && !CONFIG_ETHADDR*/
81 /* Initialize from environment */