freescale lite 5200 board and kernel 2.6

Andrew Dennison andrewd.lists at gmail.com
Sun Apr 16 21:43:17 EST 2006


On 4/13/06, Domenico Andreoli <cavokz at gmail.com> wrote:
> no, it does not, it uses GENERIC. when PHY is detected as LXT971,
> network works.
>
> actually this is unrelated with previous runs of kernel 2.4 (as i
> stated in some previous post). sometimes PHY is detected correctly,
> sometimes is not.
>

Is the PHY address something other than 0?

If there is no pullup on MDIO (?) and the PHY address isn't 0
sometimes a PHY will be detected on the wrong address. Well that's the
problem I had with a 5200 on a custom board. I worked around something
like this with the following (edited) patch / hack. The correct answer
was to add a pullup on the board, but this is fairly safe as it won't
misdetect any of the phys supported in fec.c.

--- arch/ppc/5xxx_io/fec.c      15 Feb 2005 00:19:13 -0000      1.10
+++ arch/ppc/5xxx_io/fec.c      22 Apr 2005 05:28:12 -0000
@@ -732,7 +825,7 @@ mii_discover_phy(uint mii_reg, struct ne
        printk("mii_discover_phy\n");
 #endif

-       if ((phytype = (mii_reg & 0xffff)) != 0xffff) {
+       if ((phytype = (mii_reg & 0x3ff)) != 0x3ff) { /* hack - was 0xffff */
                /* Got first part of ID, now get remainder.
                */
                priv->phy_id = phytype << 16;



More information about the Linuxppc-embedded mailing list