Changeset 36059
- Timestamp:
- 2013-03-16T23:25:41+01:00 (5 years ago)
- Location:
- trunk/target/linux/mcs814x/files-3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/target/linux/mcs814x/files-3.3/arch/arm/boot/dts/dlan-usb-extender.dts
r33127 r36059 20 20 ahb { 21 21 vci { 22 eth0: ethernet@40084000 { 23 phy = <&phy0>; 24 phy-mode = "mii"; 25 26 phy0: ethernet-phy@0 { 27 reg = <8>; 28 }; 29 }; 22 30 23 31 adc { -
trunk/target/linux/mcs814x/files-3.3/arch/arm/boot/dts/mcs8140.dtsi
r32730 r36059 38 38 39 39 eth0: ethernet@40084000 { 40 #address-cells = <1>; 41 #size-cells = <0>; 42 40 43 compatible = "moschip,nuport-mac"; 41 44 reg = <0x40084000 0xd8 // mac -
trunk/target/linux/mcs814x/files-3.3/arch/arm/boot/dts/rbt-832.dts
r32486 r36059 22 22 eth0: ethernet@40084000 { 23 23 nuport-mac,link-activity = <0x01>; 24 phy = <&phy0>; 25 phy-mode = "mii"; 26 27 phy0: ethernet-phy@0 { 28 reg = <1>; 29 }; 24 30 }; 25 31 -
trunk/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c
r33780 r36059 20 20 #include <linux/platform_device.h> 21 21 #include <linux/of.h> 22 #include <linux/of_mdio.h> 23 #include <linux/of_net.h> 22 24 #include <linux/irq.h> 23 25 #include <linux/err.h> … … 169 171 struct mii_bus *mii_bus; 170 172 struct phy_device *phydev; 173 struct device_node *phy_node; 174 phy_interface_t phy_interface; 171 175 int old_link; 172 176 int old_duplex; … … 899 903 } 900 904 901 phydev = phy_connect(dev, dev_name(&phydev->dev),905 phydev = of_phy_connect(dev, priv->phy_node, 902 906 nuport_mac_adjust_link, 0, 903 PHY_INTERFACE_MODE_MII);907 priv->phy_interface); 904 908 if (IS_ERR(phydev)) { 905 909 netdev_err(dev, "could not attach PHY\n"); … … 1082 1086 1083 1087 netif_napi_add(dev, &priv->napi, nuport_mac_poll, 64); 1088 1089 priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy", 0); 1090 if (!priv->phy_node) { 1091 dev_err(&pdev->dev, "no associated PHY\n"); 1092 ret = -ENODEV; 1093 goto out; 1094 } 1095 1096 priv->phy_interface = of_get_phy_mode(pdev->dev.of_node); 1097 if (priv->phy_interface < 0) { 1098 dev_err(&pdev->dev, "invalid PHY mode\n"); 1099 ret = -EINVAL; 1100 goto out; 1101 } 1084 1102 1085 1103 priv->mii_bus = mdiobus_alloc(); … … 1107 1125 priv->mii_bus->irq[i] = PHY_IGNORE_INTERRUPT; 1108 1126 1109 ret = mdiobus_register(priv->mii_bus);1127 ret = of_mdiobus_register(priv->mii_bus, pdev->dev.of_node); 1110 1128 if (ret) { 1111 1129 dev_err(&pdev->dev, "failed to register mii_bus\n");
Note: See TracChangeset
for help on using the changeset viewer.