[U-Boot] PATCH: Fix MPC8260 with ethernet on SCC

Heiko Schocher hs at denx.de
Tue Feb 10 20:38:49 CET 2009


Hello Ben,

Ben Warren wrote:
> ksi at koi8.net wrote:
>   
>> This fixes MPC8260 compilation with ethernet on SCC. Probably was a
>> typo or something...
>>
>> Signed-off-by: Sergey Kubushyn <ksi at koi8.net>
>> ---
>> diff -purN u-boot.orig/cpu/mpc8260/cpu.c u-boot/cpu/mpc8260/cpu.c
>> --- u-boot.orig/cpu/mpc8260/cpu.c	2009-02-02 13:39:05.000000000 -0800
>> +++ u-boot/cpu/mpc8260/cpu.c	2009-02-06 15:29:28.000000000 -0800
>> @@ -327,7 +327,7 @@ int cpu_eth_init(bd_t *bis)
>>  	fec_initialize(bis);
>>  #endif
>>  #if defined(CONFIG_ETHER_ON_SCC)
>> -	mpc82xx_scc_enet_initialize(bd);
>> +	mpc82xx_scc_enet_initialize(bis);
>>  #endif
>>  	return 0;
>>  }
>>   
>>     
> Nice catch.  I'll apply it tonight.
>   

This is introduced from:

[hs at pollux u-boot]$ git log cpu/mpc8260/ether_scc.c
commit ba705b5b1a97b47388ed48858bef6bf7b6bfcd56
Author: Gary Jennejohn <garyj at denx.de>
Date:   Thu Nov 20 12:28:38 2008 +0100

    mgcoge make ether_scc.c work with CONFIG_NET_MULTI

    This change is needed for mgcoge because it uses two ethernet drivers.

    Add a check for the presence of the PIGGY board on mgcoge.  Without this
    board networking cannot work and the initialization must be aborted.

    Only allocate rtx once to prevent DPRAM exhaustion.

    Initialize ether_scc.c and the keymile-specific HDLC driver (to be added
    soon) in eth.c.

    Signed-off-by: Gary Jennejohn <garyj at denx.de>
    Signed-off-by: Ben Warren <biggerbadderben at gmail.com>

This patch also breaks compiling the mgcoge :-(

[hs at pollux u-boot]$ ./MAKEALL mgcoge
Configuring for mgcoge board...
ether_scc.c:47:2: error: #error "CONFIG_NET_MULTI must be defined."
cpu.c: In function 'cpu_eth_init':
cpu.c:330: error: 'bd' undeclared (first use in this function)
cpu.c:330: error: (Each undeclared identifier is reported only once
cpu.c:330: error: for each function it appears in.)
make[1]: *** [cpu.o] Fehler 1
make: *** [cpu/mpc8260/libmpc8260.a] Fehler 2
make: *** Warte auf noch nicht beendete Prozesse...
ppc_82xx-size: './u-boot': No such file

Second error fixed from ksi's patch.

Seems to me the mgcoge port is the only actual existing 8260 port who
uses CONFIG_ETHER_ON_SCC ... so adding a CONFIG_NET_MULTI
only in this config File will help ;-)

So, please when adding ksi's patch, add the following to:

Signed-off-by: Heiko Schocher <hs at denx.de>
---
 include/configs/mgcoge.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/configs/mgcoge.h b/include/configs/mgcoge.h
index e4f4ff9..22e50ab 100644
--- a/include/configs/mgcoge.h
+++ b/include/configs/mgcoge.h
@@ -67,6 +67,7 @@
 #define    CONFIG_ETHER_ON_SCC        /* Ethernet is on SCC */
 #undef    CONFIG_ETHER_ON_FCC        /* Ethernet is not on FCC     */
 #undef    CONFIG_ETHER_NONE        /* No external Ethernet   */
+#define CONFIG_NET_MULTI    1
 
 #define CONFIG_ETHER_INDEX    4
 #define CONFIG_SYS_SCC_TOUT_LOOP    10000000
-- 
1.6.0.6

bye
heiko

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany 



More information about the U-Boot mailing list