aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-25 16:23:04 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-25 16:23:04 +0000
commit00ca693f9b0839ea516bb1cb02940f0add8e55ce (patch)
tree7c9717c3cf0290280017d24c844fc9df433948e0
parentac8a06ae909035f6aeaf3cdf000f4d3b3a9c086d (diff)
downloadopenwrt-00ca693f9b0839ea516bb1cb02940f0add8e55ce.tar.gz
openwrt-00ca693f9b0839ea516bb1cb02940f0add8e55ce.zip
AA: generic: ar8216: set delay values for SGMII mode on AR8327
Backport of r34315. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@34373 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 8f3aded48..9cbe3a838 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -903,6 +903,20 @@ ar8327_get_pad_cfg(struct ar8327_pad_cfg *cfg)
case AR8327_PAD_MAC_SGMII:
t = AR8327_PAD_SGMII_EN;
+
+ /*
+ * WAR for the QUalcomm Atheros AP136 board.
+ * It seems that RGMII TX/RX delay settings needs to be
+ * applied for SGMII mode as well, The ethernet is not
+ * reliable without this.
+ */
+ t |= cfg->txclk_delay_sel << AR8327_PAD_RGMII_TXCLK_DELAY_SEL_S;
+ t |= cfg->rxclk_delay_sel << AR8327_PAD_RGMII_RXCLK_DELAY_SEL_S;
+ if (cfg->rxclk_delay_en)
+ t |= AR8327_PAD_RGMII_RXCLK_DELAY_EN;
+ if (cfg->txclk_delay_en)
+ t |= AR8327_PAD_RGMII_TXCLK_DELAY_EN;
+
break;
case AR8327_PAD_MAC2PHY_MII: