summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-12-25 18:45:31 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-12-25 18:45:31 +0000
commitd4b4c7d10281b553a11b6f3b5fd7a4c5adfbfbd3 (patch)
tree8d198aa9d04b37351bd5565523654f3c106adda1 /target
parent1dc2b6e8fa5a96d3667ed1eda6d5ecd30f310d32 (diff)
downloadmtk-20170518-d4b4c7d10281b553a11b6f3b5fd7a4c5adfbfbd3.zip
mtk-20170518-d4b4c7d10281b553a11b6f3b5fd7a4c5adfbfbd3.tar.gz
mtk-20170518-d4b4c7d10281b553a11b6f3b5fd7a4c5adfbfbd3.tar.bz2
generic: ar8216: add sgmii_delay_en field to ar8327_platform_data
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34881
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c3
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.h1
-rw-r--r--target/linux/generic/files/include/linux/ar8216_platform.h1
3 files changed, 5 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 8dcaf0a..b274b13 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -917,6 +917,9 @@ ar8327_get_pad_cfg(struct ar8327_pad_cfg *cfg)
if (cfg->txclk_delay_en)
t |= AR8327_PAD_RGMII_TXCLK_DELAY_EN;
+ if (cfg->sgmii_delay_en)
+ t |= AR8327_PAD_SGMII_DELAY_EN;
+
break;
case AR8327_PAD_MAC2PHY_MII:
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index d464101..c83bf44 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -281,6 +281,7 @@
#define AR8327_PAD_PHYX_GMII_EN BIT(16)
#define AR8327_PAD_PHYX_RGMII_EN BIT(17)
#define AR8327_PAD_PHYX_MII_EN BIT(18)
+#define AR8327_PAD_SGMII_DELAY_EN BIT(19)
#define AR8327_PAD_RGMII_RXCLK_DELAY_SEL BITS(20, 2)
#define AR8327_PAD_RGMII_RXCLK_DELAY_SEL_S 20
#define AR8327_PAD_RGMII_TXCLK_DELAY_SEL BITS(22, 2)
diff --git a/target/linux/generic/files/include/linux/ar8216_platform.h b/target/linux/generic/files/include/linux/ar8216_platform.h
index 5c75777..c6c6144 100644
--- a/target/linux/generic/files/include/linux/ar8216_platform.h
+++ b/target/linux/generic/files/include/linux/ar8216_platform.h
@@ -44,6 +44,7 @@ struct ar8327_pad_cfg {
bool pipe_rxclk_sel;
bool txclk_delay_en;
bool rxclk_delay_en;
+ bool sgmii_delay_en;
enum ar8327_clk_delay_sel txclk_delay_sel;
enum ar8327_clk_delay_sel rxclk_delay_sel;
};