Skip to contentSkip to conversation

net: keystone_net: move serdes setup to initialization function

PATCH In review Vitaly Andrianov 4 participants 4 messages Feb 11, 2015 – Feb 17, 2015 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/keystone_net.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/keystone_net.c +2 -2
index bedab1d..35f1a57 100644
@@ -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,
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 net: keystone_net: move serdes setup to initialization function

Quoted 10 lines · Vitaly Andrianov

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.

---

#2 lore raw

PATCH 1/1 net: keystone_net: move serdes setup to initialization function

In reply to Vitaly Andrianov
Quoted 9 lines · Vitaly Andrianov

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.

---

Necessary for keystone 2 devices to reach to shell.

Quoted 32 lines
 drivers/net/keystone_net.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/keystone_net.c +2 -2
index bedab1d..35f1a57 100644
@@ -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,
Signature · 6 lines
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Signature · 2 lines
Regards,
Nishanth Menon
#3 lore raw
In reply to Vitaly Andrianov
Quoted 10 lines · Vitaly Andrianov

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150217/1f5d19a2/attachment.sig>