lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 12 Dec 2011 18:09:18 +0800
From:	Richard Zhao <richard.zhao@...aro.org>
To:	<netdev@...r.kernel.org>
CC:	<linux-arm-kernel@...ts.infradead.org>, <davem@...emloft.net>,
	<shawn.guo@...aro.org>, <jgq516@...il.com>, <eric.miao@...aro.org>,
	<patches@...aro.org>, Richard Zhao <richard.zhao@...aro.org>
Subject: [PATCH 1/1] net/fec: add KSZ9021RN phy fixup

For imx6q sabrelite board, set phy RGMII pad skew.

Signed-off-by: Richard Zhao <richard.zhao@...aro.org>
---
 drivers/net/ethernet/freescale/fec.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index 112af9b..d3b4463 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -1513,6 +1513,21 @@ static inline void fec_reset_phy(struct platform_device *pdev)
 }
 #endif /* CONFIG_OF */
 
+/* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */
+static int ksz9021rn_phy_fixup(struct phy_device *phydev)
+{
+	/* min rx data delay */
+	phy_write(phydev, 0x0b, 0x8105);
+	phy_write(phydev, 0x0c, 0x0000);
+
+	/* max rx/tx clock delay, min rx/tx control delay */
+	phy_write(phydev, 0x0b, 0x8104);
+	phy_write(phydev, 0x0c, 0xf0f0);
+	phy_write(phydev, 0x0b, 0x104);
+
+	return 0;
+}
+
 static int __devinit
 fec_probe(struct platform_device *pdev)
 {
@@ -1597,6 +1612,10 @@ fec_probe(struct platform_device *pdev)
 	if (ret)
 		goto failed_init;
 
+	/* register the PHY board fixup (for Micrel KSZ9021RN) */
+	phy_register_fixup_for_uid(0x00221611, 0xfffffff0,
+					 ksz9021rn_phy_fixup);
+
 	ret = fec_enet_mii_init(pdev);
 	if (ret)
 		goto failed_mii_init;
-- 
1.7.5.4


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ