[U-Boot] Fw: TFTP fails when using network switch

Jerry Van Baren
2009-01-20T17:13:52Z

Loren A. Linden Levy wrote:
> Hi Jerry,
>
> It looks to me like for the M%282 board the PHY address is determined
> by querying the MII interface:
>
> include/configs/M5282EVB.h
>
> #define CONFIG_MCFFEC
> #ifdef CONFIG_MCFFEC
> # define CONFIG_NET_MULTI 1
> # define CONFIG_MII 1
> # define CFG_DISCOVER_PHY
> ...
>
> This cause the code in ./drivers/net/mcffec.c specifically
> mii_discover_phy to be run, I tried to enable the debugging in this
> code:
>
> //#undef ET_DEBUG
> //#undef MII_DEBUG

I am not familiar with the code, but I would change them to #defines
rather than commenting out the #undefs, and look to see where they are
used to see what to expect to be printed out.

> but it does not seem to print anything (:(). One interesting feature is
> that once my uClinux image has booted I can talk to it over the
> switched network just fin. So the issue is really something in the
> setup of the MII PHY interface in u-boot. Is there any build target to
> allow me to try and debug this?

I still strongly suspect your hardware initialization isn't right
(again, I'm not familiar with the MPC5282 processor nor your board) or
your PHY is miswired (I'm assuming this is a custom board, not the eval
board).

You need to verify your hardware is toggling the MII pins on the PHY.
If it isn't, you need to verify your hardware is toggling the MII pins
on the processor. If not, it's likely your software
initialization/driver. If so, you have a hardware problem.

If the MII pins are not toggling, you are not going to get anywhere.
Until you verify it (hands on, with some sort of hardware probe), you
are shooting in the dark. While you can hit the target in the dark with
enough rounds, the efficiency sucks.

> Thanks.
>
> Alex

Good luck,
gvb