[U-Boot-Users] [FEC] Fix and optimize MII operations on FEC (MPC8xx) controllers

Wolfgang Denk wd at denx.de
Wed Jan 9 14:52:22 CET 2008


In message <Pine.LNX.4.64.0711292057520.6673 at axis700.grange> you wrote:
> This patch fixes several issues at least on a MPC885 based system with two 
> FEC interfaces used in MII mode.
> 
> 1. PHY discovery should first read PHY_PHYIDR2 register and only then 
>    PHY_PHYIDR1 like cpu/mpc8xx/fec.c::mii_discover_phy() does it, 
>    otherwise the values read are wrong. Also notice, that PHY discovery 
>    cannot work on MPC88x / MPC87x in setups with both FECs active at all 
>    in its present form, because for both interfaces the registers from FEC 
>    1 are used to communicate over MII.
> 
> 2. Remove code duplication for resetting the FEC by isolating it into a 
>    separate function.
> 
> 3. Initialize MII on FEC 1 when communicating over FEC 2 in fec_init().
> 
> 4. Optimize mii_init() to only reset the FEC 1 controller once.
> 
> 5. Fix a typo in mii_init() using index i instead of j thus potentially 
>    leading to unpredictable results.
> 
> Signed-off-by: Guennadi Liakhovetski <lg at denx.de>

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Every little picofarad has a nanohenry all its own.      - Don Vonada




More information about the U-Boot mailing list