diff mbox

[U-Boot,2/2,v2] net: phy: implements probe for Cortina phy

Message ID 1453967796-6723-1-git-send-email-shh.xie@gmail.com
State Accepted
Commit d8877e6f8ca4b6c08c0bc9c1fa8f855dc8776044
Delegated to: Joe Hershberger
Headers show

Commit Message

shaohui xie Jan. 28, 2016, 7:56 a.m. UTC
From: Shaohui Xie <Shaohui.Xie@nxp.com>

Cortina phy cannot support soft reset, this commit implements probe
for Cortina PHY to tell phylib to skip phy soft reset by setting
PHY_FLAG_BROKEN_RESET in flags.

Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
---
changes in v2:
1. use PHY_FLAG_BROKEN_RESET instead of PHY_BROKEN_RESET

 drivers/net/phy/cortina.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Joe Hershberger Jan. 29, 2016, 9:28 p.m. UTC | #1
Hi shaohui,

https://patchwork.ozlabs.org/patch/574634/ was applied to u-boot-net.git.

Thanks!
-Joe
diff mbox

Patch

diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c
index 3a2b3bb..ba1157f 100644
--- a/drivers/net/phy/cortina.c
+++ b/drivers/net/phy/cortina.c
@@ -256,6 +256,12 @@  int cs4340_config(struct phy_device *phydev)
 	return 0;
 }
 
+int cs4340_probe(struct phy_device *phydev)
+{
+	phydev->flags = PHY_FLAG_BROKEN_RESET;
+	return 0;
+}
+
 int cs4340_startup(struct phy_device *phydev)
 {
 	phydev->link = 1;
@@ -275,6 +281,7 @@  struct phy_driver cs4340_driver = {
 		 MDIO_DEVS_PHYXS | MDIO_DEVS_AN |
 		 MDIO_DEVS_VEND1 | MDIO_DEVS_VEND2),
 	.config = &cs4340_config,
+	.probe	= &cs4340_probe,
 	.startup = &cs4340_startup,
 	.shutdown = &gen10g_shutdown,
 };