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

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@lists.sourceforge.net [mailto:u-boot-users-bounces@lists.sourceforge.net] On Behalf Of Stalder, Reto Sent: Montag, 19. Juni 2006 09:58 To: Matthias Fuchs Cc: u-boot-users@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@esd-electronics.com] Sent: Freitag, 16. Juni 2006 17:26 To: Stalder, Reto Cc: u-boot-users@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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

In message 61C61BB7D4828E4EB72B065C85E3D8A628A4BD@szexchange.schmid-telecom.com you wrote:
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?
GCC-3.4.x has shown "funny" behaviour in a couple of cases. I recommend to use a known to be working toolchain and try this. The code you mention has been working fine for a long time on many boards, so I really guess it's a toolchain issue (not necessarily the compiler alone).
Best regards,
Wolfgang Denk

In message 61C61BB7D4828E4EB72B065C85E3D8A628A4BD@szexchange.schmid-telecom.com you wrote:
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
Forgot this one: Debian also tends to use some beta versions of the "make" tool which are obviously very broken. Make sure to use only stable versions.
Best regards,
Wolfgang Denk

Good morning,
nevertheless I recommend to use the CONFIG_NET_MULTI option. You won't get rid of:
miiphy_register: non unique device name 'ppc_4xx_eth0'
without it. The message comes from reregistering the phy stuff over and over again.
Is it possible that there is any chace that you get an enetInt just after the first irq_install_handler? Can you put a printf at the beginning of the entInt?
But of course it could be an tooling issue. So hear what the expert said :-)
Matthias
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
Forgot this one: Debian also tends to use some beta versions of the "make" tool which are obviously very broken. Make sure to use only stable versions.
Best regards,
Wolfgang Denk
participants (3)
-
Matthias Fuchs
-
Stalder, Reto
-
Wolfgang Denk