@@ -1566,7 +1566,7 @@ static int emac_dev_open(struct net_device *ndev)
priv->phy_id = dev_name(phy);
}
- if (priv->phy_id) {
+ if (priv->phy_id && *priv->phy_id) {
priv->phydev = phy_connect(ndev, priv->phy_id,
&emac_adjust_link, 0,
PHY_INTERFACE_MODE_MII);
@@ -25,6 +25,13 @@ struct emac_platform_data {
u32 ctrl_ram_offset;
u32 hw_ram_addr;
u32 ctrl_ram_size;
+
+ /*
+ * phy_id can be one of the following:
+ * - NULL : use the first phy on the bus,
+ * - "" : force to 100/full, no mdio control
+ * - "<bus>:<addr>" : use the specified bus and phy
+ */
const char *phy_id;
u8 rmii_en;
u8 version;