[U-Boot-Users] FW: PPC405EP ethernet problems

Stalder, Reto reto.stalder at schmid-telecom.ch
Tue Jun 20 08:10:14 CEST 2006


Hi,

I've introduced some printf statements into the U-Boot code to track the
program flow. It turns out, that the cpu executes a loop, where there is
none present in the source code. Below are some excerpts of the source
code and the output of U-Boot. The only explanation I have so far is,
that the compiler breaks something. I'm using powerpc-405-linux-gnu-gcc
version 3.4.4 for cross compilation on an i386 debian system. Has
anybody experienced similar behaviour? Are there any known problems or
pitfalls when using this version of gcc?

Thank you very much in advance for your help!

Best regards,
Reto


cpu/ppc4xx/4xx_enet.c:
---
int eth_init (bd_t *bis)
{
    int tmp;

    printf("eth_init: calling ppc_4xx_eth_initialize()\n");
	ppc_4xx_eth_initialize(bis);
    printf("eth_init: returned from ppc_4xx_eth_initialize()\n");
	if (emac0_dev) {
        printf("eth_init: calling ppc_4xx_eth_init()\n");
        tmp = ppc_4xx_eth_init(emac0_dev, bis);
        printf("eth_init: returned from  ppc_4xx_eth_init()\n");
		return tmp;
	} else {
		printf("ERROR: ethaddr not set!\n");
		return -1;
	}
}
---

net/net.c, function NetLoop:
---
    printf("NetLoop: calling eth_halt()\n");
	eth_halt();
    printf("NetLoop: returned from eth_halt()\n");
#ifdef CONFIG_NET_MULTI   // CONFIG_NET_MULTI is not defined
	eth_set_current();
#endif
    printf("NetLoop: calling eth_init()\n");
	if (eth_init(bd) < 0) {
        printf("NetLoop: returned from eth_init() with neg. value\n");
		eth_halt();
		return(-1);
	}
    printf("NetLoop: returned from eth_init() with pos. value\n");
---

U-Boot output:
---
=>ping 1.2.3.4
NetLoop: calling eth_halt()
NetLoop: returned from eth_halt()
NetLoop: calling eth_init()
eth_init: calling ppc_4xx_eth_initialize()
eth_init: calling ppc_4xx_eth_initialize()  <-- this happens after the
first call to 
                                                irq_install_handler
(VECNUM_MS,...) in
                                                ppc_4xx_eth_initialize()
miiphy_register: non unique device name 'ppc_4xx_eth0'
eth_init: returned from ppc_4xx_eth_initialize()
eth_init: calling ppc_4xx_eth_init()
ENET Speed is 100 Mbps - FULL duplex connection
eth_init: returned from  ppc_4xx_eth_init()
eth_init: calling ppc_4xx_eth_initialize()
miiphy_register: non unique device name 'ppc_4xx_eth0'
eth_init: returned from ppc_4xx_eth_initialize()
eth_init: calling ppc_4xx_eth_init()
ENET Speed is 100 Mbps - FULL duplex connection
eth_init: returned from  ppc_4xx_eth_init()
eth_init: calling ppc_4xx_eth_initialize()
miiphy_register: non unique device name 'ppc_4xx_eth0'
eth_init: returned from ppc_4xx_eth_initialize()
eth_init: calling ppc_4xx_eth_init()
ENET Speed is 100 Mbps - FULL duplex connection
---

-----Original Message-----
From: u-boot-users-bounces at lists.sourceforge.net
[mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf Of
Stalder, Reto
Sent: Montag, 19. Juni 2006 09:58
To: Matthias Fuchs
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] [heur] Re: PPC405EP ethernet problems


Hi,

hmm... actually there is no network related stuff in my board specific
code, only early init code. I assumed that - because I'm using a
PPC405EP cpu - the networking should already be handled by U-Boot
itself, e.g. in 'common/miiphyutil.c'. Am I wrong?

Here is, what the 'mii' command returns:

==> mii device
MII devices: 'ppc_4xx_eth0'
Current device: 'ppc_4xx_eth0'
==> mii info 0x0c
PHY_PHYIDR2 @ 0xc = 0x1619
PHY_PHYIDR[1,2] @ 0xc = 0x00221619
PHY 0x0C: OUI = 0x0885, Model = 0x21, Rev = 0x09, 100baseT, FDX 

Reto


> -----Original Message-----
> From: Matthias Fuchs [mailto:matthias.fuchs at esd-electronics.com]
> Sent: Freitag, 16. Juni 2006 17:26
> To: Stalder, Reto
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [heur] Re: [U-Boot-Users] PPC405EP ethernet problems
>
>
> Hi,
>
> is it possible that you use miiphy_read/write() somewhere in your
board 
> specific code? If so, in which function? Which board is it?
>
> Can you post the code from your board setup that does any network 
> related stuff?
> 
> Matthias
>
>> Stalder, Reto schrieb:
>> Hi Matthias
>> 
>> Thank you for your quick response! I've tried out your suggestion. 
>> Unfortunately U-Boot stops while booting, without reaching the
command 
>> prompt. The output is:
>> 
>> ...
>> U-Boot 1.1.4 (Jun 16 2006 - 16:45:43)
>> 
>> CPU:   AMCC PowerPC 405EP Rev. B at 266.666 MHz (PLB=133, OPB=66,
EBC=33
>> MHz)
>>        I2C boot EEPROM disabled
>>        16 kB I-Cache 16 kB D-Cache
>> DRAM:   8 MB
>> FLASH: 16 MB
>> In:    serial
>> Out:   serial
>> Err:   serial
>> Net:   
>> ...
>> 
>> Enabled debug outputs (with defined DEBUG and ET_DEBUG constants) do 
>> not tell me anything more. What else could I try?
>> 
>> Best regards,
>> Reto


_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users




More information about the U-Boot mailing list