|
Edited by boob at 2016-4-6 17:18
I see that code in loboris kernel in ethernet driver, and i didn't find equivalent code in monjoie ethernet driver :
- if (IS_ERR(phydev)) {
- netdev_err(ndev, "Could not attach to PHY\n");
- goto err;
- } else {
- netdev_info(ndev, "%s: PHY ID %08x at %d IRQ %s (%s)\n",
- ndev->name, phydev->phy_id, phydev->addr,
- "poll", dev_name(&phydev->dev));
- #if defined(CONFIG_ARCH_SUN8IW8) || defined(CONFIG_ARCH_SUN8IW7)
- if (priv->phy_ext == INT_PHY) {
- phy_write(phydev, 0x1f, 0x013d);
- phy_write(phydev, 0x10, 0x3ffe);
- phy_write(phydev, 0x1f, 0x063d);
- phy_write(phydev, 0x13, 0x8000);
- phy_write(phydev, 0x1f, 0x023d);
- phy_write(phydev, 0x18, 0x1000);
- phy_write(phydev, 0x1f, 0x063d);
- phy_write(phydev, 0x15, 0x132c);
- phy_write(phydev, 0x1f, 0x013d);
- phy_write(phydev, 0x13, 0xd602);
- phy_write(phydev, 0x17, 0x003b);
- phy_write(phydev, 0x1f, 0x063d);
- phy_write(phydev, 0x14, 0x7088);
- phy_write(phydev, 0x1f, 0x033d);
- phy_write(phydev, 0x11, 0x8530);
- phy_write(phydev, 0x1f, 0x003d);
- }
Copy code
Someone understand what is the part of code, use?
this phy write for internal phy look strange and there is no documentation about that.
intphy_write(struct phy_device * phydev,u16 regnum,u16 val);
|
|