aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-11-23 20:55:26 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-11-23 20:55:26 +0000
commit8217b9bc8cc30b5a19c89648f7cdd0079157d5bb (patch)
tree49166ca47a1963977481f1858c545d744c771d49 /target
parent24cc4007ce46bb076bfe2879f66f19f52161f098 (diff)
downloadupstream-8217b9bc8cc30b5a19c89648f7cdd0079157d5bb.tar.gz
upstream-8217b9bc8cc30b5a19c89648f7cdd0079157d5bb.tar.bz2
upstream-8217b9bc8cc30b5a19c89648f7cdd0079157d5bb.zip
generic: ar8216: set delay values for SGMII mode on AR8327
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34315 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-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 8f3aded48f..9cbe3a838c 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: