Commit 312aca4e6964812007c8218c0b4b0737e9e0f46a
Committed by
Tom Rini
1 parent
66c98a0c38
Exists in
v2017.01-smarct4x
and in
37 other branches
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>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
drivers/net/keystone_net.c
... | ... | @@ -398,8 +398,6 @@ |
398 | 398 | sys_has_mdio = |
399 | 399 | (eth_priv->sgmii_link_type == SGMII_LINK_MAC_PHY) ? 1 : 0; |
400 | 400 | |
401 | - keystone2_net_serdes_setup(); | |
402 | - | |
403 | 401 | if (sys_has_mdio) |
404 | 402 | keystone2_mdio_reset(mdio_bus); |
405 | 403 | |
... | ... | @@ -555,6 +553,8 @@ |
555 | 553 | if (res) |
556 | 554 | return res; |
557 | 555 | } |
556 | + | |
557 | + keystone2_net_serdes_setup(); | |
558 | 558 | |
559 | 559 | /* Create phy device and bind it with driver */ |
560 | 560 | #ifdef CONFIG_KSNET_MDIO_PHY_CONFIG_ENABLE |