drivers: net: cpsw: use cpsw-phy-sel driver to configure phy mode
authorMugunthan V N <mugunthanvnm@ti.com>
Fri, 20 Sep 2013 19:20:40 +0000 (00:50 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Sep 2013 14:33:07 +0000 (10:33 -0400)
Phy mode can be configured via the cpsw-phy-sel driver, this patch enabled the
cpsw driver to utilise the api provided by the cpsw-phy-sel driver to configure
the phy mode.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Tested-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c

index 01c42e1b5b11df5c2952110929553406eef33957..5efb37bf0681ff32203da5314aae517ac96c70b5 100644 (file)
@@ -1021,6 +1021,10 @@ static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv)
                dev_info(priv->dev, "phy found : id is : 0x%x\n",
                         slave->phy->phy_id);
                phy_start(slave->phy);
+
+               /* Configure GMII_SEL register */
+               cpsw_phy_sel(&priv->pdev->dev, slave->phy->interface,
+                            slave->slave_num);
        }
 }