aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-4.19/736-net-phy-at803x-allow-to-configure-via-dt.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-11-01 17:57:55 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2018-12-15 12:50:06 +0100
commit52a82ce3dd901a1536c7d7d9d963e9c2d761c816 (patch)
tree79020fb59420fcea7bdc4b12272f7251e101fe64 /target/linux/generic/pending-4.19/736-net-phy-at803x-allow-to-configure-via-dt.patch
parenta272af75cd8c67d265400f96c1e6bb172315c23c (diff)
downloadupstream-52a82ce3dd901a1536c7d7d9d963e9c2d761c816.tar.gz
upstream-52a82ce3dd901a1536c7d7d9d963e9c2d761c816.tar.bz2
upstream-52a82ce3dd901a1536c7d7d9d963e9c2d761c816.zip
kernel: Copy patches from kernel 4.14 to 4.19
This just copies the files from the kernel 4.14 specific folders into the kernel 4.19 specific folder, no changes are done to the files in this commit. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/generic/pending-4.19/736-net-phy-at803x-allow-to-configure-via-dt.patch')
-rw-r--r--target/linux/generic/pending-4.19/736-net-phy-at803x-allow-to-configure-via-dt.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/target/linux/generic/pending-4.19/736-net-phy-at803x-allow-to-configure-via-dt.patch b/target/linux/generic/pending-4.19/736-net-phy-at803x-allow-to-configure-via-dt.patch
new file mode 100644
index 0000000000..6bc626dd6a
--- /dev/null
+++ b/target/linux/generic/pending-4.19/736-net-phy-at803x-allow-to-configure-via-dt.patch
@@ -0,0 +1,47 @@
+--- a/drivers/net/phy/at803x.c
++++ b/drivers/net/phy/at803x.c
+@@ -354,6 +354,14 @@ static int at803x_config_init(struct phy
+ AT803X_DEBUG_TX_CLK_DLY_EN, 0);
+ }
+
++#ifdef CONFIG_OF_MDIO
++ if (phydev->mdio.dev.of_node &&
++ of_property_read_bool(phydev->mdio.dev.of_node,
++ "at803x-disable-smarteee")) {
++ at803x_disable_smarteee(phydev);
++ }
++#endif
++
+ return 0;
+ }
+
+@@ -392,6 +400,7 @@ static void at803x_link_change_notify(st
+ {
+ struct at803x_priv *priv = phydev->priv;
+ struct at803x_platform_data *pdata;
++ u8 fixup_rgmii_tx_delay = 0;
+ pdata = dev_get_platdata(&phydev->mdio.dev);
+
+ /*
+@@ -421,8 +430,19 @@ static void at803x_link_change_notify(st
+ } else {
+ priv->phy_reset = false;
+ }
+- if (pdata && pdata->fixup_rgmii_tx_delay &&
+- phydev->speed != priv->prev_speed) {
++
++ if (pdata && pdata->fixup_rgmii_tx_delay)
++ fixup_rgmii_tx_delay = 1;
++
++#ifdef CONFIG_OF_MDIO
++ if (phydev->mdio.dev.of_node &&
++ of_property_read_bool(phydev->mdio.dev.of_node,
++ "at803x-fixup-rgmii-tx-delay")) {
++ fixup_rgmii_tx_delay = 1;
++ }
++#endif
++
++ if (fixup_rgmii_tx_delay && phydev->speed != priv->prev_speed) {
+ switch (phydev->speed) {
+ case SPEED_10:
+ case SPEED_100: