summaryrefslogtreecommitdiff
path: root/drivers/net/keystone_net.c
diff options
context:
space:
mode:
authorVitaly Andrianov <vitalya@ti.com>2015-02-11 14:05:41 -0500
committerTom Rini <trini@ti.com>2015-02-16 12:41:41 -0500
commit312aca4e6964812007c8218c0b4b0737e9e0f46a (patch)
tree0aef712b905390bbcd1b079cb7d83699b328e964 /drivers/net/keystone_net.c
parent66c98a0c3807720a32ce49c9ba2a5808555062d7 (diff)
net: keystone_net: move serdes setup to initialization function
On Keystone2 devices serdes must be initialized before accessing MDIO bus. This commit moves the keystone2_net_serdes_setup() from keystone2_eth_open to keystone2_emac_initialize to meet that requirement. This also eliminates unnecessary serdes initializatin every time when the keystone2_eth_open is being called. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Nishanth Menon <nm@ti.com>
Diffstat (limited to 'drivers/net/keystone_net.c')
-rw-r--r--drivers/net/keystone_net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/keystone_net.c b/drivers/net/keystone_net.c
index bedab1d606..35f1a57331 100644
--- a/drivers/net/keystone_net.c
+++ b/drivers/net/keystone_net.c
@@ -398,8 +398,6 @@ static int keystone2_eth_open(struct eth_device *dev, bd_t *bis)
sys_has_mdio =
(eth_priv->sgmii_link_type == SGMII_LINK_MAC_PHY) ? 1 : 0;
- keystone2_net_serdes_setup();
-
if (sys_has_mdio)
keystone2_mdio_reset(mdio_bus);
@@ -556,6 +554,8 @@ int keystone2_emac_initialize(struct eth_priv_t *eth_priv)
return res;
}
+ keystone2_net_serdes_setup();
+
/* Create phy device and bind it with driver */
#ifdef CONFIG_KSNET_MDIO_PHY_CONFIG_ENABLE
phy_dev = phy_connect(mdio_bus, eth_priv->phy_addr,