Date: Thu, 13 Mar 2008 11:46:00 +0100 From: Rafal Jaworowski <raj@semihalf.com> To: Jacques Fourie <jacques.fourie@gmail.com> Cc: freebsd-embedded@freebsd.org Subject: Re: Booting FreeBSD on MPC8540 eval board Message-ID: <47D905E8.5020608@semihalf.com> In-Reply-To: <be2f52430803130138n5d667b9vef2f8c1f2c5bb128@mail.gmail.com> References: <be2f52430803120811rf734af3ubf8fff00f253a71d@mail.gmail.com> <47D7FA35.30204@semihalf.com> <be2f52430803130138n5d667b9vef2f8c1f2c5bb128@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Jacques Fourie wrote: > Thanks - 'set hw.uart.console=mm:0xfef04500' fixed the console output for me. > From the console output I can see that miibus_probe() is failing for > all three ethernet devices. > > Here is the console output : > *snip* > > Here is some output obtained from uboot : > > MPC8540EVAL=> mii device > MII devices: 'TSEC0' 'TSEC1' 'FEC' > Current device: 'TSEC0' > MPC8540EVAL=> mii info > PHY 0x02: OUI = 0x04DE, Model = 0x0E, Rev = 0x02, 10baseT, HDX > PHY 0x04: OUI = 0x5043, Model = 0x06, Rev = 0x02, 100baseT, FDX > PHY 0x07: OUI = 0x5043, Model = 0x06, Rev = 0x02, 10baseT, HDX > PHY 0x1F: OUI = 0x0000, Model = 0x00, Rev = 0x00, 10baseT, HDX > MPC8540EVAL=> > PHY 0x02: OUI = 0x04DE, Model = 0x0E, Rev = 0x02, 10baseT, HDX > PHY 0x04: OUI = 0x5043, Model = 0x06, Rev = 0x02, 100baseT, FDX > PHY 0x07: OUI = 0x5043, Model = 0x06, Rev = 0x02, 10baseT, HDX > PHY 0x1F: OUI = 0x0000, Model = 0x00, Rev = 0x00, 10baseT, HDX > > Do I need some additional mods in the miibus code that is not in CVS? > I don't think so, just having miibus should suffice. The problem you're having is likely caused by a different MAC-PHY topology than is for CDS boards the port was mainly tested on. The hidden assumption we currently have requires a 1:1 mapping between TSEC units and PHY numbers they are 'routed' to. We don't deal too well with other/mixed MAC-PHY topologies that various systems can have. Please try this patch, or manipulate in a similar way, you'll get the idea: diff --git a/sys/dev/tsec/if_tsec.c b/sys/dev/tsec/if_tsec.c index a5aff35..bd3854b 100644 --- a/sys/dev/tsec/if_tsec.c +++ b/sys/dev/tsec/if_tsec.c @@ -1561,7 +1561,7 @@ tsec_miibus_readreg(device_t dev, int ph sc = device_get_softc(dev); - if (device_get_unit(dev) != phy) + if (phy != 4 || phy != 7) return (0); sc = tsec0_sc; Another thing, but not critical, is that we somehow seem to treat the third Ethernet controller as TSEC, which it isn't -- 8540 has FEC in addition to the two TSEC units, but FEC isn't supported at the moment at all, no driver etc. Rafal PS. Please boot with -v flag so that we can see more verbose output.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47D905E8.5020608>