]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: Add option to disable fiber on M88E1111 PHY for PPC4xx
authorStefan Roese <sr@denx.de>
Tue, 29 Jun 2010 07:23:53 +0000 (09:23 +0200)
committerBen Warren <biggerbadderben@gmail.com>
Mon, 12 Jul 2010 07:02:11 +0000 (00:02 -0700)
By defining CONFIG_M88E1111_DISABLE_FIBER boards can configure the
M88E1111 PYH to disable fiber. This is needed for an upcoming PPC460GT
based board, which has fiber/copper auto-selection enabled by default.
This doesn't seem to work. So we disable fiber in the PHY register.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
drivers/net/4xx_enet.c

index 2fac64167b9fd418f9a649f137ae0c11cfcc55b1..144b8513578cb97000d780797c1a34f3c2ac6df9 100644 (file)
@@ -1095,6 +1095,11 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)
                miiphy_write (dev->name, reg, 0x18, 0x4101);
                miiphy_write (dev->name, reg, 0x09, 0x0e00);
                miiphy_write (dev->name, reg, 0x04, 0x01e1);
+#if defined(CONFIG_M88E1111_DISABLE_FIBER)
+               miiphy_read(dev->name, reg, 0x1b, &reg_short);
+               reg_short |= 0x8000;
+               miiphy_write(dev->name, reg, 0x1b, reg_short);
+#endif
 #endif
 #if defined(CONFIG_M88E1112_PHY)
                if (bis->bi_phymode[devnum] == BI_PHYMODE_SGMII) {