aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mediatek')
-rw-r--r--target/linux/mediatek/patches-4.9/0001-NET-multi-phy-support.patch6
-rw-r--r--target/linux/mediatek/patches-4.9/00013-soc-mediatek-Add-MT2701-power-dt-bindings.patch10
-rw-r--r--target/linux/mediatek/patches-4.9/0014-soc-mediatek-Refine-scpsys-to-support-multiple-platf.patch19
-rw-r--r--target/linux/mediatek/patches-4.9/0015-soc-mediatek-Add-MT2701-scpsys-driver.patch12
-rw-r--r--target/linux/mediatek/patches-4.9/0071-pwm-add-pwm-mediatek.patch16
-rw-r--r--target/linux/mediatek/patches-4.9/0083-mfd-led3.patch4
-rw-r--r--target/linux/mediatek/patches-4.9/0085-pmic-led0.patch3
-rw-r--r--target/linux/mediatek/patches-4.9/0086-pmic-led1.patch4
-rw-r--r--target/linux/mediatek/patches-4.9/0087-pmic-led2.patch10
-rw-r--r--target/linux/mediatek/patches-4.9/0088-pmic-led3.patch4
-rw-r--r--target/linux/mediatek/patches-4.9/0091-dsa1.patch3
-rw-r--r--target/linux/mediatek/patches-4.9/0091-net-next-mediatek-fix-DQL-support.patch6
-rw-r--r--target/linux/mediatek/patches-4.9/0092-dsa2.patch23
-rw-r--r--target/linux/mediatek/patches-4.9/0092-dsa3.patch6
-rw-r--r--target/linux/mediatek/patches-4.9/0092-dsa4.patch4
-rw-r--r--target/linux/mediatek/patches-4.9/0092-dsa5.patch16
-rw-r--r--target/linux/mediatek/patches-4.9/0093-dsa-compat.patch18
-rw-r--r--target/linux/mediatek/patches-4.9/0094-net-affinity.patch12
-rw-r--r--target/linux/mediatek/patches-4.9/0095-ephy.patch12
-rw-r--r--target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch30
-rw-r--r--target/linux/mediatek/patches-4.9/0097-dsa-mt7530.patch6
21 files changed, 66 insertions, 158 deletions
diff --git a/target/linux/mediatek/patches-4.9/0001-NET-multi-phy-support.patch b/target/linux/mediatek/patches-4.9/0001-NET-multi-phy-support.patch
index 92ff5eb3ee..e3347be9a2 100644
--- a/target/linux/mediatek/patches-4.9/0001-NET-multi-phy-support.patch
+++ b/target/linux/mediatek/patches-4.9/0001-NET-multi-phy-support.patch
@@ -11,7 +11,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
-@@ -1000,7 +1000,8 @@ void phy_state_machine(struct work_struc
+@@ -1032,7 +1032,8 @@ void phy_state_machine(struct work_struc
/* If the link is down, give up on negotiation for now */
if (!phydev->link) {
phydev->state = PHY_NOLINK;
@@ -21,7 +21,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
phydev->adjust_link(phydev->attached_dev);
break;
}
-@@ -1083,7 +1084,8 @@ void phy_state_machine(struct work_struc
+@@ -1115,7 +1116,8 @@ void phy_state_machine(struct work_struc
netif_carrier_on(phydev->attached_dev);
} else {
phydev->state = PHY_NOLINK;
@@ -31,7 +31,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
}
phydev->adjust_link(phydev->attached_dev);
-@@ -1095,7 +1097,8 @@ void phy_state_machine(struct work_struc
+@@ -1127,7 +1129,8 @@ void phy_state_machine(struct work_struc
case PHY_HALTED:
if (phydev->link) {
phydev->link = 0;
diff --git a/target/linux/mediatek/patches-4.9/00013-soc-mediatek-Add-MT2701-power-dt-bindings.patch b/target/linux/mediatek/patches-4.9/00013-soc-mediatek-Add-MT2701-power-dt-bindings.patch
index 28b3d7f17c..ce38640ab9 100644
--- a/target/linux/mediatek/patches-4.9/00013-soc-mediatek-Add-MT2701-power-dt-bindings.patch
+++ b/target/linux/mediatek/patches-4.9/00013-soc-mediatek-Add-MT2701-power-dt-bindings.patch
@@ -16,10 +16,8 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2 files changed, 35 insertions(+), 5 deletions(-)
create mode 100644 include/dt-bindings/power/mt2701-power.h
-Index: linux-4.9.14/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
-===================================================================
---- linux-4.9.14.orig/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
-+++ linux-4.9.14/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
+--- a/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
++++ b/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
@@ -9,17 +9,20 @@ domain control.
The driver implements the Generic PM domain bindings described in
@@ -46,10 +44,8 @@ Index: linux-4.9.14/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
Optional properties:
- vdec-supply: Power supply for the vdec power domain
-Index: linux-4.9.14/include/dt-bindings/power/mt2701-power.h
-===================================================================
--- /dev/null
-+++ linux-4.9.14/include/dt-bindings/power/mt2701-power.h
++++ b/include/dt-bindings/power/mt2701-power.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2015 MediaTek Inc.
diff --git a/target/linux/mediatek/patches-4.9/0014-soc-mediatek-Refine-scpsys-to-support-multiple-platf.patch b/target/linux/mediatek/patches-4.9/0014-soc-mediatek-Refine-scpsys-to-support-multiple-platf.patch
index 4c9e790d46..0786e52ba6 100644
--- a/target/linux/mediatek/patches-4.9/0014-soc-mediatek-Refine-scpsys-to-support-multiple-platf.patch
+++ b/target/linux/mediatek/patches-4.9/0014-soc-mediatek-Refine-scpsys-to-support-multiple-platf.patch
@@ -12,8 +12,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-scpsys.c | 348 +++++++++++++++++++++++---------------
1 file changed, 210 insertions(+), 138 deletions(-)
-diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c
-index 837effe19907..722aac80e611 100644
--- a/drivers/soc/mediatek/mtk-scpsys.c
+++ b/drivers/soc/mediatek/mtk-scpsys.c
@@ -11,17 +11,15 @@
@@ -181,7 +179,7 @@ index 837effe19907..722aac80e611 100644
struct genpd_onecell_data pd_data;
struct device *dev;
void __iomem *base;
-@@ -408,57 +324,55 @@ static bool scpsys_active_wakeup(struct device *dev)
+@@ -408,57 +324,55 @@ static bool scpsys_active_wakeup(struct
return scpd->data->active_wakeup;
}
@@ -262,7 +260,7 @@ index 837effe19907..722aac80e611 100644
struct scp_domain *scpd = &scp->domains[i];
const struct scp_domain_data *data = &scp_domain_data[i];
-@@ -467,13 +381,15 @@ static int scpsys_probe(struct platform_device *pdev)
+@@ -467,13 +381,15 @@ static int scpsys_probe(struct platform_
if (PTR_ERR(scpd->supply) == -ENODEV)
scpd->supply = NULL;
else
@@ -273,15 +271,15 @@ index 837effe19907..722aac80e611 100644
- pd_data->num_domains = NUM_DOMAINS;
+ pd_data->num_domains = num;
++
++ init_clks(pdev, clk);
- for (i = 0; i < NUM_DOMAINS; i++) {
-+ init_clks(pdev, clk);
-+
+ for (i = 0; i < num; i++) {
struct scp_domain *scpd = &scp->domains[i];
struct generic_pm_domain *genpd = &scpd->genpd;
const struct scp_domain_data *data = &scp_domain_data[i];
-@@ -482,13 +398,37 @@ static int scpsys_probe(struct platform_device *pdev)
+@@ -482,13 +398,37 @@ static int scpsys_probe(struct platform_
scpd->scp = scp;
scpd->data = data;
@@ -321,7 +319,7 @@ index 837effe19907..722aac80e611 100644
/*
* Initially turn on all domains to make the domains usable
-@@ -507,6 +447,123 @@ static int scpsys_probe(struct platform_device *pdev)
+@@ -507,6 +447,123 @@ static int scpsys_probe(struct platform_
* valid.
*/
@@ -445,7 +443,7 @@ index 837effe19907..722aac80e611 100644
ret = pm_genpd_add_subdomain(pd_data->domains[MT8173_POWER_DOMAIN_MFG_ASYNC],
pd_data->domains[MT8173_POWER_DOMAIN_MFG_2D]);
if (ret && IS_ENABLED(CONFIG_PM))
-@@ -517,21 +574,36 @@ static int scpsys_probe(struct platform_device *pdev)
+@@ -517,21 +574,36 @@ static int scpsys_probe(struct platform_
if (ret && IS_ENABLED(CONFIG_PM))
dev_err(&pdev->dev, "Failed to add subdomain: %d\n", ret);
@@ -486,6 +484,3 @@ index 837effe19907..722aac80e611 100644
static struct platform_driver scpsys_drv = {
.probe = scpsys_probe,
.driver = {
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.9/0015-soc-mediatek-Add-MT2701-scpsys-driver.patch b/target/linux/mediatek/patches-4.9/0015-soc-mediatek-Add-MT2701-scpsys-driver.patch
index c56a8a974f..51471496a8 100644
--- a/target/linux/mediatek/patches-4.9/0015-soc-mediatek-Add-MT2701-scpsys-driver.patch
+++ b/target/linux/mediatek/patches-4.9/0015-soc-mediatek-Add-MT2701-scpsys-driver.patch
@@ -17,10 +17,8 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-scpsys.c | 117 +++++++++++++++++++++++++++++++++++++-
2 files changed, 117 insertions(+), 2 deletions(-)
-Index: linux-4.9.14/drivers/soc/mediatek/Kconfig
-===================================================================
---- linux-4.9.14.orig/drivers/soc/mediatek/Kconfig
-+++ linux-4.9.14/drivers/soc/mediatek/Kconfig
+--- a/drivers/soc/mediatek/Kconfig
++++ b/drivers/soc/mediatek/Kconfig
@@ -23,7 +23,7 @@ config MTK_PMIC_WRAP
config MTK_SCPSYS
bool "MediaTek SCPSYS Support"
@@ -30,10 +28,8 @@ Index: linux-4.9.14/drivers/soc/mediatek/Kconfig
select REGMAP
select MTK_INFRACFG
select PM_GENERIC_DOMAINS if PM
-Index: linux-4.9.14/drivers/soc/mediatek/mtk-scpsys.c
-===================================================================
---- linux-4.9.14.orig/drivers/soc/mediatek/mtk-scpsys.c
-+++ linux-4.9.14/drivers/soc/mediatek/mtk-scpsys.c
+--- a/drivers/soc/mediatek/mtk-scpsys.c
++++ b/drivers/soc/mediatek/mtk-scpsys.c
@@ -20,6 +20,7 @@
#include <linux/regulator/consumer.h>
#include <linux/soc/mediatek/infracfg.h>
diff --git a/target/linux/mediatek/patches-4.9/0071-pwm-add-pwm-mediatek.patch b/target/linux/mediatek/patches-4.9/0071-pwm-add-pwm-mediatek.patch
index cf604f4cd0..19be772a14 100644
--- a/target/linux/mediatek/patches-4.9/0071-pwm-add-pwm-mediatek.patch
+++ b/target/linux/mediatek/patches-4.9/0071-pwm-add-pwm-mediatek.patch
@@ -13,10 +13,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
5 files changed, 279 insertions(+)
create mode 100644 drivers/pwm/pwm-mediatek.c
-Index: linux-4.9.17/drivers/pwm/Kconfig
-===================================================================
---- linux-4.9.17.orig/drivers/pwm/Kconfig
-+++ linux-4.9.17/drivers/pwm/Kconfig
+--- a/drivers/pwm/Kconfig
++++ b/drivers/pwm/Kconfig
@@ -282,6 +282,15 @@ config PWM_MTK_DISP
To compile this driver as a module, choose M here: the module
will be called pwm-mtk-disp.
@@ -33,10 +31,8 @@ Index: linux-4.9.17/drivers/pwm/Kconfig
config PWM_MXS
tristate "Freescale MXS PWM support"
depends on ARCH_MXS && OF
-Index: linux-4.9.17/drivers/pwm/Makefile
-===================================================================
---- linux-4.9.17.orig/drivers/pwm/Makefile
-+++ linux-4.9.17/drivers/pwm/Makefile
+--- a/drivers/pwm/Makefile
++++ b/drivers/pwm/Makefile
@@ -25,6 +25,7 @@ obj-$(CONFIG_PWM_LPSS) += pwm-lpss.o
obj-$(CONFIG_PWM_LPSS_PCI) += pwm-lpss-pci.o
obj-$(CONFIG_PWM_LPSS_PLATFORM) += pwm-lpss-platform.o
@@ -45,10 +41,8 @@ Index: linux-4.9.17/drivers/pwm/Makefile
obj-$(CONFIG_PWM_MTK_DISP) += pwm-mtk-disp.o
obj-$(CONFIG_PWM_MXS) += pwm-mxs.o
obj-$(CONFIG_PWM_OMAP_DMTIMER) += pwm-omap-dmtimer.o
-Index: linux-4.9.17/drivers/pwm/pwm-mediatek.c
-===================================================================
--- /dev/null
-+++ linux-4.9.17/drivers/pwm/pwm-mediatek.c
++++ b/drivers/pwm/pwm-mediatek.c
@@ -0,0 +1,230 @@
+/*
+ * Mediatek Pulse Width Modulator driver
diff --git a/target/linux/mediatek/patches-4.9/0083-mfd-led3.patch b/target/linux/mediatek/patches-4.9/0083-mfd-led3.patch
index a72da69e00..f743e10243 100644
--- a/target/linux/mediatek/patches-4.9/0083-mfd-led3.patch
+++ b/target/linux/mediatek/patches-4.9/0083-mfd-led3.patch
@@ -26,11 +26,9 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com>
drivers/mfd/mt6397-core.c | 4 ++++
1 file changed, 4 insertions(+)
-diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
-index e14d8b0..8e601c8 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
-@@ -48,6 +48,10 @@
+@@ -48,6 +48,10 @@ static const struct mfd_cell mt6323_devs
.name = "mt6323-regulator",
.of_compatible = "mediatek,mt6323-regulator"
},
diff --git a/target/linux/mediatek/patches-4.9/0085-pmic-led0.patch b/target/linux/mediatek/patches-4.9/0085-pmic-led0.patch
index 96662dd894..dee31cdc8b 100644
--- a/target/linux/mediatek/patches-4.9/0085-pmic-led0.patch
+++ b/target/linux/mediatek/patches-4.9/0085-pmic-led0.patch
@@ -26,9 +26,6 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com>
1 file changed, 60 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/leds-mt6323.txt
-diff --git a/Documentation/devicetree/bindings/leds/leds-mt6323.txt b/Documentation/devicetree/bindings/leds/leds-mt6323.txt
-new file mode 100644
-index 0000000..ac38472
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-mt6323.txt
@@ -0,0 +1,60 @@
diff --git a/target/linux/mediatek/patches-4.9/0086-pmic-led1.patch b/target/linux/mediatek/patches-4.9/0086-pmic-led1.patch
index 215b1b0d02..2edb4ba23d 100644
--- a/target/linux/mediatek/patches-4.9/0086-pmic-led1.patch
+++ b/target/linux/mediatek/patches-4.9/0086-pmic-led1.patch
@@ -26,11 +26,9 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Documentation/devicetree/bindings/mfd/mt6397.txt | 1 +
1 file changed, 1 insertion(+)
-diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt
-index c568d52..522a3bb 100644
--- a/Documentation/devicetree/bindings/mfd/mt6397.txt
+++ b/Documentation/devicetree/bindings/mfd/mt6397.txt
-@@ -6,6 +6,7 @@ MT6397/MT6323 is a multifunction device with the following sub modules:
+@@ -6,6 +6,7 @@ MT6397/MT6323 is a multifunction device
- Audio codec
- GPIO
- Clock
diff --git a/target/linux/mediatek/patches-4.9/0087-pmic-led2.patch b/target/linux/mediatek/patches-4.9/0087-pmic-led2.patch
index f3bc921e3d..f0d706cd44 100644
--- a/target/linux/mediatek/patches-4.9/0087-pmic-led2.patch
+++ b/target/linux/mediatek/patches-4.9/0087-pmic-led2.patch
@@ -30,10 +30,8 @@ Reviewed-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
3 files changed, 511 insertions(+)
create mode 100644 drivers/leds/leds-mt6323.c
-Index: linux-4.9.17/drivers/leds/Kconfig
-===================================================================
---- linux-4.9.17.orig/drivers/leds/Kconfig
-+++ linux-4.9.17/drivers/leds/Kconfig
+--- a/drivers/leds/Kconfig
++++ b/drivers/leds/Kconfig
@@ -117,6 +117,14 @@ config LEDS_MIKROTIK_RB532
This option enables support for the so called "User LED" of
Mikrotik's Routerboard 532.
@@ -49,10 +47,8 @@ Index: linux-4.9.17/drivers/leds/Kconfig
config LEDS_S3C24XX
tristate "LED Support for Samsung S3C24XX GPIO LEDs"
depends on LEDS_CLASS
-Index: linux-4.9.17/drivers/leds/leds-mt6323.c
-===================================================================
--- /dev/null
-+++ linux-4.9.17/drivers/leds/leds-mt6323.c
++++ b/drivers/leds/leds-mt6323.c
@@ -0,0 +1,502 @@
+/*
+ * LED driver for Mediatek MT6323 PMIC
diff --git a/target/linux/mediatek/patches-4.9/0088-pmic-led3.patch b/target/linux/mediatek/patches-4.9/0088-pmic-led3.patch
index 701dcec962..888218bbdc 100644
--- a/target/linux/mediatek/patches-4.9/0088-pmic-led3.patch
+++ b/target/linux/mediatek/patches-4.9/0088-pmic-led3.patch
@@ -28,11 +28,9 @@ Acked-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/mt6397-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
-diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
-index 8e601c8..04a601f 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
-@@ -47,8 +47,7 @@
+@@ -47,8 +47,7 @@ static const struct mfd_cell mt6323_devs
{
.name = "mt6323-regulator",
.of_compatible = "mediatek,mt6323-regulator"
diff --git a/target/linux/mediatek/patches-4.9/0091-dsa1.patch b/target/linux/mediatek/patches-4.9/0091-dsa1.patch
index c9bad9362d..ffc63dcc7c 100644
--- a/target/linux/mediatek/patches-4.9/0091-dsa1.patch
+++ b/target/linux/mediatek/patches-4.9/0091-dsa1.patch
@@ -27,9 +27,6 @@ Acked-by: Rob Herring <robh@kernel.org>
1 file changed, 92 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/dsa/mt7530.txt
-diff --git a/Documentation/devicetree/bindings/net/dsa/mt7530.txt b/Documentation/devicetree/bindings/net/dsa/mt7530.txt
-new file mode 100644
-index 0000000..a9bc27b
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/dsa/mt7530.txt
@@ -0,0 +1,92 @@
diff --git a/target/linux/mediatek/patches-4.9/0091-net-next-mediatek-fix-DQL-support.patch b/target/linux/mediatek/patches-4.9/0091-net-next-mediatek-fix-DQL-support.patch
index 5ae90e353f..6e65d27359 100644
--- a/target/linux/mediatek/patches-4.9/0091-net-next-mediatek-fix-DQL-support.patch
+++ b/target/linux/mediatek/patches-4.9/0091-net-next-mediatek-fix-DQL-support.patch
@@ -16,10 +16,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 33 ++++++++++++++++-----------
1 file changed, 20 insertions(+), 13 deletions(-)
-Index: linux-4.9.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-===================================================================
---- linux-4.9.14.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ linux-4.9.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -706,7 +706,16 @@ static int mtk_tx_map(struct sk_buff *sk
WRITE_ONCE(itxd->txd3, (TX_DMA_SWC | TX_DMA_PLEN0(skb_headlen(skb)) |
(!nr_frags * TX_DMA_LS0)));
diff --git a/target/linux/mediatek/patches-4.9/0092-dsa2.patch b/target/linux/mediatek/patches-4.9/0092-dsa2.patch
index 84e5cb43f7..a5b4242eb6 100644
--- a/target/linux/mediatek/patches-4.9/0092-dsa2.patch
+++ b/target/linux/mediatek/patches-4.9/0092-dsa2.patch
@@ -36,11 +36,9 @@ Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
6 files changed, 127 insertions(+)
create mode 100644 net/dsa/tag_mtk.c
-diff --git a/include/net/dsa.h b/include/net/dsa.h
-index 4e13e69..3276547 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
-@@ -31,6 +31,7 @@ enum dsa_tag_protocol {
+@@ -27,6 +27,7 @@ enum dsa_tag_protocol {
DSA_TAG_PROTO_EDSA,
DSA_TAG_PROTO_BRCM,
DSA_TAG_PROTO_QCA,
@@ -48,31 +46,25 @@ index 4e13e69..3276547 100644
DSA_TAG_LAST, /* MUST BE LAST */
};
-diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
-index 9649238..d78789b 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
-@@ -31,4 +31,6 @@ config NET_DSA_TAG_TRAILER
+@@ -41,4 +41,6 @@ config NET_DSA_TAG_TRAILER
config NET_DSA_TAG_QCA
bool
+config NET_DSA_TAG_MTK
+ bool
endif
-diff --git a/net/dsa/Makefile b/net/dsa/Makefile
-index 31d3437..9b1d478 100644
--- a/net/dsa/Makefile
+++ b/net/dsa/Makefile
-@@ -8,3 +8,4 @@ dsa_core-$(CONFIG_NET_DSA_TAG_DSA) += tag_dsa.o
+@@ -8,3 +8,4 @@ dsa_core-$(CONFIG_NET_DSA_TAG_DSA) += ta
dsa_core-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o
dsa_core-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o
dsa_core-$(CONFIG_NET_DSA_TAG_QCA) += tag_qca.o
+dsa_core-$(CONFIG_NET_DSA_TAG_MTK) += tag_mtk.o
-diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
-index b6d4f6a..617f736 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
-@@ -53,6 +53,9 @@ static struct sk_buff *dsa_slave_notag_xmit(struct sk_buff *skb,
+@@ -57,6 +57,9 @@ const struct dsa_device_ops *dsa_device_
#ifdef CONFIG_NET_DSA_TAG_QCA
[DSA_TAG_PROTO_QCA] = &qca_netdev_ops,
#endif
@@ -82,11 +74,9 @@ index b6d4f6a..617f736 100644
[DSA_TAG_PROTO_NONE] = &none_ops,
};
-diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
-index 0706a51..2a31399 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
-@@ -85,4 +85,7 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent,
+@@ -84,4 +84,7 @@ extern const struct dsa_device_ops brcm_
/* tag_qca.c */
extern const struct dsa_device_ops qca_netdev_ops;
@@ -94,9 +84,6 @@ index 0706a51..2a31399 100644
+extern const struct dsa_device_ops mtk_netdev_ops;
+
#endif
-diff --git a/net/dsa/tag_mtk.c b/net/dsa/tag_mtk.c
-new file mode 100644
-index 0000000..833a9d6
--- /dev/null
+++ b/net/dsa/tag_mtk.c
@@ -0,0 +1,117 @@
diff --git a/target/linux/mediatek/patches-4.9/0092-dsa3.patch b/target/linux/mediatek/patches-4.9/0092-dsa3.patch
index 7c4dc4f35c..385add1e3a 100644
--- a/target/linux/mediatek/patches-4.9/0092-dsa3.patch
+++ b/target/linux/mediatek/patches-4.9/0092-dsa3.patch
@@ -33,11 +33,9 @@ Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 ++++
2 files changed, 10 insertions(+)
-diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-index 9e75768..c21ed99 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1846,6 +1846,12 @@ static int mtk_hw_init(struct mtk_eth *eth)
+@@ -1855,6 +1855,12 @@ static int mtk_hw_init(struct mtk_eth *e
/* GE2, Force 1000M/FD, FC ON */
mtk_w32(eth, MAC_MCR_FIXED_LINK, MTK_MAC_MCR(1));
@@ -50,8 +48,6 @@ index 9e75768..c21ed99 100644
/* Enable RX VLan Offloading */
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
-diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-index 99b1c8e..996024d 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -70,6 +70,10 @@
diff --git a/target/linux/mediatek/patches-4.9/0092-dsa4.patch b/target/linux/mediatek/patches-4.9/0092-dsa4.patch
index d67b4a9e61..4daebfbc10 100644
--- a/target/linux/mediatek/patches-4.9/0092-dsa4.patch
+++ b/target/linux/mediatek/patches-4.9/0092-dsa4.patch
@@ -31,11 +31,9 @@ Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++
1 file changed, 2 insertions(+)
-diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-index c21ed99..84b09a4 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2323,6 +2323,8 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
+@@ -2333,6 +2333,8 @@ static int mtk_add_mac(struct mtk_eth *e
eth->netdev[id]->ethtool_ops = &mtk_ethtool_ops;
eth->netdev[id]->irq = eth->irq[0];
diff --git a/target/linux/mediatek/patches-4.9/0092-dsa5.patch b/target/linux/mediatek/patches-4.9/0092-dsa5.patch
index 6c101377c3..63a40d00de 100644
--- a/target/linux/mediatek/patches-4.9/0092-dsa5.patch
+++ b/target/linux/mediatek/patches-4.9/0092-dsa5.patch
@@ -49,8 +49,6 @@ Signed-off-by: Landen Chao <Landen.Chao@mediatek.com>
create mode 100644 drivers/net/dsa/mt7530.c
create mode 100644 drivers/net/dsa/mt7530.h
-diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
-index 0659846..5b322b4 100644
--- a/drivers/net/dsa/Kconfig
+++ b/drivers/net/dsa/Kconfig
@@ -34,4 +34,12 @@ config NET_DSA_QCA8K
@@ -66,21 +64,16 @@ index 0659846..5b322b4 100644
+ chip.
+
endmenu
-diff --git a/drivers/net/dsa/Makefile b/drivers/net/dsa/Makefile
-index a3c9416..8e629c1 100644
--- a/drivers/net/dsa/Makefile
+++ b/drivers/net/dsa/Makefile
-@@ -2,6 +2,6 @@ obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
- obj-$(CONFIG_NET_DSA_BCM_SF2) += bcm-sf2.o
- bcm-sf2-objs := bcm_sf2.o bcm_sf2_cfp.o
+@@ -1,6 +1,6 @@
+ obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
+ obj-$(CONFIG_NET_DSA_BCM_SF2) += bcm_sf2.o
obj-$(CONFIG_NET_DSA_QCA8K) += qca8k.o
-
+obj-$(CONFIG_NET_DSA_MT7530) += mt7530.o
obj-y += b53/
obj-y += mv88e6xxx/
-diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
-new file mode 100644
-index 0000000..ad2e6f8
--- /dev/null
+++ b/drivers/net/dsa/mt7530.c
@@ -0,0 +1,1126 @@
@@ -1210,9 +1203,6 @@ index 0000000..ad2e6f8
+MODULE_DESCRIPTION("Driver for Mediatek MT7530 Switch");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:mediatek-mt7530");
-diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h
-new file mode 100644
-index 0000000..05a612f
--- /dev/null
+++ b/drivers/net/dsa/mt7530.h
@@ -0,0 +1,390 @@
diff --git a/target/linux/mediatek/patches-4.9/0093-dsa-compat.patch b/target/linux/mediatek/patches-4.9/0093-dsa-compat.patch
index ca36d4c0d6..f69078cb4c 100644
--- a/target/linux/mediatek/patches-4.9/0093-dsa-compat.patch
+++ b/target/linux/mediatek/patches-4.9/0093-dsa-compat.patch
@@ -1,7 +1,5 @@
-Index: linux-4.9.17/drivers/net/dsa/mt7530.c
-===================================================================
---- linux-4.9.17.orig/drivers/net/dsa/mt7530.c
-+++ linux-4.9.17/drivers/net/dsa/mt7530.c
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
@@ -834,6 +834,7 @@ mt7530_port_bridge_join(struct dsa_switc
int i;
@@ -70,10 +68,8 @@ Index: linux-4.9.17/drivers/net/dsa/mt7530.c
}
static void
-Index: linux-4.9.17/drivers/net/dsa/mt7530.h
-===================================================================
---- linux-4.9.17.orig/drivers/net/dsa/mt7530.h
-+++ linux-4.9.17/drivers/net/dsa/mt7530.h
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
@@ -379,6 +379,8 @@ struct mt7530_priv {
struct mt7530_port ports[MT7530_NUM_PORTS];
/* protect among processes for registers access*/
@@ -83,10 +79,8 @@ Index: linux-4.9.17/drivers/net/dsa/mt7530.h
};
struct mt7530_hw_stats {
-Index: linux-4.9.17/net/dsa/tag_mtk.c
-===================================================================
---- linux-4.9.17.orig/net/dsa/tag_mtk.c
-+++ linux-4.9.17/net/dsa/tag_mtk.c
+--- a/net/dsa/tag_mtk.c
++++ b/net/dsa/tag_mtk.c
@@ -35,7 +35,7 @@ static struct sk_buff *mtk_tag_xmit(stru
/* Build the tag after the MAC Source Address */
mtk_tag = skb->data + 2 * ETH_ALEN;
diff --git a/target/linux/mediatek/patches-4.9/0094-net-affinity.patch b/target/linux/mediatek/patches-4.9/0094-net-affinity.patch
index 8e51bdd623..0c468fbceb 100644
--- a/target/linux/mediatek/patches-4.9/0094-net-affinity.patch
+++ b/target/linux/mediatek/patches-4.9/0094-net-affinity.patch
@@ -1,7 +1,5 @@
-Index: linux-4.9.17/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-===================================================================
---- linux-4.9.17.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ linux-4.9.17/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2459,15 +2459,23 @@ static int mtk_probe(struct platform_dev
goto err_deinit_hw;
}
@@ -26,10 +24,8 @@ Index: linux-4.9.17/drivers/net/ethernet/mediatek/mtk_eth_soc.c
err = mtk_mdio_init(eth);
if (err)
-Index: linux-4.9.17/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-===================================================================
---- linux-4.9.17.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-+++ linux-4.9.17/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -539,6 +539,7 @@ struct mtk_eth {
struct net_device *netdev[MTK_MAX_DEVS];
struct mtk_mac *mac[MTK_MAX_DEVS];
diff --git a/target/linux/mediatek/patches-4.9/0095-ephy.patch b/target/linux/mediatek/patches-4.9/0095-ephy.patch
index 52d8299077..dc88ca2ccd 100644
--- a/target/linux/mediatek/patches-4.9/0095-ephy.patch
+++ b/target/linux/mediatek/patches-4.9/0095-ephy.patch
@@ -1,7 +1,5 @@
-Index: linux-4.9.20/drivers/net/dsa/mt7530.c
-===================================================================
---- linux-4.9.20.orig/drivers/net/dsa/mt7530.c
-+++ linux-4.9.20/drivers/net/dsa/mt7530.c
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
@@ -629,6 +629,11 @@ mt7530_setup(struct dsa_switch *ds)
val = mt7530_read(priv, MT7530_MHWTRAP);
val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS;
@@ -14,10 +12,8 @@ Index: linux-4.9.20/drivers/net/dsa/mt7530.c
mt7530_write(priv, MT7530_MHWTRAP, val);
/* Enable and reset MIB counters */
-Index: linux-4.9.20/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-===================================================================
---- linux-4.9.20.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ linux-4.9.20/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -221,6 +221,9 @@ static void mtk_phy_link_adjust(struct n
netif_carrier_on(dev);
else
diff --git a/target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch b/target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch
index 2a562e1d1c..1a74e6387e 100644
--- a/target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch
+++ b/target/linux/mediatek/patches-4.9/0096-dsa-multi-cpu.patch
@@ -1,7 +1,5 @@
-Index: linux-4.9.20/drivers/net/dsa/mt7530.c
-===================================================================
---- linux-4.9.20.orig/drivers/net/dsa/mt7530.c
-+++ linux-4.9.20/drivers/net/dsa/mt7530.c
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
@@ -996,15 +996,7 @@ err:
static enum dsa_tag_protocol
mtk_get_tag_protocol(struct dsa_switch *ds)
@@ -19,10 +17,8 @@ Index: linux-4.9.20/drivers/net/dsa/mt7530.c
}
static struct dsa_switch_ops mt7530_switch_ops = {
-Index: linux-4.9.20/include/net/dsa.h
-===================================================================
---- linux-4.9.20.orig/include/net/dsa.h
-+++ linux-4.9.20/include/net/dsa.h
+--- a/include/net/dsa.h
++++ b/include/net/dsa.h
@@ -145,6 +145,8 @@ struct dsa_port {
struct device_node *dn;
unsigned int ageing_time;
@@ -72,10 +68,8 @@ Index: linux-4.9.20/include/net/dsa.h
struct switchdev_trans;
struct switchdev_obj;
struct switchdev_obj_port_fdb;
-Index: linux-4.9.20/net/dsa/dsa2.c
-===================================================================
---- linux-4.9.20.orig/net/dsa/dsa2.c
-+++ linux-4.9.20/net/dsa/dsa2.c
+--- a/net/dsa/dsa2.c
++++ b/net/dsa/dsa2.c
@@ -248,8 +248,6 @@ static int dsa_cpu_port_apply(struct dev
return err;
}
@@ -151,10 +145,8 @@ Index: linux-4.9.20/net/dsa/dsa2.c
}
pr_info("DSA: switch %d %d parsed\n", dst->tree, ds->index);
-Index: linux-4.9.20/net/dsa/dsa_priv.h
-===================================================================
---- linux-4.9.20.orig/net/dsa/dsa_priv.h
-+++ linux-4.9.20/net/dsa/dsa_priv.h
+--- a/net/dsa/dsa_priv.h
++++ b/net/dsa/dsa_priv.h
@@ -43,6 +43,7 @@ struct dsa_slave_priv {
int old_duplex;
@@ -163,10 +155,8 @@ Index: linux-4.9.20/net/dsa/dsa_priv.h
#ifdef CONFIG_NET_POLL_CONTROLLER
struct netpoll *netpoll;
#endif
-Index: linux-4.9.20/net/dsa/slave.c
-===================================================================
---- linux-4.9.20.orig/net/dsa/slave.c
-+++ linux-4.9.20/net/dsa/slave.c
+--- a/net/dsa/slave.c
++++ b/net/dsa/slave.c
@@ -61,7 +61,7 @@ static int dsa_slave_get_iflink(const st
{
struct dsa_slave_priv *p = netdev_priv(dev);
diff --git a/target/linux/mediatek/patches-4.9/0097-dsa-mt7530.patch b/target/linux/mediatek/patches-4.9/0097-dsa-mt7530.patch
index 9f785ddca2..26eff60003 100644
--- a/target/linux/mediatek/patches-4.9/0097-dsa-mt7530.patch
+++ b/target/linux/mediatek/patches-4.9/0097-dsa-mt7530.patch
@@ -1,7 +1,5 @@
-Index: linux-4.9.20/drivers/net/dsa/mt7530.c
-===================================================================
---- linux-4.9.20.orig/drivers/net/dsa/mt7530.c
-+++ linux-4.9.20/drivers/net/dsa/mt7530.c
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
@@ -627,7 +627,7 @@ mt7530_setup(struct dsa_switch *ds)
/* Enable Port 6 only; P5 as GMAC5 which currently is not supported */