summaryrefslogtreecommitdiff
path: root/drivers/net/enc28j60_eth.c
diff options
context:
space:
mode:
authorLionel Xu <r63889@freescale.com>2009-11-13 19:54:10 +0800
committerLionel Xu <r63889@freescale.com>2009-11-13 20:02:49 +0800
commitcbee64d544a2bd8b5e2ae17bcfdfe79480690292 (patch)
tree7bda0be949d1c3440310eaaae3a87f8c01b6325a /drivers/net/enc28j60_eth.c
parenta5c3bc03d12c2ed6b2627ea99f20d05b184d00d6 (diff)
downloadu-boot-imx-cbee64d544a2bd8b5e2ae17bcfdfe79480690292.zip
u-boot-imx-cbee64d544a2bd8b5e2ae17bcfdfe79480690292.tar.gz
u-boot-imx-cbee64d544a2bd8b5e2ae17bcfdfe79480690292.tar.bz2
ENGR00118428 MX233 Uboot: reslove the build error for branch imx_v2009.08
bd->bi_enetaddr was removed in one of the previous patchs, some changes must be done to avoid building error. Signed-off-by: Lionel Xu <r63889@freescale.com>
Diffstat (limited to 'drivers/net/enc28j60_eth.c')
-rw-r--r--drivers/net/enc28j60_eth.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/enc28j60_eth.c b/drivers/net/enc28j60_eth.c
index c1c88d2..279ec08 100644
--- a/drivers/net/enc28j60_eth.c
+++ b/drivers/net/enc28j60_eth.c
@@ -336,6 +336,7 @@ static int rxResetCounter;
int eth_init(bd_t *bis)
{
unsigned char estatVal;
+ unsigned char enetaddr[6];
/* taken from the Linux driver - dangerous stuff here! */
/* Wait for CLKRDY to become set (i.e., check that we can
@@ -347,7 +348,8 @@ int eth_init(bd_t *bis)
/* initialize controller */
encReset();
- encInit(bis->bi_enetaddr);
+ eth_getenv_enetaddr("ethaddr", enetaddr);
+ encInit(enetaddr);
m_nic_bfs(CTL_REG_ECON1, ENC_ECON1_RXEN); /* enable receive */
@@ -971,12 +973,13 @@ static void encReset(void)
#ifndef CONFIG_ETHADDR
#include <asm/arch/ocotp.h>
-void enc_set_mac_addr(uchar *addr)
+void enc_set_mac_addr(void)
{
if (NULL == getenv("ethaddr")) {
- char reg[8];
- char nid[20];
+ uchar reg[8];
+ uchar addr[8];
+ uchar nid[20];
ulong *s;
/*set this bit to open the OTP banks for reading*/