[U-Boot] [PATCH 2/4] da830: emac: add support for RMII

Laurence Withers lwithers at guralp.com
Mon Oct 3 16:07:03 CEST 2011


On Fri, Sep 30, 2011 at 11:48:13AM -0400, Mike Frysinger wrote:
> On Friday, September 30, 2011 07:57:10 nagabhushana.netagunte at ti.com wrote:
> > --- a/drivers/net/davinci_emac.c
> > +++ b/drivers/net/davinci_emac.c
> > @@ -246,7 +246,7 @@ static int gen_get_link_speed(int phy_addr)
> >  	if (davinci_eth_phy_read(phy_addr, MII_STATUS_REG, &tmp) &&
> >  			(tmp & 0x04)) {
> >  #if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII) && \
> 
> there's a common CONFIG_RMII symbol already ...
> 
> > -		defined(CONFIG_MACH_DAVINCI_DA850_EVM)
> > +		defined(CONFIG_MACH_DAVINCI_DA8XX_EVM)
> 
> maybe it's just me, but board level defines in an emac driver make no sense

This led me to look a bit more closely at this code, and I think there is
something wrong with it. Under Linux, I am able to run in RMII mode at either
10BASE-T or 100BASE-TX, either by forcing it on the board with ethtool or by
forcing it on the managed switch.

However, the driver in U-Boot fails to work with 10BASE-T altogether. A
simple change to #if defined(CONFIG_SOC_DA8XX) doesn't seem to resolve the
situation so it would appear there are some bugs in the TI EMAC driver. I
also note it doesn't reset the PHY properly as if I reboot from Linux with
the PHY forced to 10BASE-T then U-Boot is no longer able to get the link up.

Bye for now,
-- 
Laurence Withers, <lwithers at guralp.com>                http://www.guralp.com/
Direct tel:+447753988197 or tel:+443333408643               Software Engineer
General support queries: <support at guralp.com>         CMG-DCM CMG-EAM CMG-NAM


More information about the U-Boot mailing list