]> git.karo-electronics.de Git - karo-tx-uboot.git/blob - patches/0047-ENGR00118428-MX233-Uboot-reslove-the-build-error-fo.patch
imported Ka-Ro specific additions to U-Boot 2009.08 for TX28
[karo-tx-uboot.git] / patches / 0047-ENGR00118428-MX233-Uboot-reslove-the-build-error-fo.patch
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
5
6 bd->bi_enetaddr was removed in one of the previous patchs, some changes must
7 be done to avoid building error.
8
9 Signed-off-by: Lionel Xu <r63889@freescale.com>
10 ---
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(-)
15
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
20 @@ -38,7 +38,6 @@
21   */
22  
23  #include <common.h>
24 -#include <arm926ejs.h>
25  #include <asm/arch/stmp378x.h>
26  #include <asm/arch/timrot.h>
27  
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)
34  {
35         unsigned char estatVal;
36 +       unsigned char enetaddr[6];
37  
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)
41  
42         /* initialize controller */
43         encReset();
44 -       encInit(bis->bi_enetaddr);
45 +       eth_getenv_enetaddr("ethaddr", enetaddr);
46 +       encInit(enetaddr);
47  
48         m_nic_bfs(CTL_REG_ECON1, ENC_ECON1_RXEN);       /* enable receive */
49  
50 @@ -971,12 +973,13 @@ static void encReset(void)
51  
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)
56  {
57         if (NULL == getenv("ethaddr")) {
58  
59 -               char reg[8];
60 -               char nid[20];
61 +               uchar reg[8];
62 +               uchar addr[8];
63 +               uchar nid[20];
64                 ulong *s;
65  
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
69 --- a/lib_arm/board.c
70 +++ b/lib_arm/board.c
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 */
73  
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*/
80  
81         /* Initialize from environment */
82 -- 
83 1.5.4.4
84