am335x: cpsw: make phy address configurable
authorYegor Yefremov <yegorslists@googlemail.com>
Mon, 26 Nov 2012 04:03:16 +0000 (04:03 +0000)
committerTom Rini <trini@ti.com>
Mon, 10 Dec 2012 15:56:38 +0000 (08:56 -0700)
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
drivers/net/cpsw.c
include/configs/am335x_evm.h

index af3d859..db04795 100644 (file)
@@ -920,7 +920,10 @@ static int cpsw_phy_init(struct eth_device *dev, struct cpsw_slave *slave)
                        SUPPORTED_100baseT_Full |
                        SUPPORTED_1000baseT_Full);
 
-       phydev = phy_connect(priv->bus, 0, dev, slave->data->phy_if);
+       phydev = phy_connect(priv->bus,
+                       CONFIG_PHY_ADDR,
+                       dev,
+                       slave->data->phy_if);
 
        phydev->supported &= supported;
        phydev->advertising = phydev->supported;
index 6abe544..aed40c8 100644 (file)
 #define CONFIG_NET_MULTI
 #define CONFIG_PHY_GIGE
 #define CONFIG_PHYLIB
+#define CONFIG_PHY_ADDR                        0
 #define CONFIG_PHY_SMSC
 
 #define CONFIG_NAND