aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch87
-rw-r--r--target/linux/ramips/patches-4.3/0004-MIPS-ralink-add-MT7621-pcie-driver.patch23
-rw-r--r--target/linux/ramips/patches-4.3/0005-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch8
-rw-r--r--target/linux/ramips/patches-4.3/0006-MIPS-ralink-add-cpu-frequency-scaling.patch9
-rw-r--r--target/linux/ramips/patches-4.3/0007-MIPS-ralink-copy-the-commandline-from-the-devicetree.patch5
-rw-r--r--target/linux/ramips/patches-4.3/0008-MIPS-ralink-mt7620-fix-usb-issue-during-frequency-sc.patch5
-rw-r--r--target/linux/ramips/patches-4.3/0009-PCI-MIPS-adds-mt7620a-pcie-driver.patch14
-rw-r--r--target/linux/ramips/patches-4.3/0010-arch-mips-ralink-add-spi1-clocks.patch9
-rw-r--r--target/linux/ramips/patches-4.3/0011-arch-mips-ralink-unify-soc-detection.patch15
-rw-r--r--target/linux/ramips/patches-4.3/0012-arch-mips-fix-clock-jitter.patch7
-rw-r--r--target/linux/ramips/patches-4.3/0013-owrt-hack-fix-mt7688-cache-issue.patch7
-rw-r--r--target/linux/ramips/patches-4.3/0014-arch-mips-cleanup-cevt-rt3352.patch21
-rw-r--r--target/linux/ramips/patches-4.3/0015-arch-mips-do-not-select-illegal-access-driver-by-def.patch5
-rw-r--r--target/linux/ramips/patches-4.3/0016-arch-mips-ralink-remove-non-PCI-check.patch7
-rw-r--r--target/linux/ramips/patches-4.3/0017-arch-mips-ralink-do-not-set-pm_poweroff.patch7
-rw-r--r--target/linux/ramips/patches-4.3/0018-arch-mips-ralink-reset-pci-prior-to-reboot.patch5
-rw-r--r--target/linux/ramips/patches-4.3/0019-arch-mips-ralink-add-mt7621-cpu-feature-overrides.patch6
-rw-r--r--target/linux/ramips/patches-4.3/0020-arch-mips-ralink-mt7628-fixes.patch15
-rw-r--r--target/linux/ramips/patches-4.3/0021-arch-mips-ralink-add-mt7688-detection.patch13
-rw-r--r--target/linux/ramips/patches-4.3/0022-arch-mips-ralink-proper-vendor-id-srtring.patch7
-rw-r--r--target/linux/ramips/patches-4.3/0023-arch-mips-ralink-unify-soc-id.patch13
-rw-r--r--target/linux/ramips/patches-4.3/0024-GPIO-add-named-gpio-exports.patch21
-rw-r--r--target/linux/ramips/patches-4.3/0025-pinctrl-ralink-add-pinctrl-driver.patch12
-rw-r--r--target/linux/ramips/patches-4.3/0026-DT-Add-documentation-for-gpio-ralink.patch6
-rw-r--r--target/linux/ramips/patches-4.3/0029-phy-usb-add-ralink-phy.patch12
-rw-r--r--target/linux/ramips/patches-4.3/0030-USB-add-OHCI-EHCI-OF-binding.patch11
-rw-r--r--target/linux/ramips/patches-4.3/0031-uvc-add-iPassion-iP2970-support.patch21
-rw-r--r--target/linux/ramips/patches-4.3/0032-USB-dwc2-add-device_reset.patch7
-rw-r--r--target/linux/ramips/patches-4.3/0033-USB-add-xhci-hooks.patch92
-rw-r--r--target/linux/ramips/patches-4.3/0034-NET-multi-phy-support.patch13
-rw-r--r--target/linux/ramips/patches-4.3/0035-NET-MIPS-add-ralink-SoC-ethernet-driver.patch5
-rw-r--r--target/linux/ramips/patches-4.3/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch9
-rw-r--r--target/linux/ramips/patches-4.3/0037-mtd-cfi-cmdset-0002-force-word-write.patch15
-rw-r--r--target/linux/ramips/patches-4.3/0038-mtd-ralink-add-mt7620-nand-driver.patch13
-rw-r--r--target/linux/ramips/patches-4.3/0039-mtd-add-mt7621-nand-support.patch48
-rw-r--r--target/linux/ramips/patches-4.3/0040-nand-add-mtk-nand-hack-hook.patch27
-rw-r--r--target/linux/ramips/patches-4.3/0041-DT-Add-documentation-for-spi-rt2880.patch6
-rw-r--r--target/linux/ramips/patches-4.3/0042-SPI-ralink-add-Ralink-SoC-spi-driver.patch14
-rw-r--r--target/linux/ramips/patches-4.3/0043-spi-add-mt7621-support.patch14
-rw-r--r--target/linux/ramips/patches-4.3/0044-i2c-MIPS-adds-ralink-I2C-driver.patch13
-rw-r--r--target/linux/ramips/patches-4.3/0045-i2c-add-mt7621-driver.patch10
-rw-r--r--target/linux/ramips/patches-4.3/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch30
-rw-r--r--target/linux/ramips/patches-4.3/0047-DMA-ralink-add-rt2880-dma-engine.patch16
-rw-r--r--target/linux/ramips/patches-4.3/0048-asoc-add-mt7620-support.patch21
-rw-r--r--target/linux/ramips/patches-4.3/0049-watchdog-add-MT7621-support.patch14
-rw-r--r--target/linux/ramips/patches-4.3/0050-alsa-add-ralink-sdk-driver.patch91
-rw-r--r--target/linux/ramips/patches-4.3/0051-serial-add-ugly-custom-baud-rate-hack.patch7
-rw-r--r--target/linux/ramips/patches-4.3/0052-pwm-add-mediatek-support.patch12
-rw-r--r--target/linux/ramips/patches-4.3/0060-mt7621-set-up-palmbus-memory-region.patch36
-rw-r--r--target/linux/ramips/patches-4.3/0061-mt7621-set-up-pci-memory-region.patch42
-rw-r--r--target/linux/ramips/patches-4.3/0062-remove-cm-memory-regions-cleanup-hack.patch20
-rw-r--r--target/linux/ramips/patches-4.3/0100-mtd-split-remove-padding.patch2
-rw-r--r--target/linux/ramips/patches-4.3/0101-mtd-add-rtn56u-support.patch4
-rw-r--r--target/linux/ramips/patches-4.3/0104-fix_bootargs_handling.patch4
-rw-r--r--target/linux/ramips/patches-4.3/0500-Documentation-DT-net-add-docs-for-ralink-mediatek-So.patch12
-rw-r--r--target/linux/ramips/patches-4.3/0501-net-next-mediatek-add-the-drivers-core-files.patch21
-rw-r--r--target/linux/ramips/patches-4.3/0502-net-next-mediatek-add-switch-driver-for-rt3050.patch9
-rw-r--r--target/linux/ramips/patches-4.3/0503-net-next-mediatek-add-switch-driver-for-mt7620.patch9
-rw-r--r--target/linux/ramips/patches-4.3/0504-net-next-mediatek-add-switch-driver-for-mt7621.patch6
-rw-r--r--target/linux/ramips/patches-4.3/0505-net-next-mediatek-add-support-for-rt2880.patch12
-rw-r--r--target/linux/ramips/patches-4.3/0506-net-next-mediatek-add-support-for-rt3050.patch4
-rw-r--r--target/linux/ramips/patches-4.3/0507-net-next-mediatek-add-support-for-rt3883.patch6
-rw-r--r--target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch9
-rw-r--r--target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch6
-rw-r--r--target/linux/ramips/patches-4.3/0510-net-next-mediatek-add-Kconfig-and-Makefile.patch17
-rw-r--r--target/linux/ramips/patches-4.3/0511-net-mediatek-add-support-for-the-multiphy-carrier-pa.patch25
-rw-r--r--target/linux/ramips/patches-4.3/0512-net-mediatek-add-swconfig-driver-for-esw_rt3050.patch15
-rw-r--r--target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch23
-rw-r--r--target/linux/ramips/patches-4.3/0514-net-mediatek-fix_esw.patch8
-rw-r--r--target/linux/ramips/patches-4.3/0601-net-mediatke-add-phy_ethtool_ioctl-support.patch7
-rw-r--r--target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch82
-rw-r--r--target/linux/ramips/patches-4.3/0903-mt7621-fix-gic-perfcounter.patch16
72 files changed, 241 insertions, 1002 deletions
diff --git a/target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch b/target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch
index 2e6fd6e0c7..dab8e8d2b8 100644
--- a/target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch
+++ b/target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch
@@ -36,7 +36,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#endif
--- /dev/null
+++ b/arch/mips/include/asm/mach-ralink/mt7621.h
-@@ -0,0 +1,39 @@
+@@ -0,0 +1,42 @@
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
@@ -52,6 +52,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#ifndef _MT7621_REGS_H_
+#define _MT7621_REGS_H_
+
++#define MT7621_PALMBUS_BASE 0x1C000000
++#define MT7621_PALMBUS_SIZE 0x03FFFFFF
++
+#define MT7621_SYSC_BASE 0x1E000000
+
+#define SYSC_REG_CHIP_NAME0 0x00
@@ -76,26 +79,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#define MIPS_GIC_IRQ_BASE (MIPS_CPU_IRQ_BASE + 8)
+
+#endif
---- a/arch/mips/kernel/mips-cm.c
-+++ b/arch/mips/kernel/mips-cm.c
-@@ -232,7 +232,7 @@ int mips_cm_probe(void)
- write_gcr_base(base_reg);
-
- /* disable CM regions */
-- write_gcr_reg0_base(CM_GCR_REGn_BASE_BASEADDR_MSK);
-+/* write_gcr_reg0_base(CM_GCR_REGn_BASE_BASEADDR_MSK);
- write_gcr_reg0_mask(CM_GCR_REGn_MASK_ADDRMASK_MSK);
- write_gcr_reg1_base(CM_GCR_REGn_BASE_BASEADDR_MSK);
- write_gcr_reg1_mask(CM_GCR_REGn_MASK_ADDRMASK_MSK);
-@@ -240,7 +240,7 @@ int mips_cm_probe(void)
- write_gcr_reg2_mask(CM_GCR_REGn_MASK_ADDRMASK_MSK);
- write_gcr_reg3_base(CM_GCR_REGn_BASE_BASEADDR_MSK);
- write_gcr_reg3_mask(CM_GCR_REGn_MASK_ADDRMASK_MSK);
--
-+*/
- /* probe for an L2-only sync region */
- mips_cm_probe_l2sync();
-
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -51,6 +51,7 @@ SECTIONS
@@ -120,7 +103,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
choice
prompt "Ralink SoC selection"
default SOC_RT305X
-@@ -34,6 +39,14 @@ choice
+@@ -34,6 +39,16 @@ choice
config SOC_MT7620
bool "MT7620/8"
@@ -131,11 +114,13 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ select SYS_SUPPORTS_SMP
+ select SYS_SUPPORTS_MIPS_CPS
+ select MIPS_GIC
++ select COMMON_CLK
++ select CLKSRC_MIPS_GIC
+ select HW_HAS_PCI
endchoice
choice
-@@ -65,6 +78,10 @@ choice
+@@ -65,6 +80,10 @@ choice
depends on SOC_MT7620
select BUILTIN_DTB
@@ -148,19 +133,23 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
endif
--- a/arch/mips/ralink/Makefile
+++ b/arch/mips/ralink/Makefile
-@@ -6,16 +6,20 @@
+@@ -6,16 +6,24 @@
# Copyright (C) 2009-2011 Gabor Juhos <juhosg@openwrt.org>
# Copyright (C) 2013 John Crispin <blogic@openwrt.org>
-obj-y := prom.o of.o reset.o clk.o irq.o timer.o
-+obj-y := prom.o of.o reset.o clk.o timer.o
++obj-y := prom.o of.o reset.o
++
++ifndef CONFIG_MIPS_GIC
++ obj-y += clk.o timer.o
++endif
obj-$(CONFIG_CLKEVT_RT3352) += cevt-rt3352.o
obj-$(CONFIG_RALINK_ILL_ACC) += ill_acc.o
+obj-$(CONFIG_IRQ_INTC) += irq.o
-+obj-$(CONFIG_MIPS_GIC) += irq-gic.o
++obj-$(CONFIG_MIPS_GIC) += irq-gic.o timer-gic.o
+
obj-$(CONFIG_SOC_RT288X) += rt288x.o
obj-$(CONFIG_SOC_RT305X) += rt305x.o
@@ -188,13 +177,13 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
+#include <linux/of.h>
+#include <linux/irqchip.h>
-+
+#include <linux/irqchip/mips-gic.h>
+
-+unsigned int get_c0_compare_int(void)
++int get_c0_perfcount_int(void)
+{
-+ return gic_get_c0_compare_int();
++ return gic_get_c0_perfcount_int();
+}
++EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
+
+void __init
+arch_init_irq(void)
@@ -204,7 +193,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
--- /dev/null
+++ b/arch/mips/ralink/mt7621.c
-@@ -0,0 +1,213 @@
+@@ -0,0 +1,223 @@
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
@@ -359,11 +348,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ }
+ break;
+ }
-+ cpu_clk = 880000000;
-+ ralink_clk_add("cpu", cpu_clk);
-+ ralink_clk_add("1e000b00.spi", 50000000);
-+ ralink_clk_add("1e000c00.uartlite", 50000000);
-+ ralink_clk_add("1e000d00.uart", 50000000);
+}
+
+void __init ralink_of_remap(void)
@@ -411,6 +395,21 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ mips_cm_probe();
+ mips_cpc_probe();
+
++ if (mips_cm_numiocu()) {
++ /* mips_cm_probe() wipes out bootloader
++ config for CM regions and we have to configure them
++ again. This SoC cannot talk to pamlbus devices
++ witout proper iocu region set up.
++
++ FIXME: it would be better to do this with values
++ from DT, but we need this very early because
++ without this we cannot talk to pretty much anything
++ including serial.
++ */
++ write_gcr_reg0_base(MT7621_PALMBUS_BASE);
++ write_gcr_reg0_mask(~MT7621_PALMBUS_SIZE | CM_GCR_REGn_MASK_CMTGT_IOCU0);
++ }
++
+ if (!register_cps_smp_ops())
+ return;
+ if (!register_cmp_smp_ops())
@@ -418,3 +417,21 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ if (!register_vsmp_smp_ops())
+ return;
+}
+--- /dev/null
++++ b/arch/mips/ralink/timer-gic.c
+@@ -0,0 +1,15 @@
++#include <linux/init.h>
++
++#include <linux/of.h>
++#include <linux/clk-provider.h>
++#include <linux/clocksource.h>
++
++#include "common.h"
++
++void __init plat_time_init(void)
++{
++ ralink_of_remap();
++
++ of_clk_init(NULL);
++ clocksource_of_init();
++}
diff --git a/target/linux/ramips/patches-4.3/0004-MIPS-ralink-add-MT7621-pcie-driver.patch b/target/linux/ramips/patches-4.3/0004-MIPS-ralink-add-MT7621-pcie-driver.patch
index b605c5efda..d4c1506cf7 100644
--- a/target/linux/ramips/patches-4.3/0004-MIPS-ralink-add-MT7621-pcie-driver.patch
+++ b/target/linux/ramips/patches-4.3/0004-MIPS-ralink-add-MT7621-pcie-driver.patch
@@ -12,7 +12,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
-@@ -43,6 +43,7 @@
+@@ -43,6 +43,7 @@ obj-$(CONFIG_SIBYTE_BCM1x80) += pci-bcm1
obj-$(CONFIG_SNI_RM) += fixup-sni.o ops-sni.o
obj-$(CONFIG_LANTIQ) += fixup-lantiq.o
obj-$(CONFIG_PCI_LANTIQ) += pci-lantiq.o ops-lantiq.o
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o
--- /dev/null
+++ b/arch/mips/pci/pci-mt7621.c
-@@ -0,0 +1,813 @@
+@@ -0,0 +1,832 @@
+/**************************************************************************
+ *
+ * BRIEF MODULE DESCRIPTION
@@ -71,6 +71,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#include <linux/version.h>
+#include <asm/pci.h>
+#include <asm/io.h>
++#include <asm/mips-cm.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/delay.h>
@@ -578,6 +579,23 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#endif
+}
+
++void setup_cm_memory_region(struct resource *mem_resource)
++{
++ resource_size_t mask;
++ if (mips_cm_numiocu()) {
++ /* FIXME: hardware doesn't accept mask values with 1s after
++ 0s (e.g. 0xffef), so it would be great to warn if that's
++ about to happen */
++ mask = ~(mem_resource->end - mem_resource->start);
++
++ write_gcr_reg1_base(mem_resource->start);
++ write_gcr_reg1_mask(mask | CM_GCR_REGn_MASK_CMTGT_IOCU0);
++ printk("PCI coherence region base: 0x%08lx, mask/settings: 0x%08lx\n",
++ read_gcr_reg1_base(),
++ read_gcr_reg1_mask());
++ }
++}
++
+static int mt7621_pci_probe(struct platform_device *pdev)
+{
+ unsigned long val = 0;
@@ -805,6 +823,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ }
+
+ pci_load_of_ranges(&mt7621_controller, pdev->dev.of_node);
++ setup_cm_memory_region(mt7621_controller.mem_resource);
+ register_pci_controller(&mt7621_controller);
+ return 0;
+
diff --git a/target/linux/ramips/patches-4.3/0005-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch b/target/linux/ramips/patches-4.3/0005-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch
index fe918e6fd3..248357a8a9 100644
--- a/target/linux/ramips/patches-4.3/0005-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch
+++ b/target/linux/ramips/patches-4.3/0005-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch
@@ -9,8 +9,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/Kconfig | 5 +++++
1 file changed, 5 insertions(+)
-diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
-index d078e61..c2778f2 100644
--- a/arch/mips/ralink/Kconfig
+++ b/arch/mips/ralink/Kconfig
@@ -1,11 +1,16 @@
@@ -59,7 +57,7 @@ index d078e61..c2778f2 100644
static int mips_next_event(unsigned long delta,
struct clock_event_device *evt)
{
-@@ -208,18 +228,21 @@
+@@ -208,18 +228,21 @@ int r4k_clockevent_init(void)
cd->rating = 300;
cd->irq = irq;
cd->cpumask = cpumask_of(cpu);
@@ -82,7 +80,3 @@ index d078e61..c2778f2 100644
return 0;
}
---
-1.7.10.4
-
-
diff --git a/target/linux/ramips/patches-4.3/0006-MIPS-ralink-add-cpu-frequency-scaling.patch b/target/linux/ramips/patches-4.3/0006-MIPS-ralink-add-cpu-frequency-scaling.patch
index afdc65a3c8..f953aee9ff 100644
--- a/target/linux/ramips/patches-4.3/0006-MIPS-ralink-add-cpu-frequency-scaling.patch
+++ b/target/linux/ramips/patches-4.3/0006-MIPS-ralink-add-cpu-frequency-scaling.patch
@@ -11,8 +11,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/cevt-rt3352.c | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
-diff --git a/arch/mips/ralink/cevt-rt3352.c b/arch/mips/ralink/cevt-rt3352.c
-index a8e70a9..b36888c 100644
--- a/arch/mips/ralink/cevt-rt3352.c
+++ b/arch/mips/ralink/cevt-rt3352.c
@@ -29,6 +29,10 @@
@@ -53,7 +51,7 @@ index a8e70a9..b36888c 100644
static int systick_next_event(unsigned long delta,
struct clock_event_device *evt)
{
-@@ -99,6 +120,9 @@ static int systick_shutdown(struct clock_event_device *evt)
+@@ -99,6 +120,9 @@ static int systick_shutdown(struct clock
sdev->irq_requested = 0;
iowrite32(0, systick.membase + SYSTICK_CONFIG);
@@ -63,7 +61,7 @@ index a8e70a9..b36888c 100644
return 0;
}
-@@ -114,15 +138,29 @@ static int systick_set_oneshot(struct clock_event_device *evt)
+@@ -114,15 +138,29 @@ static int systick_set_oneshot(struct cl
iowrite32(CFG_EXT_STK_EN | CFG_CNT_EN,
systick.membase + SYSTICK_CONFIG);
@@ -93,6 +91,3 @@ index a8e70a9..b36888c 100644
systick_irqaction.name = np->name;
systick.dev.name = np->name;
clockevents_calc_mult_shift(&systick.dev, SYSTICK_FREQ, 60);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0007-MIPS-ralink-copy-the-commandline-from-the-devicetree.patch b/target/linux/ramips/patches-4.3/0007-MIPS-ralink-copy-the-commandline-from-the-devicetree.patch
index 6b09c0e894..3a05a30a86 100644
--- a/target/linux/ramips/patches-4.3/0007-MIPS-ralink-copy-the-commandline-from-the-devicetree.patch
+++ b/target/linux/ramips/patches-4.3/0007-MIPS-ralink-copy-the-commandline-from-the-devicetree.patch
@@ -8,8 +8,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/of.c | 2 ++
1 file changed, 2 insertions(+)
-diff --git a/arch/mips/ralink/of.c b/arch/mips/ralink/of.c
-index 0d30dcd..da85bbf 100644
--- a/arch/mips/ralink/of.c
+++ b/arch/mips/ralink/of.c
@@ -76,6 +76,8 @@ void __init plat_mem_setup(void)
@@ -21,6 +19,3 @@ index 0d30dcd..da85bbf 100644
of_scan_flat_dt(early_init_dt_find_memory, NULL);
if (memory_dtb)
of_scan_flat_dt(early_init_dt_scan_memory, NULL);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0008-MIPS-ralink-mt7620-fix-usb-issue-during-frequency-sc.patch b/target/linux/ramips/patches-4.3/0008-MIPS-ralink-mt7620-fix-usb-issue-during-frequency-sc.patch
index 6fa90f245e..7788926dd8 100644
--- a/target/linux/ramips/patches-4.3/0008-MIPS-ralink-mt7620-fix-usb-issue-during-frequency-sc.patch
+++ b/target/linux/ramips/patches-4.3/0008-MIPS-ralink-mt7620-fix-usb-issue-during-frequency-sc.patch
@@ -15,8 +15,6 @@ Subject: [PATCH 08/53] MIPS: ralink: mt7620: fix usb issue during frequency
arch/mips/ralink/mt7620.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
-diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c
-index 2ea5ff6..33a7e42 100644
--- a/arch/mips/ralink/mt7620.c
+++ b/arch/mips/ralink/mt7620.c
@@ -40,6 +40,12 @@
@@ -52,6 +50,3 @@ index 2ea5ff6..33a7e42 100644
}
void __init ralink_of_remap(void)
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0009-PCI-MIPS-adds-mt7620a-pcie-driver.patch b/target/linux/ramips/patches-4.3/0009-PCI-MIPS-adds-mt7620a-pcie-driver.patch
index 2f03f1d496..2164d357f0 100644
--- a/target/linux/ramips/patches-4.3/0009-PCI-MIPS-adds-mt7620a-pcie-driver.patch
+++ b/target/linux/ramips/patches-4.3/0009-PCI-MIPS-adds-mt7620a-pcie-driver.patch
@@ -12,8 +12,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
4 files changed, 399 insertions(+)
create mode 100644 arch/mips/pci/pci-mt7620.c
-diff --git a/arch/mips/include/asm/mach-ralink/mt7620.h b/arch/mips/include/asm/mach-ralink/mt7620.h
-index 1976fb8..72e64fa 100644
--- a/arch/mips/include/asm/mach-ralink/mt7620.h
+++ b/arch/mips/include/asm/mach-ralink/mt7620.h
@@ -19,6 +19,7 @@ enum mt762x_soc_type {
@@ -24,11 +22,9 @@ index 1976fb8..72e64fa 100644
#define MT7620_SYSC_BASE 0x10000000
-diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile
-index 04e61c3..ccbdc90 100644
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
-@@ -43,6 +43,7 @@ obj-$(CONFIG_SIBYTE_BCM1x80) += pci-bcm1480.o pci-bcm1480ht.o
+@@ -43,6 +43,7 @@ obj-$(CONFIG_SIBYTE_BCM1x80) += pci-bcm1
obj-$(CONFIG_SNI_RM) += fixup-sni.o ops-sni.o
obj-$(CONFIG_LANTIQ) += fixup-lantiq.o
obj-$(CONFIG_PCI_LANTIQ) += pci-lantiq.o ops-lantiq.o
@@ -36,9 +32,6 @@ index 04e61c3..ccbdc90 100644
obj-$(CONFIG_SOC_MT7621) += pci-mt7621.o
obj-$(CONFIG_SOC_RT288X) += pci-rt2880.o
obj-$(CONFIG_SOC_RT3883) += pci-rt3883.o
-diff --git a/arch/mips/pci/pci-mt7620.c b/arch/mips/pci/pci-mt7620.c
-new file mode 100644
-index 0000000..780e4e9
--- /dev/null
+++ b/arch/mips/pci/pci-mt7620.c
@@ -0,0 +1,396 @@
@@ -438,8 +431,6 @@ index 0000000..780e4e9
+}
+
+arch_initcall(mt7620_pci_init);
-diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
-index c2778f2..2aa5e42 100644
--- a/arch/mips/ralink/Kconfig
+++ b/arch/mips/ralink/Kconfig
@@ -43,6 +43,7 @@ choice
@@ -450,6 +441,3 @@ index c2778f2..2aa5e42 100644
config SOC_MT7621
bool "MT7621"
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0010-arch-mips-ralink-add-spi1-clocks.patch b/target/linux/ramips/patches-4.3/0010-arch-mips-ralink-add-spi1-clocks.patch
index e2a7d821ef..11dad7a8c0 100644
--- a/target/linux/ramips/patches-4.3/0010-arch-mips-ralink-add-spi1-clocks.patch
+++ b/target/linux/ramips/patches-4.3/0010-arch-mips-ralink-add-spi1-clocks.patch
@@ -12,8 +12,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/rt3883.c | 1 +
3 files changed, 3 insertions(+)
-diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c
-index 33a7e42..0ba49a1 100644
--- a/arch/mips/ralink/mt7620.c
+++ b/arch/mips/ralink/mt7620.c
@@ -427,6 +427,7 @@ void __init ralink_clk_init(void)
@@ -24,8 +22,6 @@ index 33a7e42..0ba49a1 100644
ralink_clk_add("10000c00.uartlite", periph_rate);
ralink_clk_add("10180000.wmac", xtal_rate);
-diff --git a/arch/mips/ralink/rt305x.c b/arch/mips/ralink/rt305x.c
-index c40776a..eeb747a 100644
--- a/arch/mips/ralink/rt305x.c
+++ b/arch/mips/ralink/rt305x.c
@@ -202,6 +202,7 @@ void __init ralink_clk_init(void)
@@ -36,8 +32,6 @@ index c40776a..eeb747a 100644
ralink_clk_add("10000100.timer", wdt_rate);
ralink_clk_add("10000120.watchdog", wdt_rate);
ralink_clk_add("10000500.uart", uart_rate);
-diff --git a/arch/mips/ralink/rt3883.c b/arch/mips/ralink/rt3883.c
-index 86a535c..26827bc 100644
--- a/arch/mips/ralink/rt3883.c
+++ b/arch/mips/ralink/rt3883.c
@@ -109,6 +109,7 @@ void __init ralink_clk_init(void)
@@ -48,6 +42,3 @@ index 86a535c..26827bc 100644
ralink_clk_add("10000c00.uartlite", 40000000);
ralink_clk_add("10100000.ethernet", sys_rate);
ralink_clk_add("10180000.wmac", 40000000);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0011-arch-mips-ralink-unify-soc-detection.patch b/target/linux/ramips/patches-4.3/0011-arch-mips-ralink-unify-soc-detection.patch
index bee7ce3b28..81cf233a1e 100644
--- a/target/linux/ramips/patches-4.3/0011-arch-mips-ralink-unify-soc-detection.patch
+++ b/target/linux/ramips/patches-4.3/0011-arch-mips-ralink-unify-soc-detection.patch
@@ -12,8 +12,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/rt305x.c | 12 +++++-------
5 files changed, 29 insertions(+), 31 deletions(-)
-diff --git a/arch/mips/include/asm/mach-ralink/mt7620.h b/arch/mips/include/asm/mach-ralink/mt7620.h
-index 72e64fa..0ef882b 100644
--- a/arch/mips/include/asm/mach-ralink/mt7620.h
+++ b/arch/mips/include/asm/mach-ralink/mt7620.h
@@ -13,14 +13,6 @@
@@ -31,8 +29,6 @@ index 72e64fa..0ef882b 100644
#define MT7620_SYSC_BASE 0x10000000
#define SYSC_REG_CHIP_NAME0 0x00
-diff --git a/arch/mips/include/asm/mach-ralink/ralink_regs.h b/arch/mips/include/asm/mach-ralink/ralink_regs.h
-index bd93014..8fcbd0f 100644
--- a/arch/mips/include/asm/mach-ralink/ralink_regs.h
+++ b/arch/mips/include/asm/mach-ralink/ralink_regs.h
@@ -13,6 +13,20 @@
@@ -56,8 +52,6 @@ index bd93014..8fcbd0f 100644
extern __iomem void *rt_sysc_membase;
extern __iomem void *rt_memc_membase;
-diff --git a/arch/mips/include/asm/mach-ralink/rt305x.h b/arch/mips/include/asm/mach-ralink/rt305x.h
-index 96f731b..2eea793 100644
--- a/arch/mips/include/asm/mach-ralink/rt305x.h
+++ b/arch/mips/include/asm/mach-ralink/rt305x.h
@@ -13,25 +13,16 @@
@@ -110,8 +104,6 @@ index 96f731b..2eea793 100644
}
#define RT305X_SYSC_BASE 0x10000000
-diff --git a/arch/mips/ralink/prom.c b/arch/mips/ralink/prom.c
-index 09419f6..d0978d5 100644
--- a/arch/mips/ralink/prom.c
+++ b/arch/mips/ralink/prom.c
@@ -15,10 +15,13 @@
@@ -129,8 +121,6 @@ index 09419f6..d0978d5 100644
const char *get_system_type(void)
{
-diff --git a/arch/mips/ralink/rt305x.c b/arch/mips/ralink/rt305x.c
-index eeb747a..51f33a5 100644
--- a/arch/mips/ralink/rt305x.c
+++ b/arch/mips/ralink/rt305x.c
@@ -21,8 +21,6 @@
@@ -142,7 +132,7 @@ index eeb747a..51f33a5 100644
static struct rt2880_pmx_func i2c_func[] = { FUNC("i2c", 0, 1, 2) };
static struct rt2880_pmx_func spi_func[] = { FUNC("spi", 0, 3, 4) };
static struct rt2880_pmx_func uartf_func[] = {
-@@ -236,24 +234,24 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
+@@ -236,24 +234,24 @@ void prom_soc_init(struct ralink_soc_inf
icache_sets = (read_c0_config1() >> 22) & 7;
if (icache_sets == 1) {
@@ -172,6 +162,3 @@ index eeb747a..51f33a5 100644
name = "RT5350";
soc_info->compatible = "ralink,rt5350-soc";
} else {
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0012-arch-mips-fix-clock-jitter.patch b/target/linux/ramips/patches-4.3/0012-arch-mips-fix-clock-jitter.patch
index 58983f0c2f..133e4eaea0 100644
--- a/target/linux/ramips/patches-4.3/0012-arch-mips-fix-clock-jitter.patch
+++ b/target/linux/ramips/patches-4.3/0012-arch-mips-fix-clock-jitter.patch
@@ -8,11 +8,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/cevt-rt3352.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/arch/mips/ralink/cevt-rt3352.c b/arch/mips/ralink/cevt-rt3352.c
-index b36888c..cecf44f 100644
--- a/arch/mips/ralink/cevt-rt3352.c
+++ b/arch/mips/ralink/cevt-rt3352.c
-@@ -69,7 +69,7 @@ static int systick_next_event(unsigned long delta,
+@@ -69,7 +69,7 @@ static int systick_next_event(unsigned l
sdev = container_of(evt, struct systick_device, dev);
count = ioread32(sdev->membase + SYSTICK_COUNT);
count = (count + delta) % SYSTICK_FREQ;
@@ -21,6 +19,3 @@ index b36888c..cecf44f 100644
return 0;
}
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0013-owrt-hack-fix-mt7688-cache-issue.patch b/target/linux/ramips/patches-4.3/0013-owrt-hack-fix-mt7688-cache-issue.patch
index cb51fe69e6..12abdee344 100644
--- a/target/linux/ramips/patches-4.3/0013-owrt-hack-fix-mt7688-cache-issue.patch
+++ b/target/linux/ramips/patches-4.3/0013-owrt-hack-fix-mt7688-cache-issue.patch
@@ -8,11 +8,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/kernel/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
-index 4795151..75bde36 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
-@@ -681,7 +681,6 @@ static void __init arch_mem_init(char **cmdline_p)
+@@ -681,7 +681,6 @@ static void __init arch_mem_init(char **
crashk_res.end - crashk_res.start + 1,
BOOTMEM_DEFAULT);
#endif
@@ -28,6 +26,3 @@ index 4795151..75bde36 100644
}
unsigned long kernelsp[NR_CPUS];
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0014-arch-mips-cleanup-cevt-rt3352.patch b/target/linux/ramips/patches-4.3/0014-arch-mips-cleanup-cevt-rt3352.patch
index d6410505c7..50b3dc8318 100644
--- a/target/linux/ramips/patches-4.3/0014-arch-mips-cleanup-cevt-rt3352.patch
+++ b/target/linux/ramips/patches-4.3/0014-arch-mips-cleanup-cevt-rt3352.patch
@@ -8,11 +8,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/cevt-rt3352.c | 85 ++++++++++++++++++++++++++--------------
1 file changed, 56 insertions(+), 29 deletions(-)
-diff --git a/arch/mips/ralink/cevt-rt3352.c b/arch/mips/ralink/cevt-rt3352.c
-index cecf44f..424635c 100644
--- a/arch/mips/ralink/cevt-rt3352.c
+++ b/arch/mips/ralink/cevt-rt3352.c
-@@ -52,7 +52,7 @@ static inline void mt7620_freq_scaling(struct systick_device *sdev, int status)
+@@ -52,7 +52,7 @@ static inline void mt7620_freq_scaling(s
sdev->freq_scale = status;
@@ -21,7 +19,7 @@ index cecf44f..424635c 100644
(status) ? ("enable") : ("disable"));
if (status)
rt_sysc_w32(rt_sysc_r32(CLK_LUT_CFG) | SLEEP_EN, CLK_LUT_CFG);
-@@ -60,18 +60,33 @@ static inline void mt7620_freq_scaling(struct systick_device *sdev, int status)
+@@ -60,18 +60,33 @@ static inline void mt7620_freq_scaling(s
rt_sysc_w32(rt_sysc_r32(CLK_LUT_CFG) & ~SLEEP_EN, CLK_LUT_CFG);
}
@@ -60,7 +58,7 @@ index cecf44f..424635c 100644
}
static void systick_event_handler(struct clock_event_device *dev)
-@@ -81,20 +96,25 @@ static void systick_event_handler(struct clock_event_device *dev)
+@@ -81,20 +96,25 @@ static void systick_event_handler(struct
static irqreturn_t systick_interrupt(int irq, void *dev_id)
{
@@ -68,12 +66,12 @@ index cecf44f..424635c 100644
+ int ret = 0;
+ struct clock_event_device *cdev;
+ struct systick_device *sdev;
-+
+
+- dev->event_handler(dev);
+ if (read_c0_cause() & STATUSF_IP7) {
+ cdev = (struct clock_event_device *) dev_id;
+ sdev = container_of(cdev, struct systick_device, dev);
-
-- dev->event_handler(dev);
++
+ /* Clear Count/Compare Interrupt */
+ write_compare(sdev, read_compare(sdev));
+ cdev->event_handler(cdev);
@@ -94,7 +92,7 @@ index cecf44f..424635c 100644
.features = CLOCK_EVT_FEAT_ONESHOT,
.set_next_event = systick_next_event,
.set_state_shutdown = systick_shutdown,
-@@ -116,9 +136,9 @@ static int systick_shutdown(struct clock_event_device *evt)
+@@ -116,9 +136,9 @@ static int systick_shutdown(struct clock
sdev = container_of(evt, struct systick_device, dev);
if (sdev->irq_requested)
@@ -106,7 +104,7 @@ index cecf44f..424635c 100644
if (systick_freq_scaling)
systick_freq_scaling(sdev, 0);
-@@ -145,38 +165,45 @@ static int systick_set_oneshot(struct clock_event_device *evt)
+@@ -145,38 +165,45 @@ static int systick_set_oneshot(struct cl
}
static const struct of_device_id systick_match[] = {
@@ -165,6 +163,3 @@ index cecf44f..424635c 100644
pr_info("%s: running - mult: %d, shift: %d\n",
np->name, systick.dev.mult, systick.dev.shift);
}
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0015-arch-mips-do-not-select-illegal-access-driver-by-def.patch b/target/linux/ramips/patches-4.3/0015-arch-mips-do-not-select-illegal-access-driver-by-def.patch
index ea04175482..6f5a6f4b94 100644
--- a/target/linux/ramips/patches-4.3/0015-arch-mips-do-not-select-illegal-access-driver-by-def.patch
+++ b/target/linux/ramips/patches-4.3/0015-arch-mips-do-not-select-illegal-access-driver-by-def.patch
@@ -9,8 +9,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
-index 2aa5e42..84cf692 100644
--- a/arch/mips/ralink/Kconfig
+++ b/arch/mips/ralink/Kconfig
@@ -13,9 +13,9 @@ config CLKEVT_RT3352
@@ -25,6 +23,3 @@ index 2aa5e42..84cf692 100644
config IRQ_INTC
bool
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0016-arch-mips-ralink-remove-non-PCI-check.patch b/target/linux/ramips/patches-4.3/0016-arch-mips-ralink-remove-non-PCI-check.patch
index 57cc092ef9..d25f909f89 100644
--- a/target/linux/ramips/patches-4.3/0016-arch-mips-ralink-remove-non-PCI-check.patch
+++ b/target/linux/ramips/patches-4.3/0016-arch-mips-ralink-remove-non-PCI-check.patch
@@ -8,11 +8,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/mt7620.c | 3 ---
1 file changed, 3 deletions(-)
-diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c
-index 0ba49a1..794a7c7 100644
--- a/arch/mips/ralink/mt7620.c
+++ b/arch/mips/ralink/mt7620.c
-@@ -526,9 +526,6 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
+@@ -526,9 +526,6 @@ void prom_soc_init(struct ralink_soc_inf
mt762x_soc = MT762X_SOC_MT7620N;
name = "MT7620N";
soc_info->compatible = "ralink,mt7620n-soc";
@@ -22,6 +20,3 @@ index 0ba49a1..794a7c7 100644
}
} else if (n0 == MT7620_CHIP_NAME0 && n1 == MT7628_CHIP_NAME1) {
mt762x_soc = MT762X_SOC_MT7628AN;
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0017-arch-mips-ralink-do-not-set-pm_poweroff.patch b/target/linux/ramips/patches-4.3/0017-arch-mips-ralink-do-not-set-pm_poweroff.patch
index 636edad8c8..a9122e1b6f 100644
--- a/target/linux/ramips/patches-4.3/0017-arch-mips-ralink-do-not-set-pm_poweroff.patch
+++ b/target/linux/ramips/patches-4.3/0017-arch-mips-ralink-do-not-set-pm_poweroff.patch
@@ -8,11 +8,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/reset.c | 1 -
1 file changed, 1 deletion(-)
-diff --git a/arch/mips/ralink/reset.c b/arch/mips/ralink/reset.c
-index 55c7ec5..ee26d45 100644
--- a/arch/mips/ralink/reset.c
+++ b/arch/mips/ralink/reset.c
-@@ -98,7 +98,6 @@ static int __init mips_reboot_setup(void)
+@@ -98,7 +98,6 @@ static int __init mips_reboot_setup(void
{
_machine_restart = ralink_restart;
_machine_halt = ralink_halt;
@@ -20,6 +18,3 @@ index 55c7ec5..ee26d45 100644
return 0;
}
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0018-arch-mips-ralink-reset-pci-prior-to-reboot.patch b/target/linux/ramips/patches-4.3/0018-arch-mips-ralink-reset-pci-prior-to-reboot.patch
index dbd3db0106..8f572c9c1a 100644
--- a/target/linux/ramips/patches-4.3/0018-arch-mips-ralink-reset-pci-prior-to-reboot.patch
+++ b/target/linux/ramips/patches-4.3/0018-arch-mips-ralink-reset-pci-prior-to-reboot.patch
@@ -8,8 +8,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/reset.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
-diff --git a/arch/mips/ralink/reset.c b/arch/mips/ralink/reset.c
-index ee26d45..ee117c4 100644
--- a/arch/mips/ralink/reset.c
+++ b/arch/mips/ralink/reset.c
@@ -11,6 +11,7 @@
@@ -45,6 +43,3 @@ index ee26d45..ee117c4 100644
local_irq_disable();
rt_sysc_w32(RSTCTL_RESET_SYSTEM, SYSC_REG_RESET_CTRL);
unreachable();
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0019-arch-mips-ralink-add-mt7621-cpu-feature-overrides.patch b/target/linux/ramips/patches-4.3/0019-arch-mips-ralink-add-mt7621-cpu-feature-overrides.patch
index 9e7e3e30d9..d2da23a4ca 100644
--- a/target/linux/ramips/patches-4.3/0019-arch-mips-ralink-add-mt7621-cpu-feature-overrides.patch
+++ b/target/linux/ramips/patches-4.3/0019-arch-mips-ralink-add-mt7621-cpu-feature-overrides.patch
@@ -9,9 +9,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
1 file changed, 65 insertions(+)
create mode 100644 arch/mips/include/asm/mach-ralink/mt7621/cpu-feature-overrides.h
-diff --git a/arch/mips/include/asm/mach-ralink/mt7621/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ralink/mt7621/cpu-feature-overrides.h
-new file mode 100644
-index 0000000..15db1b3
--- /dev/null
+++ b/arch/mips/include/asm/mach-ralink/mt7621/cpu-feature-overrides.h
@@ -0,0 +1,65 @@
@@ -80,6 +77,3 @@ index 0000000..15db1b3
+#define cpu_has_userlocal 1
+
+#endif /* _MT7621_CPU_FEATURE_OVERRIDES_H */
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0020-arch-mips-ralink-mt7628-fixes.patch b/target/linux/ramips/patches-4.3/0020-arch-mips-ralink-mt7628-fixes.patch
index 0b5cb04cfb..713dcfabad 100644
--- a/target/linux/ramips/patches-4.3/0020-arch-mips-ralink-mt7628-fixes.patch
+++ b/target/linux/ramips/patches-4.3/0020-arch-mips-ralink-mt7628-fixes.patch
@@ -8,11 +8,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/mt7620.c | 76 +++++++++++++++++++++++++++++----------------
1 file changed, 50 insertions(+), 26 deletions(-)
-diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c
-index 794a7c7..41b4a3e 100644
--- a/arch/mips/ralink/mt7620.c
+++ b/arch/mips/ralink/mt7620.c
-@@ -104,28 +104,28 @@ static struct rt2880_pmx_group mt7620a_pinmux_data[] = {
+@@ -104,28 +104,28 @@ static struct rt2880_pmx_group mt7620a_p
};
static struct rt2880_pmx_func pwm1_grp_mt7628[] = {
@@ -47,7 +45,7 @@ index 794a7c7..41b4a3e 100644
FUNC("pwm", 2, 45, 2),
FUNC("gpio", 1, 45, 2),
FUNC("uart", 0, 45, 2),
-@@ -168,7 +168,7 @@ static struct rt2880_pmx_func spi_cs1_grp_mt7628[] = {
+@@ -168,7 +168,7 @@ static struct rt2880_pmx_func spi_cs1_gr
FUNC("-", 3, 6, 1),
FUNC("refclk", 2, 6, 1),
FUNC("gpio", 1, 6, 1),
@@ -56,7 +54,7 @@ index 794a7c7..41b4a3e 100644
};
static struct rt2880_pmx_func spis_grp_mt7628[] = {
-@@ -185,28 +185,44 @@ static struct rt2880_pmx_func gpio_grp_mt7628[] = {
+@@ -185,28 +185,44 @@ static struct rt2880_pmx_func gpio_grp_m
FUNC("gpio", 0, 11, 1),
};
@@ -119,7 +117,7 @@ index 794a7c7..41b4a3e 100644
1, MT7628_GPIO_MODE_PWM0),
GRP_G("uart2", uart2_grp_mt7628, MT7628_GPIO_MODE_MASK,
1, MT7628_GPIO_MODE_UART2),
-@@ -230,6 +246,10 @@ static struct rt2880_pmx_group mt7628an_pinmux_data[] = {
+@@ -230,6 +246,10 @@ static struct rt2880_pmx_group mt7628an_
1, MT7628_GPIO_MODE_SPIS),
GRP_G("gpio", gpio_grp_mt7628, MT7628_GPIO_MODE_MASK,
1, MT7628_GPIO_MODE_GPIO),
@@ -130,7 +128,7 @@ index 794a7c7..41b4a3e 100644
{ 0 }
};
-@@ -542,7 +562,11 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
+@@ -542,7 +562,11 @@ void prom_soc_init(struct ralink_soc_inf
(rev & CHIP_REV_ECO_MASK));
cfg0 = __raw_readl(sysc + SYSC_REG_SYSTEM_CONFIG0);
@@ -143,6 +141,3 @@ index 794a7c7..41b4a3e 100644
soc_info->mem_base = MT7620_DRAM_BASE;
if (mt762x_soc == MT762X_SOC_MT7628AN)
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0021-arch-mips-ralink-add-mt7688-detection.patch b/target/linux/ramips/patches-4.3/0021-arch-mips-ralink-add-mt7688-detection.patch
index 5aae36088f..f54acb8d36 100644
--- a/target/linux/ramips/patches-4.3/0021-arch-mips-ralink-add-mt7688-detection.patch
+++ b/target/linux/ramips/patches-4.3/0021-arch-mips-ralink-add-mt7688-detection.patch
@@ -10,8 +10,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/mt7620.c | 21 ++++++++++++++++-----
3 files changed, 18 insertions(+), 5 deletions(-)
-diff --git a/arch/mips/include/asm/mach-ralink/mt7620.h b/arch/mips/include/asm/mach-ralink/mt7620.h
-index 0ef882b..455d406 100644
--- a/arch/mips/include/asm/mach-ralink/mt7620.h
+++ b/arch/mips/include/asm/mach-ralink/mt7620.h
@@ -17,6 +17,7 @@
@@ -22,8 +20,6 @@ index 0ef882b..455d406 100644
#define SYSC_REG_CHIP_REV 0x0c
#define SYSC_REG_SYSTEM_CONFIG0 0x10
#define SYSC_REG_SYSTEM_CONFIG1 0x14
-diff --git a/arch/mips/include/asm/mach-ralink/ralink_regs.h b/arch/mips/include/asm/mach-ralink/ralink_regs.h
-index 8fcbd0f..69fbcec 100644
--- a/arch/mips/include/asm/mach-ralink/ralink_regs.h
+++ b/arch/mips/include/asm/mach-ralink/ralink_regs.h
@@ -24,6 +24,7 @@ enum ralink_soc_type {
@@ -34,8 +30,6 @@ index 8fcbd0f..69fbcec 100644
};
extern enum ralink_soc_type ralink_soc;
-diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c
-index 41b4a3e..6975ed8 100644
--- a/arch/mips/ralink/mt7620.c
+++ b/arch/mips/ralink/mt7620.c
@@ -46,6 +46,9 @@ enum mt762x_soc_type mt762x_soc;
@@ -67,7 +61,7 @@ index 41b4a3e..6975ed8 100644
/*
* When the CPU goes into sleep mode, the BUS clock will be too low for
* USB to function properly
-@@ -548,8 +552,15 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
+@@ -548,8 +552,15 @@ void prom_soc_init(struct ralink_soc_inf
soc_info->compatible = "ralink,mt7620n-soc";
}
} else if (n0 == MT7620_CHIP_NAME0 && n1 == MT7628_CHIP_NAME1) {
@@ -85,7 +79,7 @@ index 41b4a3e..6975ed8 100644
soc_info->compatible = "ralink,mt7628an-soc";
} else {
panic("mt762x: unknown SoC, n0:%08x n1:%08x\n", n0, n1);
-@@ -582,7 +593,7 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
+@@ -582,7 +593,7 @@ void prom_soc_init(struct ralink_soc_inf
pr_info("Digital PMU set to %s control\n",
(pmu1 & DIG_SW_SEL) ? ("sw") : ("hw"));
@@ -94,6 +88,3 @@ index 41b4a3e..6975ed8 100644
rt2880_pinmux_data = mt7628an_pinmux_data;
else
rt2880_pinmux_data = mt7620a_pinmux_data;
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0022-arch-mips-ralink-proper-vendor-id-srtring.patch b/target/linux/ramips/patches-4.3/0022-arch-mips-ralink-proper-vendor-id-srtring.patch
index 97f8de3e42..967b83e391 100644
--- a/target/linux/ramips/patches-4.3/0022-arch-mips-ralink-proper-vendor-id-srtring.patch
+++ b/target/linux/ramips/patches-4.3/0022-arch-mips-ralink-proper-vendor-id-srtring.patch
@@ -8,11 +8,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/mt7620.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c
-index 6975ed8..da734e2 100644
--- a/arch/mips/ralink/mt7620.c
+++ b/arch/mips/ralink/mt7620.c
-@@ -567,7 +567,7 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
+@@ -567,7 +567,7 @@ void prom_soc_init(struct ralink_soc_inf
}
snprintf(soc_info->sys_type, RAMIPS_SYS_TYPE_LEN,
@@ -21,6 +19,3 @@ index 6975ed8..da734e2 100644
name,
(rev >> CHIP_REV_VER_SHIFT) & CHIP_REV_VER_MASK,
(rev & CHIP_REV_ECO_MASK));
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0023-arch-mips-ralink-unify-soc-id.patch b/target/linux/ramips/patches-4.3/0023-arch-mips-ralink-unify-soc-id.patch
index 3e5d04a259..5d7f045445 100644
--- a/target/linux/ramips/patches-4.3/0023-arch-mips-ralink-unify-soc-id.patch
+++ b/target/linux/ramips/patches-4.3/0023-arch-mips-ralink-unify-soc-id.patch
@@ -8,8 +8,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ralink/mt7620.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
-diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c
-index da734e2..db99e9c 100644
--- a/arch/mips/ralink/mt7620.c
+++ b/arch/mips/ralink/mt7620.c
@@ -37,9 +37,6 @@
@@ -40,7 +38,7 @@ index da734e2..db99e9c 100644
/*
* When the CPU goes into sleep mode, the BUS clock will be too low for
* USB to function properly
-@@ -543,11 +540,11 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
+@@ -543,11 +540,11 @@ void prom_soc_init(struct ralink_soc_inf
if (n0 == MT7620_CHIP_NAME0 && n1 == MT7620_CHIP_NAME1) {
if (bga) {
@@ -54,7 +52,7 @@ index da734e2..db99e9c 100644
name = "MT7620N";
soc_info->compatible = "ralink,mt7620n-soc";
}
-@@ -555,10 +552,10 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
+@@ -555,10 +552,10 @@ void prom_soc_init(struct ralink_soc_inf
u32 efuse = __raw_readl(sysc + SYSC_REG_EFUSE_CFG);
if (efuse & EFUSE_MT7688) {
@@ -67,7 +65,7 @@ index da734e2..db99e9c 100644
name = "MT7628AN";
}
soc_info->compatible = "ralink,mt7628an-soc";
-@@ -580,7 +577,7 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
+@@ -580,7 +577,7 @@ void prom_soc_init(struct ralink_soc_inf
dram_type = (cfg0 >> SYSCFG0_DRAM_TYPE_SHIFT) & SYSCFG0_DRAM_TYPE_MASK;
soc_info->mem_base = MT7620_DRAM_BASE;
@@ -76,7 +74,7 @@ index da734e2..db99e9c 100644
mt7628_dram_init(soc_info);
else
mt7620_dram_init(soc_info);
-@@ -593,7 +590,7 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
+@@ -593,7 +590,7 @@ void prom_soc_init(struct ralink_soc_inf
pr_info("Digital PMU set to %s control\n",
(pmu1 & DIG_SW_SEL) ? ("sw") : ("hw"));
@@ -85,6 +83,3 @@ index da734e2..db99e9c 100644
rt2880_pinmux_data = mt7628an_pinmux_data;
else
rt2880_pinmux_data = mt7620a_pinmux_data;
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0024-GPIO-add-named-gpio-exports.patch b/target/linux/ramips/patches-4.3/0024-GPIO-add-named-gpio-exports.patch
index e15aabd669..71daf28274 100644
--- a/target/linux/ramips/patches-4.3/0024-GPIO-add-named-gpio-exports.patch
+++ b/target/linux/ramips/patches-4.3/0024-GPIO-add-named-gpio-exports.patch
@@ -11,8 +11,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
include/linux/gpio/consumer.h | 8 +++++
4 files changed, 91 insertions(+), 1 deletion(-)
-diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
-index fa6e3c8..c3f34c0 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -23,6 +23,8 @@
@@ -24,7 +22,7 @@ index fa6e3c8..c3f34c0 100644
#include "gpiolib.h"
-@@ -450,3 +452,69 @@ void of_gpiochip_remove(struct gpio_chip *chip)
+@@ -450,3 +452,69 @@ void of_gpiochip_remove(struct gpio_chip
gpiochip_remove_pin_ranges(chip);
of_node_put(chip->of_node);
}
@@ -94,8 +92,6 @@ index fa6e3c8..c3f34c0 100644
+ return platform_driver_probe(&gpio_export_driver, of_gpio_export_probe);
+}
+device_initcall(of_gpio_export_init);
-diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
-index b57ed8e..0df781d 100644
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio/gpiolib-sysfs.c
@@ -544,7 +544,7 @@ static struct class gpio_class = {
@@ -107,7 +103,7 @@ index b57ed8e..0df781d 100644
{
struct gpio_chip *chip;
struct gpiod_data *data;
-@@ -604,6 +604,8 @@ int gpiod_export(struct gpio_desc *desc, bool direction_may_change)
+@@ -604,6 +604,8 @@ int gpiod_export(struct gpio_desc *desc,
offset = gpio_chip_hwgpio(desc);
if (chip->names && chip->names[offset])
ioname = chip->names[offset];
@@ -129,11 +125,9 @@ index b57ed8e..0df781d 100644
EXPORT_SYMBOL_GPL(gpiod_export);
static int match_export(struct device *dev, const void *desc)
-diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
-index 40ec143..dcb07ab 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
-@@ -122,6 +122,12 @@ static inline int gpio_export(unsigned gpio, bool direction_may_change)
+@@ -122,6 +122,12 @@ static inline int gpio_export(unsigned g
return gpiod_export(gpio_to_desc(gpio), direction_may_change);
}
@@ -146,11 +140,9 @@ index 40ec143..dcb07ab 100644
static inline int gpio_export_link(struct device *dev, const char *name,
unsigned gpio)
{
-diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
-index 14cac67..8097374 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
-@@ -426,6 +426,7 @@ static inline struct gpio_desc *devm_get_gpiod_from_child(
+@@ -426,6 +426,7 @@ static inline struct gpio_desc *devm_get
#if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS)
@@ -158,7 +150,7 @@ index 14cac67..8097374 100644
int gpiod_export(struct gpio_desc *desc, bool direction_may_change);
int gpiod_export_link(struct device *dev, const char *name,
struct gpio_desc *desc);
-@@ -433,6 +434,13 @@ void gpiod_unexport(struct gpio_desc *desc);
+@@ -433,6 +434,13 @@ void gpiod_unexport(struct gpio_desc *de
#else /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */
@@ -172,6 +164,3 @@ index 14cac67..8097374 100644
static inline int gpiod_export(struct gpio_desc *desc,
bool direction_may_change)
{
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0025-pinctrl-ralink-add-pinctrl-driver.patch b/target/linux/ramips/patches-4.3/0025-pinctrl-ralink-add-pinctrl-driver.patch
index 76a2ea13f4..b8c4f2c09a 100644
--- a/target/linux/ramips/patches-4.3/0025-pinctrl-ralink-add-pinctrl-driver.patch
+++ b/target/linux/ramips/patches-4.3/0025-pinctrl-ralink-add-pinctrl-driver.patch
@@ -12,8 +12,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
4 files changed, 482 insertions(+)
create mode 100644 drivers/pinctrl/pinctrl-rt2880.c
-diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
-index e3aa5b0..0098bff 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -557,6 +557,8 @@ config RALINK
@@ -25,8 +23,6 @@ index e3aa5b0..0098bff 100644
config SGI_IP22
bool "SGI IP22 (Indy/Indigo2)"
-diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
-index 84dd2ed..d016935 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -103,6 +103,11 @@ config PINCTRL_LPC18XX
@@ -41,8 +37,6 @@ index 84dd2ed..d016935 100644
config PINCTRL_FALCON
bool
depends on SOC_FALCON
-diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
-index cad077c..0c86632 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_PINCTRL_MESON) += meson/
@@ -53,9 +47,6 @@ index cad077c..0c86632 100644
obj-$(CONFIG_PINCTRL_SINGLE) += pinctrl-single.o
obj-$(CONFIG_PINCTRL_SIRF) += sirf/
obj-$(CONFIG_PINCTRL_TEGRA) += pinctrl-tegra.o
-diff --git a/drivers/pinctrl/pinctrl-rt2880.c b/drivers/pinctrl/pinctrl-rt2880.c
-new file mode 100644
-index 0000000..fe0af77
--- /dev/null
+++ b/drivers/pinctrl/pinctrl-rt2880.c
@@ -0,0 +1,474 @@
@@ -533,6 +524,3 @@ index 0000000..fe0af77
+}
+
+core_initcall_sync(rt2880_pinmux_init);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0026-DT-Add-documentation-for-gpio-ralink.patch b/target/linux/ramips/patches-4.3/0026-DT-Add-documentation-for-gpio-ralink.patch
index f6b60e90af..7d5f98f647 100644
--- a/target/linux/ramips/patches-4.3/0026-DT-Add-documentation-for-gpio-ralink.patch
+++ b/target/linux/ramips/patches-4.3/0026-DT-Add-documentation-for-gpio-ralink.patch
@@ -14,9 +14,6 @@ Cc: linux-gpio@vger.kernel.org
1 file changed, 40 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/gpio-ralink.txt
-diff --git a/Documentation/devicetree/bindings/gpio/gpio-ralink.txt b/Documentation/devicetree/bindings/gpio/gpio-ralink.txt
-new file mode 100644
-index 0000000..b4acf02
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-ralink.txt
@@ -0,0 +1,40 @@
@@ -60,6 +57,3 @@ index 0000000..b4acf02
+ 30 34 ];
+
+ };
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0029-phy-usb-add-ralink-phy.patch b/target/linux/ramips/patches-4.3/0029-phy-usb-add-ralink-phy.patch
index 6bc9d1f7ea..8534da3439 100644
--- a/target/linux/ramips/patches-4.3/0029-phy-usb-add-ralink-phy.patch
+++ b/target/linux/ramips/patches-4.3/0029-phy-usb-add-ralink-phy.patch
@@ -11,8 +11,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
3 files changed, 181 insertions(+)
create mode 100644 drivers/phy/phy-ralink-usb.c
-diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
-index 47da573..96ef184 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -331,6 +331,11 @@ config PHY_XGENE
@@ -27,18 +25,13 @@ index 47da573..96ef184 100644
config PHY_STIH407_USB
tristate "STMicroelectronics USB2 picoPHY driver for STiH407 family"
depends on RESET_CONTROLLER
-diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
-index a5b18c1..8dbf6cc 100644
--- a/drivers/phy/Makefile
+++ b/drivers/phy/Makefile
-@@ -46,3 +46,4 @@ obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom-ufs-qmp-14nm.o
+@@ -46,3 +46,4 @@ obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom-
obj-$(CONFIG_PHY_TUSB1210) += phy-tusb1210.o
obj-$(CONFIG_PHY_BRCMSTB_SATA) += phy-brcmstb-sata.o
obj-$(CONFIG_PHY_PISTACHIO_USB) += phy-pistachio-usb.o
+obj-$(CONFIG_PHY_RALINK_USB) += phy-ralink-usb.o
-diff --git a/drivers/phy/phy-ralink-usb.c b/drivers/phy/phy-ralink-usb.c
-new file mode 100644
-index 0000000..6c74954
--- /dev/null
+++ b/drivers/phy/phy-ralink-usb.c
@@ -0,0 +1,175 @@
@@ -217,6 +210,3 @@ index 0000000..6c74954
+MODULE_DESCRIPTION("Ralink USB phy driver");
+MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
+MODULE_LICENSE("GPL v2");
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0030-USB-add-OHCI-EHCI-OF-binding.patch b/target/linux/ramips/patches-4.3/0030-USB-add-OHCI-EHCI-OF-binding.patch
index b57fe9c545..5e07d12ba0 100644
--- a/target/linux/ramips/patches-4.3/0030-USB-add-OHCI-EHCI-OF-binding.patch
+++ b/target/linux/ramips/patches-4.3/0030-USB-add-OHCI-EHCI-OF-binding.patch
@@ -11,11 +11,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/usb/host/ohci-platform.c | 1 +
2 files changed, 2 insertions(+)
-diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
-index 5c3c085..fe78568 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
-@@ -379,6 +379,7 @@ static int ehci_platform_resume(struct device *dev)
+@@ -381,6 +381,7 @@ static int ehci_platform_resume(struct d
static const struct of_device_id vt8500_ehci_ids[] = {
{ .compatible = "via,vt8500-ehci", },
{ .compatible = "wm,prizm-ehci", },
@@ -23,11 +21,9 @@ index 5c3c085..fe78568 100644
{ .compatible = "generic-ehci", },
{ .compatible = "cavium,octeon-6335-ehci", },
{}
-diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
-index c2669f18..5cf794a 100644
--- a/drivers/usb/host/ohci-platform.c
+++ b/drivers/usb/host/ohci-platform.c
-@@ -344,6 +344,7 @@ static int ohci_platform_resume(struct device *dev)
+@@ -344,6 +344,7 @@ static int ohci_platform_resume(struct d
#endif /* CONFIG_PM_SLEEP */
static const struct of_device_id ohci_platform_ids[] = {
@@ -35,6 +31,3 @@ index c2669f18..5cf794a 100644
{ .compatible = "generic-ohci", },
{ .compatible = "cavium,octeon-6335-ohci", },
{ }
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0031-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-4.3/0031-uvc-add-iPassion-iP2970-support.patch
index ae004446bd..1a805da572 100644
--- a/target/linux/ramips/patches-4.3/0031-uvc-add-iPassion-iP2970-support.patch
+++ b/target/linux/ramips/patches-4.3/0031-uvc-add-iPassion-iP2970-support.patch
@@ -11,11 +11,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/media/usb/uvc/uvcvideo.h | 5 +-
4 files changed, 165 insertions(+), 1 deletion(-)
-diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
-index 4b5b3e8..6808bcc 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
-@@ -2536,6 +2536,18 @@ static struct usb_device_id uvc_ids[] = {
+@@ -2536,6 +2536,18 @@ static struct usb_device_id uvc_ids[] =
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_QUIRK_FORCE_Y8 },
@@ -34,11 +32,9 @@ index 4b5b3e8..6808bcc 100644
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, 0) },
{}
-diff --git a/drivers/media/usb/uvc/uvc_status.c b/drivers/media/usb/uvc/uvc_status.c
-index f552ab9..7132ad4 100644
--- a/drivers/media/usb/uvc/uvc_status.c
+++ b/drivers/media/usb/uvc/uvc_status.c
-@@ -139,6 +139,7 @@ static void uvc_status_complete(struct urb *urb)
+@@ -139,6 +139,7 @@ static void uvc_status_complete(struct u
switch (dev->status[0] & 0x0f) {
case UVC_STATUS_TYPE_CONTROL:
uvc_event_control(dev, dev->status, len);
@@ -46,7 +42,7 @@ index f552ab9..7132ad4 100644
break;
case UVC_STATUS_TYPE_STREAMING:
-@@ -182,6 +183,7 @@ int uvc_status_init(struct uvc_device *dev)
+@@ -182,6 +183,7 @@ int uvc_status_init(struct uvc_device *d
}
pipe = usb_rcvintpipe(dev->udev, ep->desc.bEndpointAddress);
@@ -54,8 +50,6 @@ index f552ab9..7132ad4 100644
/* For high-speed interrupt endpoints, the bInterval value is used as
* an exponent of two. Some developers forgot about it.
-diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
-index f839654..b30aab6 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -21,6 +21,11 @@
@@ -70,7 +64,7 @@ index f839654..b30aab6 100644
#include <media/v4l2-common.h>
-@@ -1089,9 +1094,149 @@ static void uvc_video_decode_data(struct uvc_streaming *stream,
+@@ -1089,9 +1094,149 @@ static void uvc_video_decode_data(struct
}
}
@@ -220,7 +214,7 @@ index f839654..b30aab6 100644
/* Mark the buffer as done if the EOF marker is set. */
if (data[1] & UVC_STREAM_EOF && buf->bytesused != 0) {
uvc_trace(UVC_TRACE_FRAME, "Frame complete (EOF found).\n");
-@@ -1504,6 +1649,8 @@ static int uvc_init_video_isoc(struct uvc_streaming *stream,
+@@ -1504,6 +1649,8 @@ static int uvc_init_video_isoc(struct uv
if (npackets == 0)
return -ENOMEM;
@@ -229,8 +223,6 @@ index f839654..b30aab6 100644
size = npackets * psize;
for (i = 0; i < UVC_URBS; ++i) {
-diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
-index 816dd1a..d0aa324 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -152,7 +152,9 @@
@@ -252,6 +244,3 @@ index 816dd1a..d0aa324 100644
};
enum uvc_handle_state {
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0032-USB-dwc2-add-device_reset.patch b/target/linux/ramips/patches-4.3/0032-USB-dwc2-add-device_reset.patch
index ca6821e738..2927895498 100644
--- a/target/linux/ramips/patches-4.3/0032-USB-dwc2-add-device_reset.patch
+++ b/target/linux/ramips/patches-4.3/0032-USB-dwc2-add-device_reset.patch
@@ -8,8 +8,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/usb/dwc2/hcd.c | 3 +++
1 file changed, 3 insertions(+)
-diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
-index f845c41..767c93a 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -47,6 +47,7 @@
@@ -20,7 +18,7 @@ index f845c41..767c93a 100644
#include <linux/usb/hcd.h>
#include <linux/usb/ch11.h>
-@@ -2841,6 +2842,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq)
+@@ -2841,6 +2842,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hso
retval = -ENOMEM;
@@ -29,6 +27,3 @@ index f845c41..767c93a 100644
hcfg = readl(hsotg->regs + HCFG);
dev_dbg(hsotg->dev, "hcfg=%08x\n", hcfg);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0033-USB-add-xhci-hooks.patch b/target/linux/ramips/patches-4.3/0033-USB-add-xhci-hooks.patch
index 8f28f86556..07c2eac015 100644
--- a/target/linux/ramips/patches-4.3/0033-USB-add-xhci-hooks.patch
+++ b/target/linux/ramips/patches-4.3/0033-USB-add-xhci-hooks.patch
@@ -43,7 +43,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
-@@ -214,8 +214,13 @@
+@@ -214,8 +214,13 @@ int usb_hcd_pci_probe(struct pci_dev *de
goto disable_pci;
}
@@ -59,7 +59,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
/* EHCI, OHCI */
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
-@@ -1287,7 +1287,7 @@
+@@ -1287,7 +1287,7 @@ static void hub_quiesce(struct usb_hub *
if (type != HUB_SUSPEND) {
/* Disconnect all the children */
for (i = 0; i < hdev->maxchild; ++i) {
@@ -70,7 +70,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
}
--- a/drivers/usb/core/port.c
+++ b/drivers/usb/core/port.c
-@@ -480,8 +480,10 @@
+@@ -480,8 +480,10 @@ void usb_hub_remove_port_device(struct u
struct usb_port *port_dev = hub->ports[port1 - 1];
struct usb_port *peer;
@@ -87,7 +87,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
}
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
-@@ -41,6 +41,13 @@
+@@ -41,6 +41,13 @@ config USB_XHCI_PLATFORM
If unsure, say N.
@@ -101,7 +101,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
config USB_XHCI_MVEBU
tristate "xHCI support for Marvell Armada 375/38x"
select USB_XHCI_PLATFORM
-@@ -590,7 +597,7 @@
+@@ -590,7 +597,7 @@ endif # USB_OHCI_HCD
config USB_UHCI_HCD
tristate "UHCI HCD (most Intel and VIA) support"
@@ -112,7 +112,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
accessing the USB hardware in the PC (which is also called the USB
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
-@@ -14,7 +14,12 @@
+@@ -14,7 +14,12 @@ xhci-hcd-y := xhci.o xhci-mem.o
xhci-hcd-y += xhci-ring.o xhci-hub.o xhci-dbg.o
xhci-hcd-y += xhci-trace.o
@@ -125,7 +125,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
ifneq ($(CONFIG_USB_XHCI_MVEBU), )
xhci-plat-hcd-y += xhci-mvebu.o
endif
-@@ -24,11 +29,10 @@
+@@ -24,11 +29,10 @@ endif
obj-$(CONFIG_USB_WHCI_HCD) += whci/
@@ -3834,7 +3834,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
-@@ -67,6 +67,9 @@
+@@ -67,6 +67,9 @@ static struct xhci_segment *xhci_segment
static void xhci_segment_free(struct xhci_hcd *xhci, struct xhci_segment *seg)
{
@@ -3844,7 +3844,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
if (seg->trbs) {
dma_pool_free(xhci->segment_pool, seg->trbs, seg->dma);
seg->trbs = NULL;
-@@ -1471,9 +1474,17 @@
+@@ -1471,9 +1474,17 @@ int xhci_endpoint_init(struct xhci_hcd *
max_burst = (usb_endpoint_maxp(&ep->desc)
& 0x1800) >> 11;
}
@@ -5080,7 +5080,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#endif
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
-@@ -43,6 +43,13 @@
+@@ -43,6 +43,13 @@ static void xhci_plat_quirks(struct devi
* dev struct in order to setup MSI
*/
xhci->quirks |= XHCI_PLAT;
@@ -5094,7 +5094,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
}
/* called during probe() after chip reset completes */
-@@ -89,7 +96,11 @@
+@@ -89,7 +96,11 @@ static int xhci_plat_probe(struct platfo
driver = &xhci_plat_hc_driver;
@@ -5108,7 +5108,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
-@@ -254,16 +254,20 @@
+@@ -254,16 +254,20 @@ static void inc_enq(struct xhci_hcd *xhc
static inline int room_on_ring(struct xhci_hcd *xhci, struct xhci_ring *ring,
unsigned int num_trbs)
{
@@ -5129,7 +5129,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
return 1;
}
-@@ -2869,6 +2873,7 @@
+@@ -2869,6 +2873,7 @@ static int prepare_ring(struct xhci_hcd
next = ring->enqueue;
while (last_trb(xhci, ring, ring->enq_seg, next)) {
@@ -5137,7 +5137,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
/* If we're not dealing with 0.95 hardware or isoc rings
* on AMD 0.96 host, clear the chain bit.
*/
-@@ -2878,6 +2883,9 @@
+@@ -2878,6 +2883,9 @@ static int prepare_ring(struct xhci_hcd
next->link.control &= cpu_to_le32(~TRB_CHAIN);
else
next->link.control |= cpu_to_le32(TRB_CHAIN);
@@ -5147,7 +5147,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
wmb();
next->link.control ^= cpu_to_le32(TRB_CYCLE);
-@@ -3008,6 +3016,9 @@
+@@ -3008,6 +3016,9 @@ static void giveback_first_trb(struct xh
start_trb->field[3] |= cpu_to_le32(start_cycle);
else
start_trb->field[3] &= cpu_to_le32(~TRB_CYCLE);
@@ -5157,7 +5157,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
xhci_ring_ep_doorbell(xhci, slot_id, ep_index, stream_id);
}
-@@ -3063,6 +3074,29 @@
+@@ -3063,6 +3074,29 @@ static u32 xhci_td_remainder(unsigned in
return (remainder >> 10) << 17;
}
@@ -5187,7 +5187,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
/*
* For xHCI 1.0 host controllers, TD size is the number of max packet sized
* packets remaining in the TD (*not* including this TRB).
-@@ -3220,6 +3254,7 @@
+@@ -3220,6 +3254,7 @@ static int queue_bulk_sg_tx(struct xhci_
}
/* Set the TRB length, TD size, and interrupter fields. */
@@ -5195,7 +5195,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
if (xhci->hci_version < 0x100) {
remainder = xhci_td_remainder(
urb->transfer_buffer_length -
-@@ -3229,6 +3264,12 @@
+@@ -3229,6 +3264,12 @@ static int queue_bulk_sg_tx(struct xhci_
trb_buff_len, total_packet_count, urb,
num_trbs - 1);
}
@@ -5208,7 +5208,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
length_field = TRB_LEN(trb_buff_len) |
remainder |
TRB_INTR_TARGET(0);
-@@ -3293,6 +3334,9 @@
+@@ -3293,6 +3334,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
int running_total, trb_buff_len, ret;
unsigned int total_packet_count;
u64 addr;
@@ -5218,7 +5218,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
if (urb->num_sgs)
return queue_bulk_sg_tx(xhci, mem_flags, urb, slot_id, ep_index);
-@@ -3317,6 +3361,25 @@
+@@ -3317,6 +3361,25 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
num_trbs++;
running_total += TRB_MAX_BUFF_SIZE;
}
@@ -5244,7 +5244,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
ret = prepare_transfer(xhci, xhci->devs[slot_id],
ep_index, urb->stream_id,
-@@ -3393,6 +3456,7 @@
+@@ -3393,6 +3456,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
field |= TRB_ISP;
/* Set the TRB length, TD size, and interrupter fields. */
@@ -5252,7 +5252,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
if (xhci->hci_version < 0x100) {
remainder = xhci_td_remainder(
urb->transfer_buffer_length -
-@@ -3402,6 +3466,10 @@
+@@ -3402,6 +3466,10 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
trb_buff_len, total_packet_count, urb,
num_trbs - 1);
}
@@ -5263,7 +5263,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
length_field = TRB_LEN(trb_buff_len) |
remainder |
TRB_INTR_TARGET(0);
-@@ -3491,7 +3559,11 @@
+@@ -3491,7 +3559,11 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
field |= 0x1;
/* xHCI 1.0/1.1 6.4.1.2.1: Transfer Type field */
@@ -5275,7 +5275,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
if (urb->transfer_buffer_length > 0) {
if (setup->bRequestType & USB_DIR_IN)
field |= TRB_TX_TYPE(TRB_DATA_IN);
-@@ -3515,7 +3587,12 @@
+@@ -3515,7 +3587,12 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
field = TRB_TYPE(TRB_DATA);
length_field = TRB_LEN(urb->transfer_buffer_length) |
@@ -5288,7 +5288,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
TRB_INTR_TARGET(0);
if (urb->transfer_buffer_length > 0) {
if (setup->bRequestType & USB_DIR_IN)
-@@ -3731,6 +3808,9 @@
+@@ -3731,6 +3808,9 @@ static int xhci_queue_isoc_tx(struct xhc
bool more_trbs_coming;
struct xhci_virt_ep *xep;
@@ -5298,7 +5298,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
xep = &xhci->devs[slot_id]->eps[ep_index];
ep_ring = xhci->devs[slot_id]->eps[ep_index].ring;
-@@ -3744,6 +3824,21 @@
+@@ -3744,6 +3824,21 @@ static int xhci_queue_isoc_tx(struct xhc
start_trb = &ep_ring->enqueue->generic;
start_cycle = ep_ring->cycle_state;
@@ -5320,7 +5320,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
urb_priv = urb->hcpriv;
/* Queue the first TRB, even if it's zero-length */
for (i = 0; i < num_tds; i++) {
-@@ -3828,9 +3923,13 @@
+@@ -3828,9 +3923,13 @@ static int xhci_queue_isoc_tx(struct xhc
} else {
td->last_trb = ep_ring->enqueue;
field |= TRB_IOC;
@@ -5334,7 +5334,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
/* Set BEI bit except for the last td */
if (i < num_tds - 1)
field |= TRB_BEI;
-@@ -3845,6 +3944,7 @@
+@@ -3845,6 +3944,7 @@ static int xhci_queue_isoc_tx(struct xhc
trb_buff_len = td_remain_len;
/* Set the TRB length, TD size, & interrupter fields. */
@@ -5342,7 +5342,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
if (xhci->hci_version < 0x100) {
remainder = xhci_td_remainder(
td_len - running_total);
-@@ -3854,6 +3954,10 @@
+@@ -3854,6 +3954,10 @@ static int xhci_queue_isoc_tx(struct xhc
total_packet_count, urb,
(trbs_per_td - j - 1));
}
@@ -5372,7 +5372,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
#define DRIVER_AUTHOR "Sarah Sharp"
#define DRIVER_DESC "'eXtensible' Host Controller (xHC) Driver"
-@@ -46,6 +56,18 @@
+@@ -46,6 +56,18 @@ static unsigned int quirks;
module_param(quirks, uint, S_IRUGO);
MODULE_PARM_DESC(quirks, "Bit flags for quirks to be enabled as default");
@@ -5391,7 +5391,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
/* TODO: copied from ehci-hcd.c - can this be refactored? */
/*
* xhci_handshake - spin reading hc until handshake completes or fails
-@@ -198,7 +220,7 @@
+@@ -198,7 +220,7 @@ int xhci_reset(struct xhci_hcd *xhci)
return ret;
}
@@ -5400,7 +5400,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
static int xhci_free_msi(struct xhci_hcd *xhci)
{
int i;
-@@ -448,6 +470,11 @@
+@@ -448,6 +470,11 @@ static void compliance_mode_recovery(uns
"Attempting compliance mode recovery");
hcd = xhci->shared_hcd;
@@ -5412,7 +5412,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
if (hcd->state == HC_STATE_SUSPENDED)
usb_hcd_resume_root_hub(hcd);
-@@ -495,6 +522,9 @@
+@@ -495,6 +522,9 @@ static bool xhci_compliance_mode_recover
{
const char *dmi_product_name, *dmi_sys_vendor;
@@ -5422,7 +5422,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
dmi_product_name = dmi_get_system_info(DMI_PRODUCT_NAME);
dmi_sys_vendor = dmi_get_system_info(DMI_SYS_VENDOR);
if (!dmi_product_name || !dmi_sys_vendor)
-@@ -540,6 +570,10 @@
+@@ -540,6 +570,10 @@ int xhci_init(struct usb_hcd *hcd)
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
"xHCI doesn't need link TRB QUIRK");
}
@@ -5433,7 +5433,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
retval = xhci_mem_init(xhci, GFP_KERNEL);
xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Finished xhci_init");
-@@ -624,7 +658,11 @@
+@@ -624,7 +658,11 @@ int xhci_run(struct usb_hcd *hcd)
"// Set the interrupt modulation register");
temp = readl(&xhci->ir_set->irq_control);
temp &= ~ER_IRQ_INTERVAL_MASK;
@@ -5445,7 +5445,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
writel(temp, &xhci->ir_set->irq_control);
/* Set the HCD state before we enable the irqs */
-@@ -649,6 +687,9 @@
+@@ -649,6 +687,9 @@ int xhci_run(struct usb_hcd *hcd)
xhci_queue_vendor_command(xhci, command, 0, 0, 0,
TRB_TYPE(TRB_NEC_GET_FW));
}
@@ -5455,7 +5455,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
"Finished xhci_run for USB2 roothub");
return 0;
-@@ -1639,6 +1680,14 @@
+@@ -1639,6 +1680,14 @@ int xhci_drop_endpoint(struct usb_hcd *h
u32 drop_flag;
u32 new_add_flags, new_drop_flags;
int ret;
@@ -5470,7 +5470,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
ret = xhci_check_args(hcd, udev, ep, 1, true, __func__);
if (ret <= 0)
-@@ -1688,6 +1737,40 @@
+@@ -1688,6 +1737,40 @@ int xhci_drop_endpoint(struct usb_hcd *h
xhci_endpoint_zero(xhci, xhci->devs[udev->slot_id], ep);
@@ -5511,7 +5511,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
xhci_dbg(xhci, "drop ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x\n",
(unsigned int) ep->desc.bEndpointAddress,
udev->slot_id,
-@@ -1720,6 +1803,19 @@
+@@ -1720,6 +1803,19 @@ int xhci_add_endpoint(struct usb_hcd *hc
u32 new_add_flags, new_drop_flags;
struct xhci_virt_device *virt_dev;
int ret = 0;
@@ -5531,7 +5531,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
ret = xhci_check_args(hcd, udev, ep, 1, true, __func__);
if (ret <= 0) {
-@@ -1783,6 +1879,56 @@
+@@ -1783,6 +1879,56 @@ int xhci_add_endpoint(struct usb_hcd *hc
return -ENOMEM;
}
@@ -5588,7 +5588,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
ctrl_ctx->add_flags |= cpu_to_le32(added_ctxs);
new_add_flags = le32_to_cpu(ctrl_ctx->add_flags);
-@@ -4446,8 +4592,14 @@
+@@ -4446,8 +4592,14 @@ static u16 xhci_call_host_update_timeout
u16 *timeout)
{
if (state == USB3_LPM_U1)
@@ -5603,7 +5603,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
return xhci_calculate_u2_timeout(xhci, udev, desc);
return USB3_LPM_DISABLED;
-@@ -4839,7 +4991,9 @@
+@@ -4839,7 +4991,9 @@ int xhci_gen_setup(struct usb_hcd *hcd,
hcd->self.no_sg_constraint = 1;
/* XHCI controllers don't stop the ep queue on short packets :| */
@@ -5613,7 +5613,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
if (usb_hcd_is_primary_hcd(hcd)) {
xhci = hcd_to_xhci(hcd);
-@@ -4900,6 +5054,10 @@
+@@ -4900,6 +5054,10 @@ int xhci_gen_setup(struct usb_hcd *hcd,
return retval;
xhci_dbg(xhci, "Reset complete\n");
@@ -5624,7 +5624,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
/* Set dma_mask and coherent_dma_mask to 64-bits,
* if xHC supports 64-bit addressing */
if (HCC_64BIT_ADDR(xhci->hcc_params) &&
-@@ -5005,8 +5163,57 @@
+@@ -5005,8 +5163,57 @@ MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_LICENSE("GPL");
@@ -5706,7 +5706,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
/* xHCI PCI Configuration Registers */
#define XHCI_SBRN_OFFSET (0x60)
-@@ -1597,8 +1612,12 @@
+@@ -1597,8 +1612,12 @@ struct xhci_hcd {
/* Compliance Mode Recovery Data */
struct timer_list comp_mode_recovery_timer;
u32 port_status_u0;
@@ -5719,7 +5719,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
};
/* Platform specific overrides to generic XHCI hc_driver ops */
-@@ -1763,6 +1782,26 @@
+@@ -1763,6 +1782,26 @@ void xhci_urb_free_priv(struct urb_priv
void xhci_free_command(struct xhci_hcd *xhci,
struct xhci_command *command);
diff --git a/target/linux/ramips/patches-4.3/0034-NET-multi-phy-support.patch b/target/linux/ramips/patches-4.3/0034-NET-multi-phy-support.patch
index f163e3cbc6..2b1722e177 100644
--- a/target/linux/ramips/patches-4.3/0034-NET-multi-phy-support.patch
+++ b/target/linux/ramips/patches-4.3/0034-NET-multi-phy-support.patch
@@ -9,11 +9,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
include/linux/phy.h | 1 +
2 files changed, 7 insertions(+), 3 deletions(-)
-diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
-index adb48ab..7eb83bd 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
-@@ -843,7 +843,8 @@ void phy_state_machine(struct work_struct *work)
+@@ -887,7 +887,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;
@@ -23,7 +21,7 @@ index adb48ab..7eb83bd 100644
phydev->adjust_link(phydev->attached_dev);
break;
}
-@@ -923,7 +924,8 @@ void phy_state_machine(struct work_struct *work)
+@@ -967,7 +968,8 @@ void phy_state_machine(struct work_struc
netif_carrier_on(phydev->attached_dev);
} else {
phydev->state = PHY_NOLINK;
@@ -33,7 +31,7 @@ index adb48ab..7eb83bd 100644
}
phydev->adjust_link(phydev->attached_dev);
-@@ -935,7 +937,8 @@ void phy_state_machine(struct work_struct *work)
+@@ -979,7 +981,8 @@ void phy_state_machine(struct work_struc
case PHY_HALTED:
if (phydev->link) {
phydev->link = 0;
@@ -43,8 +41,6 @@ index adb48ab..7eb83bd 100644
phydev->adjust_link(phydev->attached_dev);
do_suspend = true;
}
-diff --git a/include/linux/phy.h b/include/linux/phy.h
-index 4a4e3a0..a260bdc 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -375,6 +375,7 @@ struct phy_device {
@@ -55,6 +51,3 @@ index 4a4e3a0..a260bdc 100644
enum phy_state state;
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0035-NET-MIPS-add-ralink-SoC-ethernet-driver.patch b/target/linux/ramips/patches-4.3/0035-NET-MIPS-add-ralink-SoC-ethernet-driver.patch
index 69b2f60986..44a3ed6af7 100644
--- a/target/linux/ramips/patches-4.3/0035-NET-MIPS-add-ralink-SoC-ethernet-driver.patch
+++ b/target/linux/ramips/patches-4.3/0035-NET-MIPS-add-ralink-SoC-ethernet-driver.patch
@@ -12,8 +12,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/net/ethernet/Makefile | 1 +
3 files changed, 3 insertions(+)
-diff --git a/arch/mips/ralink/rt305x.c b/arch/mips/ralink/rt305x.c
-index 51f33a5..d7c4ba4 100644
--- a/arch/mips/ralink/rt305x.c
+++ b/arch/mips/ralink/rt305x.c
@@ -199,6 +199,7 @@ void __init ralink_clk_init(void)
@@ -24,6 +22,3 @@ index 51f33a5..d7c4ba4 100644
ralink_clk_add("10000b00.spi", sys_rate);
ralink_clk_add("10000b40.spi", sys_rate);
ralink_clk_add("10000100.timer", wdt_rate);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch b/target/linux/ramips/patches-4.3/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
index 635f60475a..b6189fe096 100644
--- a/target/linux/ramips/patches-4.3/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
+++ b/target/linux/ramips/patches-4.3/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch
@@ -7,11 +7,9 @@ Subject: [PATCH 36/53] mtd: fix cfi cmdset 0002 erase status check
drivers/mtd/chips/cfi_cmdset_0002.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
-index c3624eb..60d960a 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -2290,7 +2290,7 @@ static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip)
+@@ -2291,7 +2291,7 @@ static int __xipram do_erase_chip(struct
chip->erase_suspended = 0;
}
@@ -20,7 +18,7 @@ index c3624eb..60d960a 100644
break;
if (time_after(jiffies, timeo)) {
-@@ -2379,7 +2379,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
+@@ -2380,7 +2380,7 @@ static int __xipram do_erase_oneblock(st
chip->erase_suspended = 0;
}
@@ -29,6 +27,3 @@ index c3624eb..60d960a 100644
xip_enable(map, chip, adr);
break;
}
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0037-mtd-cfi-cmdset-0002-force-word-write.patch b/target/linux/ramips/patches-4.3/0037-mtd-cfi-cmdset-0002-force-word-write.patch
index 7c1ea22a6b..8f274bca15 100644
--- a/target/linux/ramips/patches-4.3/0037-mtd-cfi-cmdset-0002-force-word-write.patch
+++ b/target/linux/ramips/patches-4.3/0037-mtd-cfi-cmdset-0002-force-word-write.patch
@@ -7,8 +7,6 @@ Subject: [PATCH 37/53] mtd: cfi cmdset 0002 force word write
drivers/mtd/chips/cfi_cmdset_0002.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
-diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
-index 60d960a..a663e3b 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -40,7 +40,7 @@
@@ -30,7 +28,7 @@ index 60d960a..a663e3b 100644
static int cfi_amdstd_erase_chip(struct mtd_info *, struct erase_info *);
static int cfi_amdstd_erase_varsize(struct mtd_info *, struct erase_info *);
static void cfi_amdstd_sync (struct mtd_info *);
-@@ -202,6 +204,7 @@ static void fixup_amd_bootblock(struct mtd_info *mtd)
+@@ -202,6 +204,7 @@ static void fixup_amd_bootblock(struct m
}
#endif
@@ -38,7 +36,7 @@ index 60d960a..a663e3b 100644
static void fixup_use_write_buffers(struct mtd_info *mtd)
{
struct map_info *map = mtd->priv;
-@@ -211,6 +214,7 @@ static void fixup_use_write_buffers(struct mtd_info *mtd)
+@@ -211,6 +214,7 @@ static void fixup_use_write_buffers(stru
mtd->_write = cfi_amdstd_write_buffers;
}
}
@@ -46,7 +44,7 @@ index 60d960a..a663e3b 100644
/* Atmel chips don't use the same PRI format as AMD chips */
static void fixup_convert_atmel_pri(struct mtd_info *mtd)
-@@ -1789,6 +1793,7 @@ static int cfi_amdstd_write_words(struct mtd_info *mtd, loff_t to, size_t len,
+@@ -1789,6 +1793,7 @@ static int cfi_amdstd_write_words(struct
/*
* FIXME: interleaved mode not tested, and probably not supported!
*/
@@ -54,7 +52,7 @@ index 60d960a..a663e3b 100644
static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
unsigned long adr, const u_char *buf,
int len)
-@@ -1916,7 +1921,6 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
+@@ -1917,7 +1922,6 @@ static int __xipram do_write_buffer(stru
return ret;
}
@@ -62,7 +60,7 @@ index 60d960a..a663e3b 100644
static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{
-@@ -1991,6 +1995,7 @@ static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
+@@ -1992,6 +1996,7 @@ static int cfi_amdstd_write_buffers(stru
return 0;
}
@@ -70,6 +68,3 @@ index 60d960a..a663e3b 100644
/*
* Wait for the flash chip to become ready to write data
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0038-mtd-ralink-add-mt7620-nand-driver.patch b/target/linux/ramips/patches-4.3/0038-mtd-ralink-add-mt7620-nand-driver.patch
index a381e21419..0bf9043168 100644
--- a/target/linux/ramips/patches-4.3/0038-mtd-ralink-add-mt7620-nand-driver.patch
+++ b/target/linux/ramips/patches-4.3/0038-mtd-ralink-add-mt7620-nand-driver.patch
@@ -13,8 +13,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 drivers/mtd/maps/ralink_nand.c
create mode 100644 drivers/mtd/maps/ralink_nand.h
-diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
-index 7c95a65..c2739db 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -399,4 +399,8 @@ config MTD_LATCH_ADDR
@@ -26,8 +24,6 @@ index 7c95a65..c2739db 100644
+ depends on RALINK && SOC_MT7620
+
endmenu
-diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
-index 141c91a..94d2aa0 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -43,3 +43,5 @@ obj-$(CONFIG_MTD_VMU) += vmu-flash.o
@@ -36,9 +32,6 @@ index 141c91a..94d2aa0 100644
obj-$(CONFIG_MTD_LANTIQ) += lantiq-flash.o
+obj-$(CONFIG_MTD_NAND_MT7620) += ralink_nand.o
+
-diff --git a/drivers/mtd/maps/ralink_nand.c b/drivers/mtd/maps/ralink_nand.c
-new file mode 100644
-index 0000000..64f9119
--- /dev/null
+++ b/drivers/mtd/maps/ralink_nand.c
@@ -0,0 +1,2136 @@
@@ -2178,9 +2171,6 @@ index 0000000..64f9119
+
+
+MODULE_LICENSE("GPL");
-diff --git a/drivers/mtd/maps/ralink_nand.h b/drivers/mtd/maps/ralink_nand.h
-new file mode 100644
-index 0000000..a408ae9
--- /dev/null
+++ b/drivers/mtd/maps/ralink_nand.h
@@ -0,0 +1,232 @@
@@ -2416,6 +2406,3 @@ index 0000000..a408ae9
+
+
+#endif
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0039-mtd-add-mt7621-nand-support.patch b/target/linux/ramips/patches-4.3/0039-mtd-add-mt7621-nand-support.patch
index b84e666ed7..a16be7356d 100644
--- a/target/linux/ramips/patches-4.3/0039-mtd-add-mt7621-nand-support.patch
+++ b/target/linux/ramips/patches-4.3/0039-mtd-add-mt7621-nand-support.patch
@@ -29,8 +29,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 drivers/mtd/nand/nand_device_list.h
create mode 100644 drivers/mtd/nand/partition.h
-diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
-index 3324281..76cfc97 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -535,4 +535,10 @@ config MTD_NAND_HISI504
@@ -44,20 +42,15 @@ index 3324281..76cfc97 100644
+ select MTD_NAND_ECC
+
endif # MTD_NAND
-diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
-index 075a027..ec349e3 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
-@@ -54,5 +54,6 @@ obj-$(CONFIG_MTD_NAND_BCM47XXNFLASH) += bcm47xxnflash/
+@@ -54,5 +54,6 @@ obj-$(CONFIG_MTD_NAND_BCM47XXNFLASH) +=
obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_nand.o
obj-$(CONFIG_MTD_NAND_HISI504) += hisi504_nand.o
obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand/
+obj-$(CONFIG_MTK_MTD_NAND) += mtk_nand.o bmt.o
nand-objs := nand_base.o nand_bbt.o nand_timings.o
-diff --git a/drivers/mtd/nand/bmt.c b/drivers/mtd/nand/bmt.c
-new file mode 100644
-index 0000000..0462871
--- /dev/null
+++ b/drivers/mtd/nand/bmt.c
@@ -0,0 +1,750 @@
@@ -811,9 +804,6 @@ index 0000000..0462871
+MODULE_AUTHOR("MediaTek");
+MODULE_DESCRIPTION("Bad Block mapping management for MediaTek NAND Flash Driver");
+#endif
-diff --git a/drivers/mtd/nand/bmt.h b/drivers/mtd/nand/bmt.h
-new file mode 100644
-index 0000000..2d30ea9
--- /dev/null
+++ b/drivers/mtd/nand/bmt.h
@@ -0,0 +1,80 @@
@@ -897,9 +887,6 @@ index 0000000..2d30ea9
+unsigned short get_mapping_block_index(int index);
+
+#endif // #ifndef __BMT_H__
-diff --git a/drivers/mtd/nand/dev-nand.c b/drivers/mtd/nand/dev-nand.c
-new file mode 100644
-index 0000000..9fb5235
--- /dev/null
+++ b/drivers/mtd/nand/dev-nand.c
@@ -0,0 +1,63 @@
@@ -966,9 +953,6 @@ index 0000000..9fb5235
+ return retval;
+}
+arch_initcall(mtk_nand_register);
-diff --git a/drivers/mtd/nand/mt6575_typedefs.h b/drivers/mtd/nand/mt6575_typedefs.h
-new file mode 100644
-index 0000000..a7b9647
--- /dev/null
+++ b/drivers/mtd/nand/mt6575_typedefs.h
@@ -0,0 +1,340 @@
@@ -1312,9 +1296,6 @@ index 0000000..a7b9647
+
+#endif // _MT6575_TYPEDEFS_H
+
-diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
-new file mode 100644
-index 0000000..00e150c
--- /dev/null
+++ b/drivers/mtd/nand/mtk_nand.c
@@ -0,0 +1,2304 @@
@@ -3622,9 +3603,6 @@ index 0000000..00e150c
+module_init(mtk_nand_init);
+module_exit(mtk_nand_exit);
+MODULE_LICENSE("GPL");
-diff --git a/drivers/mtd/nand/mtk_nand.h b/drivers/mtd/nand/mtk_nand.h
-new file mode 100644
-index 0000000..6db88c4
--- /dev/null
+++ b/drivers/mtd/nand/mtk_nand.h
@@ -0,0 +1,452 @@
@@ -4080,11 +4058,9 @@ index 0000000..6db88c4
+extern u32 CFG_BLOCKSIZE;
+#endif
+#endif
-diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
-index ceb68ca..04dbc69 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
-@@ -92,7 +92,7 @@ static struct nand_ecclayout nand_oob_128 = {
+@@ -92,7 +92,7 @@ static struct nand_ecclayout nand_oob_12
.length = 78} }
};
@@ -4093,7 +4069,7 @@ index ceb68ca..04dbc69 100644
static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
struct mtd_oob_ops *ops);
-@@ -130,7 +130,7 @@ static int check_offs_len(struct mtd_info *mtd,
+@@ -130,7 +130,7 @@ static int check_offs_len(struct mtd_inf
*
* Release chip lock and wake up anyone waiting on the device.
*/
@@ -4102,7 +4078,7 @@ index ceb68ca..04dbc69 100644
{
struct nand_chip *chip = mtd->priv;
-@@ -820,7 +820,7 @@ static void panic_nand_get_device(struct nand_chip *chip,
+@@ -820,7 +820,7 @@ static void panic_nand_get_device(struct
*
* Get the device and lock it for exclusive access
*/
@@ -4111,11 +4087,9 @@ index ceb68ca..04dbc69 100644
nand_get_device(struct mtd_info *mtd, int new_state)
{
struct nand_chip *chip = mtd->priv;
-diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
-index 63a1a36..d036b9a 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
-@@ -1374,4 +1374,23 @@ int nand_markbad_bbt(struct mtd_info *mtd, loff_t offs)
+@@ -1374,4 +1374,23 @@ int nand_markbad_bbt(struct mtd_info *mt
return ret;
}
@@ -4139,9 +4113,6 @@ index 63a1a36..d036b9a 100644
+}
+
EXPORT_SYMBOL(nand_scan_bbt);
-diff --git a/drivers/mtd/nand/nand_def.h b/drivers/mtd/nand/nand_def.h
-new file mode 100644
-index 0000000..82e957d
--- /dev/null
+++ b/drivers/mtd/nand/nand_def.h
@@ -0,0 +1,123 @@
@@ -4268,9 +4239,6 @@ index 0000000..82e957d
+#include "mt6575_typedefs.h"
+
+#endif /* __NAND_DEF_H__ */
-diff --git a/drivers/mtd/nand/nand_device_list.h b/drivers/mtd/nand/nand_device_list.h
-new file mode 100644
-index 0000000..4c36b3a
--- /dev/null
+++ b/drivers/mtd/nand/nand_device_list.h
@@ -0,0 +1,55 @@
@@ -4329,9 +4297,6 @@ index 0000000..4c36b3a
+
+
+#endif
-diff --git a/drivers/mtd/nand/partition.h b/drivers/mtd/nand/partition.h
-new file mode 100644
-index 0000000..034e1af
--- /dev/null
+++ b/drivers/mtd/nand/partition.h
@@ -0,0 +1,115 @@
@@ -4450,6 +4415,3 @@ index 0000000..034e1af
+//#endif
+#undef RECONFIG_PARTITION_SIZE
+
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0040-nand-add-mtk-nand-hack-hook.patch b/target/linux/ramips/patches-4.3/0040-nand-add-mtk-nand-hack-hook.patch
index 51fd8ee6a4..78d607e7f0 100644
--- a/target/linux/ramips/patches-4.3/0040-nand-add-mtk-nand-hack-hook.patch
+++ b/target/linux/ramips/patches-4.3/0040-nand-add-mtk-nand-hack-hook.patch
@@ -11,8 +11,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
include/linux/mtd/nand.h | 4 ++++
4 files changed, 44 insertions(+), 5 deletions(-)
-diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
-index 00e150c..808e9c3 100644
--- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c
@@ -110,6 +110,10 @@ int part_num = NUM_PARTITIONS;
@@ -26,7 +24,7 @@ index 00e150c..808e9c3 100644
static u8 local_oob_buf[NAND_MAX_OOBSIZE];
static u8 nand_badblock_offset = 0;
-@@ -348,7 +352,7 @@ mtk_nand_check_bch_error(struct mtd_info *mtd, u8 * pDataBuf, u32 u4SecIndex, u3
+@@ -348,7 +352,7 @@ mtk_nand_check_bch_error(struct mtd_info
if (0xF == u4ErrNum) {
mtd->ecc_stats.failed++;
bRet = false;
@@ -35,7 +33,7 @@ index 00e150c..808e9c3 100644
} else {
for (i = 0; i < ((u4ErrNum + 1) >> 1); ++i) {
au4ErrBitLoc[i] = DRV_Reg32(ECC_DECEL0_REG32 + i);
-@@ -1422,7 +1426,7 @@ mtk_nand_erase_hw(struct mtd_info *mtd, int page)
+@@ -1422,7 +1426,7 @@ mtk_nand_erase_hw(struct mtd_info *mtd,
{
struct nand_chip *chip = (struct nand_chip *)mtd->priv;
@@ -44,7 +42,7 @@ index 00e150c..808e9c3 100644
return chip->waitfunc(mtd, chip);
}
-@@ -2094,8 +2098,8 @@ mtk_nand_probe(struct platform_device *pdev)
+@@ -2094,8 +2098,8 @@ mtk_nand_probe(struct platform_device *p
nand_chip->write_page = mtk_nand_write_page;
nand_chip->ecc.write_oob = mtk_nand_write_oob;
nand_chip->block_markbad = mtk_nand_block_markbad; // need to add nand_get_device()/nand_release_device().
@@ -55,7 +53,7 @@ index 00e150c..808e9c3 100644
nand_chip->ecc.read_oob = mtk_nand_read_oob;
nand_chip->block_bad = mtk_nand_block_bad;
-@@ -2175,6 +2179,21 @@ mtk_nand_probe(struct platform_device *pdev)
+@@ -2175,6 +2179,21 @@ mtk_nand_probe(struct platform_device *p
nand_chip->pagemask = (nand_chip->chipsize >> nand_chip->page_shift) - 1;
nand_chip->phys_erase_shift = ffs(mtd->erasesize) - 1;
nand_chip->chip_shift = ffs(nand_chip->chipsize) - 1;//0x1C;//ffs(nand_chip->chipsize) - 1;
@@ -87,7 +85,7 @@ index 00e150c..808e9c3 100644
kfree(host);
nand_disable_clock();
return err;
-@@ -2261,8 +2283,12 @@ mtk_nand_remove(struct platform_device *pdev)
+@@ -2261,8 +2283,12 @@ mtk_nand_remove(struct platform_device *
{
struct mtk_nand_host *host = platform_get_drvdata(pdev);
struct mtd_info *mtd = &host->mtd;
@@ -100,11 +98,9 @@ index 00e150c..808e9c3 100644
kfree(host);
nand_disable_clock();
-diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
-index 04dbc69..c5ed6fc 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
-@@ -1592,6 +1592,9 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
+@@ -1592,6 +1592,9 @@ static int nand_do_read_ops(struct mtd_i
__func__, buf);
read_retry:
@@ -122,7 +118,7 @@ index 04dbc69..c5ed6fc 100644
if (ret < 0) {
if (use_bufpoi)
/* Invalidate page cache */
-@@ -2786,8 +2790,11 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
+@@ -2786,8 +2790,11 @@ int nand_erase_nand(struct mtd_info *mtd
if (page <= chip->pagebuf && chip->pagebuf <
(page + pages_per_block))
chip->pagebuf = -1;
@@ -135,11 +131,9 @@ index 04dbc69..c5ed6fc 100644
/*
* See if operation failed and additional status checks are
-diff --git a/drivers/mtd/nand/nand_device_list.h b/drivers/mtd/nand/nand_device_list.h
-index 4c36b3a..267fd0c 100644
--- a/drivers/mtd/nand/nand_device_list.h
+++ b/drivers/mtd/nand/nand_device_list.h
-@@ -43,6 +43,8 @@ static const flashdev_info gen_FlashTable[]={
+@@ -43,6 +43,8 @@ static const flashdev_info gen_FlashTabl
{0xADBC, 0x905554, 5, 16, 512, 128, 2048, 64, 0x10801011, "H9DA4GH4JJAMC", 0},
{0x01F1, 0x801D01, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "S34ML01G100TF", 0},
{0x92F1, 0x8095FF, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "F59L1G81A", 0},
@@ -148,8 +142,6 @@ index 4c36b3a..267fd0c 100644
{0xECD3, 0x519558, 5, 8, 1024, 128, 2048, 64, 0x44333, "K9K8G8000", 0},
{0xC2F1, 0x801DC2, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "MX30LF1G08AA", 0},
{0x98D3, 0x902676, 5, 8, 1024, 256, 4096, 224, 0x00C25332, "TC58NVG3S0F", 0},
-diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
-index 272f429..b633b84 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -671,6 +671,10 @@ struct nand_chip {
@@ -163,6 +155,3 @@ index 272f429..b633b84 100644
int (*onfi_set_features)(struct mtd_info *mtd, struct nand_chip *chip,
int feature_addr, uint8_t *subfeature_para);
int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip,
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0041-DT-Add-documentation-for-spi-rt2880.patch b/target/linux/ramips/patches-4.3/0041-DT-Add-documentation-for-spi-rt2880.patch
index 100465f1fa..e2643e3f25 100644
--- a/target/linux/ramips/patches-4.3/0041-DT-Add-documentation-for-spi-rt2880.patch
+++ b/target/linux/ramips/patches-4.3/0041-DT-Add-documentation-for-spi-rt2880.patch
@@ -11,9 +11,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
1 file changed, 28 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/spi-rt2880.txt
-diff --git a/Documentation/devicetree/bindings/spi/spi-rt2880.txt b/Documentation/devicetree/bindings/spi/spi-rt2880.txt
-new file mode 100644
-index 0000000..068bc90
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-rt2880.txt
@@ -0,0 +1,28 @@
@@ -45,6 +42,3 @@ index 0000000..068bc90
+ };
+ };
+
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0042-SPI-ralink-add-Ralink-SoC-spi-driver.patch b/target/linux/ramips/patches-4.3/0042-SPI-ralink-add-Ralink-SoC-spi-driver.patch
index 92438ff424..596bd83e5b 100644
--- a/target/linux/ramips/patches-4.3/0042-SPI-ralink-add-Ralink-SoC-spi-driver.patch
+++ b/target/linux/ramips/patches-4.3/0042-SPI-ralink-add-Ralink-SoC-spi-driver.patch
@@ -14,11 +14,9 @@ Acked-by: John Crispin <blogic@openwrt.org>
3 files changed, 537 insertions(+)
create mode 100644 drivers/spi/spi-rt2880.c
-diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
-index 4887f31..7c592ce 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
-@@ -457,6 +457,12 @@ config SPI_QUP
+@@ -466,6 +466,12 @@ config SPI_QUP
This driver can also be built as a module. If so, the module
will be called spi_qup.
@@ -31,11 +29,9 @@ index 4887f31..7c592ce 100644
config SPI_S3C24XX
tristate "Samsung S3C24XX series SPI"
depends on ARCH_S3C24XX
-diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
-index 6a7f6f9..3d690ef 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
-@@ -68,6 +68,7 @@ obj-$(CONFIG_SPI_QUP) += spi-qup.o
+@@ -69,6 +69,7 @@ obj-$(CONFIG_SPI_QUP) += spi-qup.o
obj-$(CONFIG_SPI_ROCKCHIP) += spi-rockchip.o
obj-$(CONFIG_SPI_RB4XX) += spi-rb4xx.o
obj-$(CONFIG_SPI_RSPI) += spi-rspi.o
@@ -43,9 +39,6 @@ index 6a7f6f9..3d690ef 100644
obj-$(CONFIG_SPI_S3C24XX) += spi-s3c24xx-hw.o
spi-s3c24xx-hw-y := spi-s3c24xx.o
spi-s3c24xx-hw-$(CONFIG_SPI_S3C24XX_FIQ) += spi-s3c24xx-fiq.o
-diff --git a/drivers/spi/spi-rt2880.c b/drivers/spi/spi-rt2880.c
-new file mode 100644
-index 0000000..c286c94
--- /dev/null
+++ b/drivers/spi/spi-rt2880.c
@@ -0,0 +1,530 @@
@@ -579,6 +572,3 @@ index 0000000..c286c94
+MODULE_AUTHOR("Sergiy <piratfm@gmail.com>");
+MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>");
+MODULE_LICENSE("GPL");
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0043-spi-add-mt7621-support.patch b/target/linux/ramips/patches-4.3/0043-spi-add-mt7621-support.patch
index 716168f101..eab30ae1e1 100644
--- a/target/linux/ramips/patches-4.3/0043-spi-add-mt7621-support.patch
+++ b/target/linux/ramips/patches-4.3/0043-spi-add-mt7621-support.patch
@@ -11,11 +11,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
3 files changed, 487 insertions(+)
create mode 100644 drivers/spi/spi-mt7621.c
-diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
-index 7c592ce..2f05c85 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
-@@ -463,6 +463,12 @@ config SPI_RT2880
+@@ -472,6 +472,12 @@ config SPI_RT2880
help
This selects a driver for the Ralink RT288x/RT305x SPI Controller.
@@ -28,11 +26,9 @@ index 7c592ce..2f05c85 100644
config SPI_S3C24XX
tristate "Samsung S3C24XX series SPI"
depends on ARCH_S3C24XX
-diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
-index 3d690ef..5389710 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
-@@ -49,6 +49,7 @@ obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mpc512x-psc.o
+@@ -50,6 +50,7 @@ obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mp
obj-$(CONFIG_SPI_MPC52xx_PSC) += spi-mpc52xx-psc.o
obj-$(CONFIG_SPI_MPC52xx) += spi-mpc52xx.o
obj-$(CONFIG_SPI_MT65XX) += spi-mt65xx.o
@@ -40,9 +36,6 @@ index 3d690ef..5389710 100644
obj-$(CONFIG_SPI_MXS) += spi-mxs.o
obj-$(CONFIG_SPI_NUC900) += spi-nuc900.o
obj-$(CONFIG_SPI_OC_TINY) += spi-oc-tiny.o
-diff --git a/drivers/spi/spi-mt7621.c b/drivers/spi/spi-mt7621.c
-new file mode 100644
-index 0000000..dedf4a1
--- /dev/null
+++ b/drivers/spi/spi-mt7621.c
@@ -0,0 +1,480 @@
@@ -526,6 +519,3 @@ index 0000000..dedf4a1
+MODULE_DESCRIPTION("MT7621 SPI driver");
+MODULE_AUTHOR("Felix Fietkau <nbd@openwrt.org>");
+MODULE_LICENSE("GPL");
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0044-i2c-MIPS-adds-ralink-I2C-driver.patch b/target/linux/ramips/patches-4.3/0044-i2c-MIPS-adds-ralink-I2C-driver.patch
index f600bd570e..30108fb6d9 100644
--- a/target/linux/ramips/patches-4.3/0044-i2c-MIPS-adds-ralink-I2C-driver.patch
+++ b/target/linux/ramips/patches-4.3/0044-i2c-MIPS-adds-ralink-I2C-driver.patch
@@ -13,9 +13,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 Documentation/devicetree/bindings/i2c/i2c-ralink.txt
create mode 100644 drivers/i2c/busses/i2c-ralink.c
-diff --git a/Documentation/devicetree/bindings/i2c/i2c-ralink.txt b/Documentation/devicetree/bindings/i2c/i2c-ralink.txt
-new file mode 100644
-index 0000000..8fa8ac3
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-ralink.txt
@@ -0,0 +1,27 @@
@@ -46,8 +43,6 @@ index 0000000..8fa8ac3
+ };
+ };
+};
-diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
-index 08b8617..53d565b 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -803,6 +803,10 @@ config I2C_RK3X
@@ -61,8 +56,6 @@ index 08b8617..53d565b 100644
config HAVE_S3C2410_I2C
bool
help
-diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
-index 6df3b30..2edd32c 100644
--- a/drivers/i2c/busses/Makefile
+++ b/drivers/i2c/busses/Makefile
@@ -75,6 +75,7 @@ obj-$(CONFIG_I2C_PNX) += i2c-pnx.o
@@ -73,9 +66,6 @@ index 6df3b30..2edd32c 100644
obj-$(CONFIG_I2C_QUP) += i2c-qup.o
obj-$(CONFIG_I2C_RIIC) += i2c-riic.o
obj-$(CONFIG_I2C_RK3X) += i2c-rk3x.o
-diff --git a/drivers/i2c/busses/i2c-ralink.c b/drivers/i2c/busses/i2c-ralink.c
-new file mode 100644
-index 0000000..debfb18
--- /dev/null
+++ b/drivers/i2c/busses/i2c-ralink.c
@@ -0,0 +1,327 @@
@@ -406,6 +396,3 @@ index 0000000..debfb18
+MODULE_DESCRIPTION("Ralink I2c host driver");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:Ralink-I2C");
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0045-i2c-add-mt7621-driver.patch b/target/linux/ramips/patches-4.3/0045-i2c-add-mt7621-driver.patch
index 17ff8d2bb2..dc961fab34 100644
--- a/target/linux/ramips/patches-4.3/0045-i2c-add-mt7621-driver.patch
+++ b/target/linux/ramips/patches-4.3/0045-i2c-add-mt7621-driver.patch
@@ -11,8 +11,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
3 files changed, 308 insertions(+)
create mode 100644 drivers/i2c/busses/i2c-mt7621.c
-diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
-index 53d565b..073bfe3 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -807,6 +807,10 @@ config I2C_RALINK
@@ -26,8 +24,6 @@ index 53d565b..073bfe3 100644
config HAVE_S3C2410_I2C
bool
help
-diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
-index 2edd32c..764e16e 100644
--- a/drivers/i2c/busses/Makefile
+++ b/drivers/i2c/busses/Makefile
@@ -76,6 +76,7 @@ obj-$(CONFIG_I2C_PUV3) += i2c-puv3.o
@@ -38,9 +34,6 @@ index 2edd32c..764e16e 100644
obj-$(CONFIG_I2C_QUP) += i2c-qup.o
obj-$(CONFIG_I2C_RIIC) += i2c-riic.o
obj-$(CONFIG_I2C_RK3X) += i2c-rk3x.o
-diff --git a/drivers/i2c/busses/i2c-mt7621.c b/drivers/i2c/busses/i2c-mt7621.c
-new file mode 100644
-index 0000000..646ca40
--- /dev/null
+++ b/drivers/i2c/busses/i2c-mt7621.c
@@ -0,0 +1,303 @@
@@ -347,6 +340,3 @@ index 0000000..646ca40
+MODULE_DESCRIPTION("MT7621 I2c host driver");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:MT7621-I2C");
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch b/target/linux/ramips/patches-4.3/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
index dac572f336..079ce4a3f9 100644
--- a/target/linux/ramips/patches-4.3/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
+++ b/target/linux/ramips/patches-4.3/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
@@ -23,18 +23,14 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 drivers/mmc/host/mtk-mmc/mt6575_sd.h
create mode 100644 drivers/mmc/host/mtk-mmc/sd.c
-diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
-index 8a1e349..47833d1 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
-@@ -793,3 +793,5 @@ config MMC_MTK
+@@ -818,3 +818,5 @@ config MMC_MTK
If you have a machine with a integrated SD/MMC card reader, say Y or M here.
This is needed if support for any SD/SDIO/MMC devices is required.
If unsure, say N.
+
+source "drivers/mmc/host/mtk-mmc/Kconfig"
-diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
-index 4f3452a..69dd05f 100644
--- a/drivers/mmc/host/Makefile
+++ b/drivers/mmc/host/Makefile
@@ -2,6 +2,7 @@
@@ -45,9 +41,6 @@ index 4f3452a..69dd05f 100644
obj-$(CONFIG_MMC_ARMMMCI) += mmci.o
obj-$(CONFIG_MMC_QCOM_DML) += mmci_qcom_dml.o
obj-$(CONFIG_MMC_PXA) += pxamci.o
-diff --git a/drivers/mmc/host/mtk-mmc/Kconfig b/drivers/mmc/host/mtk-mmc/Kconfig
-new file mode 100644
-index 0000000..a58b0f3
--- /dev/null
+++ b/drivers/mmc/host/mtk-mmc/Kconfig
@@ -0,0 +1,16 @@
@@ -67,9 +60,6 @@ index 0000000..a58b0f3
+ bool "eMMC 8-bit support"
+ depends on MTK_MMC && RALINK_MT7628
+
-diff --git a/drivers/mmc/host/mtk-mmc/Makefile b/drivers/mmc/host/mtk-mmc/Makefile
-new file mode 100644
-index 0000000..caead0b
--- /dev/null
+++ b/drivers/mmc/host/mtk-mmc/Makefile
@@ -0,0 +1,42 @@
@@ -115,9 +105,6 @@ index 0000000..caead0b
+
+clean:
+ @rm -f *.o modules.order .*.cmd
-diff --git a/drivers/mmc/host/mtk-mmc/board.h b/drivers/mmc/host/mtk-mmc/board.h
-new file mode 100644
-index 0000000..33bfc7b
--- /dev/null
+++ b/drivers/mmc/host/mtk-mmc/board.h
@@ -0,0 +1,137 @@
@@ -258,9 +245,6 @@ index 0000000..33bfc7b
+
+#endif /* __ARCH_ARM_MACH_BOARD_H */
+
-diff --git a/drivers/mmc/host/mtk-mmc/dbg.c b/drivers/mmc/host/mtk-mmc/dbg.c
-new file mode 100644
-index 0000000..4dc115b
--- /dev/null
+++ b/drivers/mmc/host/mtk-mmc/dbg.c
@@ -0,0 +1,347 @@
@@ -611,9 +595,6 @@ index 0000000..4dc115b
+}
+EXPORT_SYMBOL_GPL(msdc_debug_proc_init);
+#endif
-diff --git a/drivers/mmc/host/mtk-mmc/dbg.h b/drivers/mmc/host/mtk-mmc/dbg.h
-new file mode 100644
-index 0000000..e58c431
--- /dev/null
+++ b/drivers/mmc/host/mtk-mmc/dbg.h
@@ -0,0 +1,156 @@
@@ -773,9 +754,6 @@ index 0000000..e58c431
+void msdc_performance(u32 opcode, u32 sizes, u32 bRx, u32 ticks);
+
+#endif
-diff --git a/drivers/mmc/host/mtk-mmc/mt6575_sd.h b/drivers/mmc/host/mtk-mmc/mt6575_sd.h
-new file mode 100644
-index 0000000..e90c4f1
--- /dev/null
+++ b/drivers/mmc/host/mtk-mmc/mt6575_sd.h
@@ -0,0 +1,1001 @@
@@ -1780,9 +1758,6 @@ index 0000000..e90c4f1
+
+#endif
+
-diff --git a/drivers/mmc/host/mtk-mmc/sd.c b/drivers/mmc/host/mtk-mmc/sd.c
-new file mode 100644
-index 0000000..d240b46
--- /dev/null
+++ b/drivers/mmc/host/mtk-mmc/sd.c
@@ -0,0 +1,3060 @@
@@ -4846,6 +4821,3 @@ index 0000000..d240b46
+MODULE_AUTHOR("Infinity Chen <infinity.chen@mediatek.com>");
+
+EXPORT_SYMBOL(msdc_6575_host);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0047-DMA-ralink-add-rt2880-dma-engine.patch b/target/linux/ramips/patches-4.3/0047-DMA-ralink-add-rt2880-dma-engine.patch
index 55a6b0a3d4..3362d4b5fc 100644
--- a/target/linux/ramips/patches-4.3/0047-DMA-ralink-add-rt2880-dma-engine.patch
+++ b/target/linux/ramips/patches-4.3/0047-DMA-ralink-add-rt2880-dma-engine.patch
@@ -12,8 +12,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
4 files changed, 585 insertions(+)
create mode 100644 drivers/dma/ralink-gdma.c
-diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
-index b458475..2d5ae4a 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -40,6 +40,12 @@ config ASYNC_TX_ENABLE_CHANNEL_SWITCH
@@ -29,20 +27,15 @@ index b458475..2d5ae4a 100644
config DMA_ENGINE
bool
-diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
-index 7711a71..b33c434 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
-@@ -65,5 +65,6 @@ obj-$(CONFIG_TI_DMA_CROSSBAR) += ti-dma-crossbar.o
+@@ -65,5 +65,6 @@ obj-$(CONFIG_TI_DMA_CROSSBAR) += ti-dma-
obj-$(CONFIG_TI_EDMA) += edma.o
obj-$(CONFIG_XGENE_DMA) += xgene-dma.o
obj-$(CONFIG_ZX_DMA) += zx296702_dma.o
+obj-$(CONFIG_DMA_RALINK) += ralink-gdma.o
obj-y += xilinx/
-diff --git a/drivers/dma/ralink-gdma.c b/drivers/dma/ralink-gdma.c
-new file mode 100644
-index 0000000..2c3cace
--- /dev/null
+++ b/drivers/dma/ralink-gdma.c
@@ -0,0 +1,577 @@
@@ -623,11 +616,9 @@ index 0000000..2c3cace
+MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
+MODULE_DESCRIPTION("GDMA4740 DMA driver");
+MODULE_LICENSE("GPLv2");
-diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
-index 7ea9184..d371bf1 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
-@@ -496,6 +496,7 @@ static inline void dma_set_unmap(struct dma_async_tx_descriptor *tx,
+@@ -496,6 +496,7 @@ static inline void dma_set_unmap(struct
struct dmaengine_unmap_data *
dmaengine_get_unmap_data(struct device *dev, int nr, gfp_t flags);
void dmaengine_unmap_put(struct dmaengine_unmap_data *unmap);
@@ -635,6 +626,3 @@ index 7ea9184..d371bf1 100644
#else
static inline void dma_set_unmap(struct dma_async_tx_descriptor *tx,
struct dmaengine_unmap_data *unmap)
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0048-asoc-add-mt7620-support.patch b/target/linux/ramips/patches-4.3/0048-asoc-add-mt7620-support.patch
index 004eb68101..e329c316d7 100644
--- a/target/linux/ramips/patches-4.3/0048-asoc-add-mt7620-support.patch
+++ b/target/linux/ramips/patches-4.3/0048-asoc-add-mt7620-support.patch
@@ -18,8 +18,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 sound/soc/ralink/mt7620-i2s.c
create mode 100644 sound/soc/ralink/mt7620-wm8960.c
-diff --git a/arch/mips/ralink/of.c b/arch/mips/ralink/of.c
-index da85bbf..371baa5 100644
--- a/arch/mips/ralink/of.c
+++ b/arch/mips/ralink/of.c
@@ -15,6 +15,7 @@
@@ -38,8 +36,6 @@ index da85bbf..371baa5 100644
__iomem void *rt_memc_membase;
__iomem void *plat_of_remap_node(const char *node)
-diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig
-index 225bfda..76ce95c 100644
--- a/sound/soc/Kconfig
+++ b/sound/soc/Kconfig
@@ -53,6 +53,7 @@ source "sound/soc/mxs/Kconfig"
@@ -50,8 +46,6 @@ index 225bfda..76ce95c 100644
source "sound/soc/samsung/Kconfig"
source "sound/soc/sh/Kconfig"
source "sound/soc/sirf/Kconfig"
-diff --git a/sound/soc/Makefile b/sound/soc/Makefile
-index 134aca1..e9d8e0e 100644
--- a/sound/soc/Makefile
+++ b/sound/soc/Makefile
@@ -35,6 +35,7 @@ obj-$(CONFIG_SND_SOC) += kirkwood/
@@ -62,9 +56,6 @@ index 134aca1..e9d8e0e 100644
obj-$(CONFIG_SND_SOC) += samsung/
obj-$(CONFIG_SND_SOC) += sh/
obj-$(CONFIG_SND_SOC) += sirf/
-diff --git a/sound/soc/ralink/Kconfig b/sound/soc/ralink/Kconfig
-new file mode 100644
-index 0000000..d462622
--- /dev/null
+++ b/sound/soc/ralink/Kconfig
@@ -0,0 +1,15 @@
@@ -83,9 +74,6 @@ index 0000000..d462622
+ help
+ Say Y if you want to add support for ASoC audio on the Qi LB60 board
+ a.k.a Qi Ben NanoNote.
-diff --git a/sound/soc/ralink/Makefile b/sound/soc/ralink/Makefile
-new file mode 100644
-index 0000000..3d79980
--- /dev/null
+++ b/sound/soc/ralink/Makefile
@@ -0,0 +1,11 @@
@@ -100,9 +88,6 @@ index 0000000..3d79980
+snd-soc-mt7620-wm8960-objs := mt7620-wm8960.o
+
+obj-$(CONFIG_SND_MT7620_SOC_WM8960) += snd-soc-mt7620-wm8960.o
-diff --git a/sound/soc/ralink/mt7620-i2s.c b/sound/soc/ralink/mt7620-i2s.c
-new file mode 100644
-index 0000000..2ce9b21
--- /dev/null
+++ b/sound/soc/ralink/mt7620-i2s.c
@@ -0,0 +1,436 @@
@@ -542,9 +527,6 @@ index 0000000..2ce9b21
+MODULE_DESCRIPTION("Ingenic JZ4740 SoC I2S driver");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:mt7620-i2s");
-diff --git a/sound/soc/ralink/mt7620-wm8960.c b/sound/soc/ralink/mt7620-wm8960.c
-new file mode 100644
-index 0000000..3389988
--- /dev/null
+++ b/sound/soc/ralink/mt7620-wm8960.c
@@ -0,0 +1,233 @@
@@ -781,6 +763,3 @@ index 0000000..3389988
+MODULE_DESCRIPTION("Freescale i.MX WM8962 ASoC machine driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:mt7620-wm8962");
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0049-watchdog-add-MT7621-support.patch b/target/linux/ramips/patches-4.3/0049-watchdog-add-MT7621-support.patch
index 0d410bb28a..e1127dc2d4 100644
--- a/target/linux/ramips/patches-4.3/0049-watchdog-add-MT7621-support.patch
+++ b/target/linux/ramips/patches-4.3/0049-watchdog-add-MT7621-support.patch
@@ -11,11 +11,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
3 files changed, 193 insertions(+)
create mode 100644 drivers/watchdog/mt7621_wdt.c
-diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
-index 79e1aa1..0710aa1 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
-@@ -1337,6 +1337,13 @@ config RALINK_WDT
+@@ -1346,6 +1346,13 @@ config RALINK_WDT
help
Hardware driver for the Ralink SoC Watchdog Timer.
@@ -29,11 +27,9 @@ index 79e1aa1..0710aa1 100644
# PARISC Architecture
# POWERPC Architecture
-diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
-index 0c616e3..4d3b4b1 100644
--- a/drivers/watchdog/Makefile
+++ b/drivers/watchdog/Makefile
-@@ -68,6 +68,7 @@ obj-$(CONFIG_MESON_WATCHDOG) += meson_wdt.o
+@@ -68,6 +68,7 @@ obj-$(CONFIG_MESON_WATCHDOG) += meson_wd
obj-$(CONFIG_MEDIATEK_WATCHDOG) += mtk_wdt.o
obj-$(CONFIG_DIGICOLOR_WATCHDOG) += digicolor_wdt.o
obj-$(CONFIG_LPC18XX_WATCHDOG) += lpc18xx_wdt.o
@@ -41,9 +37,6 @@ index 0c616e3..4d3b4b1 100644
# AVR32 Architecture
obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
-diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
-new file mode 100644
-index 0000000..ec2c897
--- /dev/null
+++ b/drivers/watchdog/mt7621_wdt.c
@@ -0,0 +1,185 @@
@@ -232,6 +225,3 @@ index 0000000..ec2c897
+MODULE_AUTHOR("John Crispin <blogic@openwrt.org");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0050-alsa-add-ralink-sdk-driver.patch b/target/linux/ramips/patches-4.3/0050-alsa-add-ralink-sdk-driver.patch
index 1048396231..c6fe92c158 100644
--- a/target/linux/ramips/patches-4.3/0050-alsa-add-ralink-sdk-driver.patch
+++ b/target/linux/ramips/patches-4.3/0050-alsa-add-ralink-sdk-driver.patch
@@ -41,8 +41,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 sound/soc/mtk/ralink_gdma.c
create mode 100644 sound/soc/mtk/ralink_gdma.h
-diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig
-index 76ce95c..09aa2c7 100644
--- a/sound/soc/Kconfig
+++ b/sound/soc/Kconfig
@@ -64,6 +64,7 @@ source "sound/soc/txx9/Kconfig"
@@ -53,8 +51,6 @@ index 76ce95c..09aa2c7 100644
# Supported codecs
source "sound/soc/codecs/Kconfig"
-diff --git a/sound/soc/Makefile b/sound/soc/Makefile
-index e9d8e0e..a3c6b43 100644
--- a/sound/soc/Makefile
+++ b/sound/soc/Makefile
@@ -46,3 +46,4 @@ obj-$(CONFIG_SND_SOC) += txx9/
@@ -62,8 +58,6 @@ index e9d8e0e..a3c6b43 100644
obj-$(CONFIG_SND_SOC) += xtensa/
obj-$(CONFIG_SND_SOC) += zte/
+obj-$(CONFIG_SND_SOC) += mtk/
-diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
-index 0c9733e..276a4c5 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -816,7 +816,7 @@ config SND_SOC_WM8955
@@ -75,8 +69,6 @@ index 0c9733e..276a4c5 100644
config SND_SOC_WM8961
tristate
-diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
-index dbd8840..3118f5c 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -27,6 +27,7 @@
@@ -87,7 +79,7 @@ index dbd8840..3118f5c 100644
/* R25 - Power 1 */
#define WM8960_VMID_MASK 0x180
-@@ -57,10 +58,10 @@ static int wm8960_set_pll(struct snd_soc_codec *codec,
+@@ -57,10 +58,10 @@ static int wm8960_set_pll(struct snd_soc
* using 2 wire for device control, so we cache them instead.
*/
static const struct reg_default wm8960_reg_defaults[] = {
@@ -102,7 +94,7 @@ index dbd8840..3118f5c 100644
{ 0x4, 0x0000 },
{ 0x5, 0x0008 },
{ 0x6, 0x0000 },
-@@ -92,8 +93,8 @@ static const struct reg_default wm8960_reg_defaults[] = {
+@@ -92,8 +93,8 @@ static const struct reg_default wm8960_r
{ 0x25, 0x0050 },
{ 0x26, 0x0000 },
{ 0x27, 0x0000 },
@@ -129,7 +121,7 @@ index dbd8840..3118f5c 100644
/* enumerated controls */
static const char *wm8960_polarity[] = {"No Inversion", "Left Inverted",
-@@ -192,8 +201,8 @@ static int wm8960_get_deemph(struct snd_kcontrol *kcontrol,
+@@ -192,8 +201,8 @@ static int wm8960_get_deemph(struct snd_
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
@@ -140,7 +132,7 @@ index dbd8840..3118f5c 100644
}
static int wm8960_put_deemph(struct snd_kcontrol *kcontrol,
-@@ -211,6 +220,71 @@ static int wm8960_put_deemph(struct snd_kcontrol *kcontrol,
+@@ -211,6 +220,71 @@ static int wm8960_put_deemph(struct snd_
return wm8960_set_deemph(codec);
}
@@ -212,7 +204,7 @@ index dbd8840..3118f5c 100644
static const DECLARE_TLV_DB_SCALE(adc_tlv, -9750, 50, 1);
static const DECLARE_TLV_DB_SCALE(inpga_tlv, -1725, 75, 0);
static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1);
-@@ -563,6 +637,7 @@ static int wm8960_set_dai_fmt(struct snd_soc_dai *codec_dai,
+@@ -563,6 +637,7 @@ static int wm8960_set_dai_fmt(struct snd
/* set iface */
snd_soc_write(codec, WM8960_IFACE1, iface);
@@ -220,7 +212,7 @@ index dbd8840..3118f5c 100644
return 0;
}
-@@ -809,9 +884,10 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec,
+@@ -809,9 +884,10 @@ static int wm8960_set_bias_level_out3(st
ret = wm8960_configure_clocking(codec);
if (ret)
return ret;
@@ -232,7 +224,7 @@ index dbd8840..3118f5c 100644
break;
case SND_SOC_BIAS_ON:
-@@ -852,12 +928,16 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec,
+@@ -852,12 +928,16 @@ static int wm8960_set_bias_level_out3(st
/* Disable anti-pop features */
snd_soc_write(codec, WM8960_APOP1, WM8960_BUFIOEN);
}
@@ -250,7 +242,7 @@ index dbd8840..3118f5c 100644
/* Enable anti-pop features */
snd_soc_write(codec, WM8960_APOP1,
WM8960_POBCTRL | WM8960_SOFT_ST |
-@@ -866,6 +946,7 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec,
+@@ -866,6 +946,7 @@ static int wm8960_set_bias_level_out3(st
/* Disable VMID and VREF, let them discharge */
snd_soc_write(codec, WM8960_POWER1, 0);
msleep(600);
@@ -258,24 +250,24 @@ index dbd8840..3118f5c 100644
break;
}
-@@ -1101,10 +1182,15 @@ static int wm8960_set_pll(struct snd_soc_codec *codec,
+@@ -1101,10 +1182,15 @@ static int wm8960_set_pll(struct snd_soc
if (pll_div.k) {
reg |= 0x20;
-
+#if 1
- snd_soc_write(codec, WM8960_PLL2, (pll_div.k >> 16) & 0xff);
- snd_soc_write(codec, WM8960_PLL3, (pll_div.k >> 8) & 0xff);
- snd_soc_write(codec, WM8960_PLL4, pll_div.k & 0xff);
-+#else
+ snd_soc_write(codec, WM8960_PLL2, (pll_div.k >> 16) & 0xff);
+ snd_soc_write(codec, WM8960_PLL3, (pll_div.k >> 8) & 0xff);
+ snd_soc_write(codec, WM8960_PLL4, pll_div.k & 0xff);
++#else
+ snd_soc_write(codec, WM8960_PLL2, (pll_div.k >> 16) & 0xff);
+ snd_soc_write(codec, WM8960_PLL3, (pll_div.k >> 8) & 0xff);
+ snd_soc_write(codec, WM8960_PLL4, pll_div.k & 0xff);
+#endif
}
snd_soc_write(codec, WM8960_PLL1, reg);
-@@ -1150,7 +1236,11 @@ static int wm8960_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
+@@ -1150,7 +1236,11 @@ static int wm8960_set_dai_clkdiv(struct
snd_soc_write(codec, WM8960_PLL1, reg | div);
break;
case WM8960_DCLKDIV:
@@ -287,7 +279,7 @@ index dbd8840..3118f5c 100644
snd_soc_write(codec, WM8960_CLOCK2, reg | div);
break;
case WM8960_TOCLKSEL:
-@@ -1285,7 +1375,7 @@ static int wm8960_i2c_probe(struct i2c_client *i2c,
+@@ -1285,7 +1375,7 @@ static int wm8960_i2c_probe(struct i2c_c
{
struct wm8960_data *pdata = dev_get_platdata(&i2c->dev);
struct wm8960_priv *wm8960;
@@ -296,7 +288,7 @@ index dbd8840..3118f5c 100644
wm8960 = devm_kzalloc(&i2c->dev, sizeof(struct wm8960_priv),
GFP_KERNEL);
-@@ -1307,11 +1397,7 @@ static int wm8960_i2c_probe(struct i2c_client *i2c,
+@@ -1307,11 +1397,7 @@ static int wm8960_i2c_probe(struct i2c_c
else if (i2c->dev.of_node)
wm8960_set_pdata_from_of(i2c, &wm8960->pdata);
@@ -309,8 +301,6 @@ index dbd8840..3118f5c 100644
if (wm8960->pdata.shared_lrclk) {
ret = regmap_update_bits(wm8960->regmap, WM8960_ADDCTL2,
-diff --git a/sound/soc/codecs/wm8960.h b/sound/soc/codecs/wm8960.h
-index ab3220d..5205deb 100644
--- a/sound/soc/codecs/wm8960.h
+++ b/sound/soc/codecs/wm8960.h
@@ -111,4 +111,68 @@
@@ -382,9 +372,6 @@ index ab3220d..5205deb 100644
+#define RINV_RINVOL(x) ((x) & 0x3f)
+
#endif
-diff --git a/sound/soc/mtk/Kconfig b/sound/soc/mtk/Kconfig
-new file mode 100644
-index 0000000..26d2531
--- /dev/null
+++ b/sound/soc/mtk/Kconfig
@@ -0,0 +1,35 @@
@@ -423,9 +410,6 @@ index 0000000..26d2531
+ tristate "MTK SoC I2S Support"
+ depends on SND_MT76XX_SOC
+
-diff --git a/sound/soc/mtk/Makefile b/sound/soc/mtk/Makefile
-new file mode 100644
-index 0000000..00b3dff
--- /dev/null
+++ b/sound/soc/mtk/Makefile
@@ -0,0 +1,39 @@
@@ -468,9 +452,6 @@ index 0000000..00b3dff
+
+
+
-diff --git a/sound/soc/mtk/i2c_wm8960.c b/sound/soc/mtk/i2c_wm8960.c
-new file mode 100644
-index 0000000..70f16e1
--- /dev/null
+++ b/sound/soc/mtk/i2c_wm8960.c
@@ -0,0 +1,492 @@
@@ -966,9 +947,6 @@ index 0000000..70f16e1
+MODULE_DESCRIPTION("WM8960 I2C client driver");
+MODULE_LICENSE("GPL");
+
-diff --git a/sound/soc/mtk/i2c_wm8960.h b/sound/soc/mtk/i2c_wm8960.h
-new file mode 100644
-index 0000000..c769345
--- /dev/null
+++ b/sound/soc/mtk/i2c_wm8960.h
@@ -0,0 +1,288 @@
@@ -1260,9 +1238,6 @@ index 0000000..c769345
+void audiohw_bypass(void);
+
+#endif /* _WM875x_H */
-diff --git a/sound/soc/mtk/i2s_ctrl.c b/sound/soc/mtk/i2s_ctrl.c
-new file mode 100644
-index 0000000..05034b0
--- /dev/null
+++ b/sound/soc/mtk/i2s_ctrl.c
@@ -0,0 +1,3524 @@
@@ -4790,9 +4765,6 @@ index 0000000..05034b0
+#else
+module_param (i2sdrv_major, int, 0);
+#endif
-diff --git a/sound/soc/mtk/i2s_ctrl.h b/sound/soc/mtk/i2s_ctrl.h
-new file mode 100644
-index 0000000..b762c9c
--- /dev/null
+++ b/sound/soc/mtk/i2s_ctrl.h
@@ -0,0 +1,523 @@
@@ -5319,9 +5291,6 @@ index 0000000..b762c9c
+
+#endif /* __RALINK_I2S_H_ */
+
-diff --git a/sound/soc/mtk/i2s_debug.c b/sound/soc/mtk/i2s_debug.c
-new file mode 100644
-index 0000000..9f61b14
--- /dev/null
+++ b/sound/soc/mtk/i2s_debug.c
@@ -0,0 +1,698 @@
@@ -6023,9 +5992,6 @@ index 0000000..9f61b14
+
+ return 0;
+}
-diff --git a/sound/soc/mtk/mt76xx_i2s.c b/sound/soc/mtk/mt76xx_i2s.c
-new file mode 100644
-index 0000000..7615b51
--- /dev/null
+++ b/sound/soc/mtk/mt76xx_i2s.c
@@ -0,0 +1,304 @@
@@ -6333,9 +6299,6 @@ index 0000000..7615b51
+MODULE_DESCRIPTION("Stretch MT76xx I2S Interface");
+MODULE_LICENSE("GPL");
+#endif
-diff --git a/sound/soc/mtk/mt76xx_i2s.h b/sound/soc/mtk/mt76xx_i2s.h
-new file mode 100644
-index 0000000..9ae0e50
--- /dev/null
+++ b/sound/soc/mtk/mt76xx_i2s.h
@@ -0,0 +1,18 @@
@@ -6357,9 +6320,6 @@ index 0000000..9ae0e50
+
+#include "i2s_ctrl.h"
+#endif /* MTK_I2S_H_ */
-diff --git a/sound/soc/mtk/mt76xx_machine.c b/sound/soc/mtk/mt76xx_machine.c
-new file mode 100644
-index 0000000..00d2145
--- /dev/null
+++ b/sound/soc/mtk/mt76xx_machine.c
@@ -0,0 +1,317 @@
@@ -6680,9 +6640,6 @@ index 0000000..00d2145
+module_exit(mt76xx_machine_exit);
+//EXPORT_SYMBOL_GPL(mt76xx_soc_platform);
+MODULE_LICENSE("GPL");
-diff --git a/sound/soc/mtk/mt76xx_machine.h b/sound/soc/mtk/mt76xx_machine.h
-new file mode 100644
-index 0000000..79532b5
--- /dev/null
+++ b/sound/soc/mtk/mt76xx_machine.h
@@ -0,0 +1,21 @@
@@ -6707,9 +6664,6 @@ index 0000000..79532b5
+#endif
+
+#endif /* MT76XX_MACHINE_H_ */
-diff --git a/sound/soc/mtk/mt76xx_pcm.c b/sound/soc/mtk/mt76xx_pcm.c
-new file mode 100644
-index 0000000..1100ee0
--- /dev/null
+++ b/sound/soc/mtk/mt76xx_pcm.c
@@ -0,0 +1,499 @@
@@ -7212,9 +7166,6 @@ index 0000000..1100ee0
+MODULE_DESCRIPTION("MTK APSoC I2S DMA driver");
+MODULE_LICENSE("GPL");
+
-diff --git a/sound/soc/mtk/ralink_gdma.c b/sound/soc/mtk/ralink_gdma.c
-new file mode 100644
-index 0000000..b385f05
--- /dev/null
+++ b/sound/soc/mtk/ralink_gdma.c
@@ -0,0 +1,918 @@
@@ -8136,9 +8087,6 @@ index 0000000..b385f05
+MODULE_AUTHOR("Steven Liu <steven_liu@ralinktech.com.tw>");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(MOD_VERSION);
-diff --git a/sound/soc/mtk/ralink_gdma.h b/sound/soc/mtk/ralink_gdma.h
-new file mode 100644
-index 0000000..95ce5f7
--- /dev/null
+++ b/sound/soc/mtk/ralink_gdma.h
@@ -0,0 +1,326 @@
@@ -8468,11 +8416,9 @@ index 0000000..95ce5f7
+
+
+#endif
-diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
-index 6173d15..d9c52a7 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
-@@ -1758,7 +1758,8 @@ static int soc_probe(struct platform_device *pdev)
+@@ -1758,7 +1758,8 @@ static int soc_probe(struct platform_dev
/* Bodge while we unpick instantiation */
card->dev = &pdev->dev;
@@ -8482,6 +8428,3 @@ index 6173d15..d9c52a7 100644
}
static int soc_cleanup_card_resources(struct snd_soc_card *card)
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0051-serial-add-ugly-custom-baud-rate-hack.patch b/target/linux/ramips/patches-4.3/0051-serial-add-ugly-custom-baud-rate-hack.patch
index 361b8d718a..f6450367cf 100644
--- a/target/linux/ramips/patches-4.3/0051-serial-add-ugly-custom-baud-rate-hack.patch
+++ b/target/linux/ramips/patches-4.3/0051-serial-add-ugly-custom-baud-rate-hack.patch
@@ -8,11 +8,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/tty/serial/serial_core.c | 3 +++
1 file changed, 3 insertions(+)
-diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
-index 603d2cc..4020e07 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
-@@ -359,6 +359,9 @@ uart_get_baud_rate(struct uart_port *port, struct ktermios *termios,
+@@ -359,6 +359,9 @@ uart_get_baud_rate(struct uart_port *por
break;
}
@@ -22,6 +20,3 @@ index 603d2cc..4020e07 100644
for (try = 0; try < 2; try++) {
baud = tty_termios_baud_rate(termios);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0052-pwm-add-mediatek-support.patch b/target/linux/ramips/patches-4.3/0052-pwm-add-mediatek-support.patch
index caaf84aab3..cb5d02494c 100644
--- a/target/linux/ramips/patches-4.3/0052-pwm-add-mediatek-support.patch
+++ b/target/linux/ramips/patches-4.3/0052-pwm-add-mediatek-support.patch
@@ -11,8 +11,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
3 files changed, 183 insertions(+)
create mode 100644 drivers/pwm/pwm-mediatek.c
-diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
-index 062630a..76974ea 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -230,6 +230,15 @@ config PWM_LPSS_PLATFORM
@@ -31,11 +29,9 @@ index 062630a..76974ea 100644
config PWM_MXS
tristate "Freescale MXS PWM support"
depends on ARCH_MXS && OF
-diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
-index a0e00c0..aa0bd2e 100644
--- a/drivers/pwm/Makefile
+++ b/drivers/pwm/Makefile
-@@ -20,6 +20,7 @@ obj-$(CONFIG_PWM_LPC32XX) += pwm-lpc32xx.o
+@@ -20,6 +20,7 @@ obj-$(CONFIG_PWM_LPC32XX) += pwm-lpc32xx
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
@@ -43,9 +39,6 @@ index a0e00c0..aa0bd2e 100644
obj-$(CONFIG_PWM_MXS) += pwm-mxs.o
obj-$(CONFIG_PWM_PCA9685) += pwm-pca9685.o
obj-$(CONFIG_PWM_PUV3) += pwm-puv3.o
-diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c
-new file mode 100644
-index 0000000..f9d8ed4
--- /dev/null
+++ b/drivers/pwm/pwm-mediatek.c
@@ -0,0 +1,173 @@
@@ -222,6 +215,3 @@ index 0000000..f9d8ed4
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
+MODULE_ALIAS("platform:mtk-pwm");
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0060-mt7621-set-up-palmbus-memory-region.patch b/target/linux/ramips/patches-4.3/0060-mt7621-set-up-palmbus-memory-region.patch
deleted file mode 100644
index ba462bf92e..0000000000
--- a/target/linux/ramips/patches-4.3/0060-mt7621-set-up-palmbus-memory-region.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/arch/mips/include/asm/mach-ralink/mt7621.h
-+++ b/arch/mips/include/asm/mach-ralink/mt7621.h
-@@ -13,6 +13,9 @@
- #ifndef _MT7621_REGS_H_
- #define _MT7621_REGS_H_
-
-+#define MT7621_PALMBUS_BASE 0x1C000000
-+#define MT7621_PALMBUS_SIZE 0x03FFFFFF
-+
- #define MT7621_SYSC_BASE 0x1E000000
-
- #define SYSC_REG_CHIP_NAME0 0x00
---- a/arch/mips/ralink/mt7621.c
-+++ b/arch/mips/ralink/mt7621.c
-@@ -204,6 +204,21 @@ void prom_soc_init(struct ralink_soc_inf
- mips_cm_probe();
- mips_cpc_probe();
-
-+ if (mips_cm_numiocu()) {
-+ /* mips_cm_probe() wipes out bootloader
-+ config for CM regions and we have to configure them
-+ again. This SoC cannot talk to pamlbus devices
-+ witout proper iocu region set up.
-+
-+ FIXME: it would be better to do this with values
-+ from DT, but we need this very early because
-+ without this we cannot talk to pretty much anything
-+ including serial.
-+ */
-+ write_gcr_reg0_base(MT7621_PALMBUS_BASE);
-+ write_gcr_reg0_mask(~MT7621_PALMBUS_SIZE | CM_GCR_REGn_MASK_CMTGT_IOCU0);
-+ }
-+
- if (!register_cps_smp_ops())
- return;
- if (!register_cmp_smp_ops())
diff --git a/target/linux/ramips/patches-4.3/0061-mt7621-set-up-pci-memory-region.patch b/target/linux/ramips/patches-4.3/0061-mt7621-set-up-pci-memory-region.patch
deleted file mode 100644
index e6338a9478..0000000000
--- a/target/linux/ramips/patches-4.3/0061-mt7621-set-up-pci-memory-region.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/arch/mips/pci/pci-mt7621.c
-+++ b/arch/mips/pci/pci-mt7621.c
-@@ -46,6 +46,7 @@
- #include <linux/version.h>
- #include <asm/pci.h>
- #include <asm/io.h>
-+#include <asm/mips-cm.h>
- #include <linux/init.h>
- #include <linux/module.h>
- #include <linux/delay.h>
-@@ -553,6 +554,23 @@ set_phy_for_ssc(void)
- #endif
- }
-
-+void setup_cm_memory_region(struct resource *mem_resource)
-+{
-+ resource_size_t mask;
-+ if (mips_cm_numiocu()) {
-+ /* FIXME: hardware doesn't accept mask values with 1s after
-+ 0s (e.g. 0xffef), so it would be great to warn if that's
-+ about to happen */
-+ mask = ~(mem_resource->end - mem_resource->start);
-+
-+ write_gcr_reg1_base(mem_resource->start);
-+ write_gcr_reg1_mask(mask | CM_GCR_REGn_MASK_CMTGT_IOCU0);
-+ printk("PCI coherence region base: 0x%08lx, mask/settings: 0x%08lx\n",
-+ read_gcr_reg1_base(),
-+ read_gcr_reg1_mask());
-+ }
-+}
-+
- static int mt7621_pci_probe(struct platform_device *pdev)
- {
- unsigned long val = 0;
-@@ -780,6 +798,7 @@ pcie(2/1/0) link status pcie2_num pcie1_
- }
-
- pci_load_of_ranges(&mt7621_controller, pdev->dev.of_node);
-+ setup_cm_memory_region(mt7621_controller.mem_resource);
- register_pci_controller(&mt7621_controller);
- return 0;
-
diff --git a/target/linux/ramips/patches-4.3/0062-remove-cm-memory-regions-cleanup-hack.patch b/target/linux/ramips/patches-4.3/0062-remove-cm-memory-regions-cleanup-hack.patch
deleted file mode 100644
index 9013819492..0000000000
--- a/target/linux/ramips/patches-4.3/0062-remove-cm-memory-regions-cleanup-hack.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/arch/mips/kernel/mips-cm.c
-+++ b/arch/mips/kernel/mips-cm.c
-@@ -238,7 +238,7 @@ int mips_cm_probe(void)
- write_gcr_base(base_reg);
-
- /* disable CM regions */
--/* write_gcr_reg0_base(CM_GCR_REGn_BASE_BASEADDR_MSK);
-+ write_gcr_reg0_base(CM_GCR_REGn_BASE_BASEADDR_MSK);
- write_gcr_reg0_mask(CM_GCR_REGn_MASK_ADDRMASK_MSK);
- write_gcr_reg1_base(CM_GCR_REGn_BASE_BASEADDR_MSK);
- write_gcr_reg1_mask(CM_GCR_REGn_MASK_ADDRMASK_MSK);
-@@ -246,7 +246,7 @@ int mips_cm_probe(void)
- write_gcr_reg2_mask(CM_GCR_REGn_MASK_ADDRMASK_MSK);
- write_gcr_reg3_base(CM_GCR_REGn_BASE_BASEADDR_MSK);
- write_gcr_reg3_mask(CM_GCR_REGn_MASK_ADDRMASK_MSK);
--*/
-+
- /* probe for an L2-only sync region */
- mips_cm_probe_l2sync();
-
diff --git a/target/linux/ramips/patches-4.3/0100-mtd-split-remove-padding.patch b/target/linux/ramips/patches-4.3/0100-mtd-split-remove-padding.patch
index 81702c28e8..b57019631d 100644
--- a/target/linux/ramips/patches-4.3/0100-mtd-split-remove-padding.patch
+++ b/target/linux/ramips/patches-4.3/0100-mtd-split-remove-padding.patch
@@ -1,6 +1,6 @@
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
-@@ -819,9 +819,6 @@ static void split_uimage(struct mtd_info
+@@ -792,9 +792,6 @@ static void split_uimage(struct mtd_info
return;
len = be32_to_cpu(hdr.size) + 0x40;
diff --git a/target/linux/ramips/patches-4.3/0101-mtd-add-rtn56u-support.patch b/target/linux/ramips/patches-4.3/0101-mtd-add-rtn56u-support.patch
index 50b88dbcd3..483c1619dd 100644
--- a/target/linux/ramips/patches-4.3/0101-mtd-add-rtn56u-support.patch
+++ b/target/linux/ramips/patches-4.3/0101-mtd-add-rtn56u-support.patch
@@ -1,6 +1,6 @@
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
-@@ -807,8 +807,11 @@ static void split_uimage(struct mtd_info
+@@ -780,8 +780,11 @@ static void split_uimage(struct mtd_info
{
struct {
__be32 magic;
@@ -13,7 +13,7 @@
} hdr;
size_t len;
-@@ -818,7 +821,10 @@ static void split_uimage(struct mtd_info
+@@ -791,7 +794,10 @@ static void split_uimage(struct mtd_info
if (len != sizeof(hdr) || hdr.magic != cpu_to_be32(UBOOT_MAGIC))
return;
diff --git a/target/linux/ramips/patches-4.3/0104-fix_bootargs_handling.patch b/target/linux/ramips/patches-4.3/0104-fix_bootargs_handling.patch
index 9f76aa1f5b..5095d68df4 100644
--- a/target/linux/ramips/patches-4.3/0104-fix_bootargs_handling.patch
+++ b/target/linux/ramips/patches-4.3/0104-fix_bootargs_handling.patch
@@ -36,5 +36,5 @@
+ if (chosen_dtb)
+ strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
- of_scan_flat_dt(early_init_dt_find_memory, NULL);
- if (memory_dtb)
+ strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
+
diff --git a/target/linux/ramips/patches-4.3/0500-Documentation-DT-net-add-docs-for-ralink-mediatek-So.patch b/target/linux/ramips/patches-4.3/0500-Documentation-DT-net-add-docs-for-ralink-mediatek-So.patch
index 46e4f5bbec..2c726f6732 100644
--- a/target/linux/ramips/patches-4.3/0500-Documentation-DT-net-add-docs-for-ralink-mediatek-So.patch
+++ b/target/linux/ramips/patches-4.3/0500-Documentation-DT-net-add-docs-for-ralink-mediatek-So.patch
@@ -20,9 +20,6 @@ Cc: devicetree@vger.kernel.org
create mode 100644 Documentation/devicetree/bindings/net/ralink,rt2880-net.txt
create mode 100644 Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt
-diff --git a/Documentation/devicetree/bindings/net/mediatek,mt7620-gsw.txt b/Documentation/devicetree/bindings/net/mediatek,mt7620-gsw.txt
-new file mode 100644
-index 0000000..fb47d8e
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/mediatek,mt7620-gsw.txt
@@ -0,0 +1,26 @@
@@ -52,9 +49,6 @@ index 0000000..fb47d8e
+ interrupt-parent = <&intc>;
+ interrupts = <17>;
+};
-diff --git a/Documentation/devicetree/bindings/net/ralink,rt2880-net.txt b/Documentation/devicetree/bindings/net/ralink,rt2880-net.txt
-new file mode 100644
-index 0000000..88b095d
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ralink,rt2880-net.txt
@@ -0,0 +1,61 @@
@@ -119,9 +113,6 @@ index 0000000..88b095d
+ };
+
+};
-diff --git a/Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt b/Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt
-new file mode 100644
-index 0000000..ed32e21
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt
@@ -0,0 +1,32 @@
@@ -157,6 +148,3 @@ index 0000000..ed32e21
+ interrupt-parent = <&intc>;
+ interrupts = <17>;
+};
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0501-net-next-mediatek-add-the-drivers-core-files.patch b/target/linux/ramips/patches-4.3/0501-net-next-mediatek-add-the-drivers-core-files.patch
index c012a8dc59..e94c1fab05 100644
--- a/target/linux/ramips/patches-4.3/0501-net-next-mediatek-add-the-drivers-core-files.patch
+++ b/target/linux/ramips/patches-4.3/0501-net-next-mediatek-add-the-drivers-core-files.patch
@@ -44,9 +44,6 @@ Signed-off-by: Michael Lee <igvtee@gmail.com>
create mode 100644 drivers/net/ethernet/mediatek/mtk_eth_soc.c
create mode 100644 drivers/net/ethernet/mediatek/mtk_eth_soc.h
-diff --git a/drivers/net/ethernet/mediatek/ethtool.c b/drivers/net/ethernet/mediatek/ethtool.c
-new file mode 100644
-index 0000000..697cd80
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/ethtool.c
@@ -0,0 +1,235 @@
@@ -285,9 +282,6 @@ index 0000000..697cd80
+
+ netdev->ethtool_ops = &fe_ethtool_ops;
+}
-diff --git a/drivers/net/ethernet/mediatek/ethtool.h b/drivers/net/ethernet/mediatek/ethtool.h
-new file mode 100644
-index 0000000..955b84f
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/ethtool.h
@@ -0,0 +1,22 @@
@@ -313,9 +307,6 @@ index 0000000..955b84f
+void fe_set_ethtool_ops(struct net_device *netdev);
+
+#endif /* FE_ETHTOOL_H */
-diff --git a/drivers/net/ethernet/mediatek/mdio.c b/drivers/net/ethernet/mediatek/mdio.c
-new file mode 100644
-index 0000000..169c937
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/mdio.c
@@ -0,0 +1,258 @@
@@ -577,9 +568,6 @@ index 0000000..169c937
+ of_node_put(priv->mii_bus->dev.of_node);
+ kfree(priv->mii_bus);
+}
-diff --git a/drivers/net/ethernet/mediatek/mdio.h b/drivers/net/ethernet/mediatek/mdio.h
-new file mode 100644
-index 0000000..b7d4a24
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/mdio.h
@@ -0,0 +1,27 @@
@@ -610,9 +598,6 @@ index 0000000..b7d4a24
+static inline void fe_mdio_cleanup(struct fe_priv *priv) {}
+#endif
+#endif
-diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-new file mode 100644
-index 0000000..dae7147
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -0,0 +1,1607 @@
@@ -2223,9 +2208,6 @@ index 0000000..dae7147
+MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
+MODULE_DESCRIPTION("Ethernet driver for Ralink SoC");
+MODULE_VERSION(MTK_FE_DRV_VERSION);
-diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-new file mode 100644
-index 0000000..ba5ba07
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -0,0 +1,522 @@
@@ -2751,6 +2733,3 @@ index 0000000..ba5ba07
+}
+
+#endif /* FE_ETH_H */
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0502-net-next-mediatek-add-switch-driver-for-rt3050.patch b/target/linux/ramips/patches-4.3/0502-net-next-mediatek-add-switch-driver-for-rt3050.patch
index 064298af52..675888f980 100644
--- a/target/linux/ramips/patches-4.3/0502-net-next-mediatek-add-switch-driver-for-rt3050.patch
+++ b/target/linux/ramips/patches-4.3/0502-net-next-mediatek-add-switch-driver-for-rt3050.patch
@@ -14,9 +14,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 drivers/net/ethernet/mediatek/esw_rt3050.c
create mode 100644 drivers/net/ethernet/mediatek/esw_rt3050.h
-diff --git a/drivers/net/ethernet/mediatek/esw_rt3050.c b/drivers/net/ethernet/mediatek/esw_rt3050.c
-new file mode 100644
-index 0000000..f07f4a5
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/esw_rt3050.c
@@ -0,0 +1,640 @@
@@ -660,9 +657,6 @@ index 0000000..f07f4a5
+{
+ platform_driver_unregister(&esw_driver);
+}
-diff --git a/drivers/net/ethernet/mediatek/esw_rt3050.h b/drivers/net/ethernet/mediatek/esw_rt3050.h
-new file mode 100644
-index 0000000..455107a
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/esw_rt3050.h
@@ -0,0 +1,29 @@
@@ -695,6 +689,3 @@ index 0000000..455107a
+
+#endif
+#endif
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0503-net-next-mediatek-add-switch-driver-for-mt7620.patch b/target/linux/ramips/patches-4.3/0503-net-next-mediatek-add-switch-driver-for-mt7620.patch
index a338f671c9..325321eb12 100644
--- a/target/linux/ramips/patches-4.3/0503-net-next-mediatek-add-switch-driver-for-mt7620.patch
+++ b/target/linux/ramips/patches-4.3/0503-net-next-mediatek-add-switch-driver-for-mt7620.patch
@@ -14,9 +14,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 drivers/net/ethernet/mediatek/gsw_mt7620.c
create mode 100644 drivers/net/ethernet/mediatek/gsw_mt7620.h
-diff --git a/drivers/net/ethernet/mediatek/gsw_mt7620.c b/drivers/net/ethernet/mediatek/gsw_mt7620.c
-new file mode 100644
-index 0000000..a37ed1b
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/gsw_mt7620.c
@@ -0,0 +1,255 @@
@@ -275,9 +272,6 @@ index 0000000..a37ed1b
+MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
+MODULE_DESCRIPTION("GBit switch driver for Mediatek MT7620 SoC");
+MODULE_VERSION(MTK_FE_DRV_VERSION);
-diff --git a/drivers/net/ethernet/mediatek/gsw_mt7620.h b/drivers/net/ethernet/mediatek/gsw_mt7620.h
-new file mode 100644
-index 0000000..0d6ee84
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/gsw_mt7620.h
@@ -0,0 +1,117 @@
@@ -398,6 +392,3 @@ index 0000000..0d6ee84
+u32 _mt7620_mii_read(struct mt7620_gsw *gsw, int phy_addr, int phy_reg);
+
+#endif
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0504-net-next-mediatek-add-switch-driver-for-mt7621.patch b/target/linux/ramips/patches-4.3/0504-net-next-mediatek-add-switch-driver-for-mt7621.patch
index 5a3f75a02e..08d93f73ea 100644
--- a/target/linux/ramips/patches-4.3/0504-net-next-mediatek-add-switch-driver-for-mt7621.patch
+++ b/target/linux/ramips/patches-4.3/0504-net-next-mediatek-add-switch-driver-for-mt7621.patch
@@ -12,9 +12,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
1 file changed, 284 insertions(+)
create mode 100644 drivers/net/ethernet/mediatek/gsw_mt7621.c
-diff --git a/drivers/net/ethernet/mediatek/gsw_mt7621.c b/drivers/net/ethernet/mediatek/gsw_mt7621.c
-new file mode 100644
-index 0000000..500841f
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/gsw_mt7621.c
@@ -0,0 +1,284 @@
@@ -302,6 +299,3 @@ index 0000000..500841f
+MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
+MODULE_DESCRIPTION("GBit switch driver for Mediatek MT7621 SoC");
+MODULE_VERSION(MTK_FE_DRV_VERSION);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0505-net-next-mediatek-add-support-for-rt2880.patch b/target/linux/ramips/patches-4.3/0505-net-next-mediatek-add-support-for-rt2880.patch
index 7597b2abe0..8ed00e38a6 100644
--- a/target/linux/ramips/patches-4.3/0505-net-next-mediatek-add-support-for-rt2880.patch
+++ b/target/linux/ramips/patches-4.3/0505-net-next-mediatek-add-support-for-rt2880.patch
@@ -19,9 +19,6 @@ Signed-off-by: Michael Lee <igvtee@gmail.com>
create mode 100644 drivers/net/ethernet/mediatek/mdio_rt2880.h
create mode 100644 drivers/net/ethernet/mediatek/soc_rt2880.c
-diff --git a/drivers/net/ethernet/mediatek/mdio_rt2880.c b/drivers/net/ethernet/mediatek/mdio_rt2880.c
-new file mode 100644
-index 0000000..eb9df6e
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/mdio_rt2880.c
@@ -0,0 +1,222 @@
@@ -247,9 +244,6 @@ index 0000000..eb9df6e
+ if (priv->phy->phy_node[0] && priv->mii_bus->phy_map[0])
+ fe_connect_phy_node(priv, priv->phy->phy_node[0]);
+}
-diff --git a/drivers/net/ethernet/mediatek/mdio_rt2880.h b/drivers/net/ethernet/mediatek/mdio_rt2880.h
-new file mode 100644
-index 0000000..6884894
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/mdio_rt2880.h
@@ -0,0 +1,23 @@
@@ -276,9 +270,6 @@ index 0000000..6884894
+void rt2880_port_init(struct fe_priv *priv, struct device_node *np);
+
+#endif
-diff --git a/drivers/net/ethernet/mediatek/soc_rt2880.c b/drivers/net/ethernet/mediatek/soc_rt2880.c
-new file mode 100644
-index 0000000..0792dab
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/soc_rt2880.c
@@ -0,0 +1,76 @@
@@ -358,6 +349,3 @@ index 0000000..0792dab
+};
+
+MODULE_DEVICE_TABLE(of, of_fe_match);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0506-net-next-mediatek-add-support-for-rt3050.patch b/target/linux/ramips/patches-4.3/0506-net-next-mediatek-add-support-for-rt3050.patch
index 8fd09d3694..a80c940ec6 100644
--- a/target/linux/ramips/patches-4.3/0506-net-next-mediatek-add-support-for-rt3050.patch
+++ b/target/linux/ramips/patches-4.3/0506-net-next-mediatek-add-support-for-rt3050.patch
@@ -49,7 +49,7 @@ Signed-off-by: Michael Lee <igvtee@gmail.com>
/* HW limitations for this switch:
* - No large frame support (PKT_MAX_LEN at most 1536)
* - Can't have untagged vlan and tagged vlan on one port at the same time,
-@@ -559,7 +543,7 @@
+@@ -559,7 +543,7 @@ static irqreturn_t esw_interrupt(int irq
static int esw_probe(struct platform_device *pdev)
{
@@ -58,7 +58,7 @@ Signed-off-by: Michael Lee <igvtee@gmail.com>
struct device_node *np = pdev->dev.of_node;
const __be32 *port_map, *reg_init;
struct rt305x_esw *esw;
-@@ -629,12 +613,9 @@
+@@ -629,12 +613,9 @@ static struct platform_driver esw_driver
},
};
diff --git a/target/linux/ramips/patches-4.3/0507-net-next-mediatek-add-support-for-rt3883.patch b/target/linux/ramips/patches-4.3/0507-net-next-mediatek-add-support-for-rt3883.patch
index 1b9815571f..53d35d0728 100644
--- a/target/linux/ramips/patches-4.3/0507-net-next-mediatek-add-support-for-rt3883.patch
+++ b/target/linux/ramips/patches-4.3/0507-net-next-mediatek-add-support-for-rt3883.patch
@@ -14,9 +14,6 @@ Signed-off-by: Michael Lee <igvtee@gmail.com>
1 file changed, 75 insertions(+)
create mode 100644 drivers/net/ethernet/mediatek/soc_rt3883.c
-diff --git a/drivers/net/ethernet/mediatek/soc_rt3883.c b/drivers/net/ethernet/mediatek/soc_rt3883.c
-new file mode 100644
-index 0000000..7f34d4d
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/soc_rt3883.c
@@ -0,0 +1,75 @@
@@ -95,6 +92,3 @@ index 0000000..7f34d4d
+};
+
+MODULE_DEVICE_TABLE(of, of_fe_match);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch b/target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch
index 83e04244a4..4055026cb5 100644
--- a/target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch
+++ b/target/linux/ramips/patches-4.3/0508-net-next-mediatek-add-support-for-mt7620.patch
@@ -21,9 +21,6 @@ Signed-off-by: Michael Lee <igvtee@gmail.com>
create mode 100644 drivers/net/ethernet/mediatek/mdio_mt7620.c
create mode 100644 drivers/net/ethernet/mediatek/soc_mt7620.c
-diff --git a/drivers/net/ethernet/mediatek/mdio_mt7620.c b/drivers/net/ethernet/mediatek/mdio_mt7620.c
-new file mode 100644
-index 0000000..89c6c30
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/mdio_mt7620.c
@@ -0,0 +1,156 @@
@@ -183,9 +180,6 @@ index 0000000..89c6c30
+ priv->phy->speed[port],
+ (priv->phy->duplex[port] == DUPLEX_FULL));
+}
-diff --git a/drivers/net/ethernet/mediatek/soc_mt7620.c b/drivers/net/ethernet/mediatek/soc_mt7620.c
-new file mode 100644
-index 0000000..9ad6bc9
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/soc_mt7620.c
@@ -0,0 +1,334 @@
@@ -523,6 +517,3 @@ index 0000000..9ad6bc9
+};
+
+MODULE_DEVICE_TABLE(of, of_fe_match);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch b/target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch
index a59059d2e8..401453904c 100644
--- a/target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch
+++ b/target/linux/ramips/patches-4.3/0509-net-next-mediatek-add-support-for-mt7621.patch
@@ -19,9 +19,6 @@ Signed-off-by: Michael Lee <igvtee@gmail.com>
1 file changed, 186 insertions(+)
create mode 100644 drivers/net/ethernet/mediatek/soc_mt7621.c
-diff --git a/drivers/net/ethernet/mediatek/soc_mt7621.c b/drivers/net/ethernet/mediatek/soc_mt7621.c
-new file mode 100644
-index 0000000..1609a3e
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/soc_mt7621.c
@@ -0,0 +1,186 @@
@@ -211,6 +208,3 @@ index 0000000..1609a3e
+};
+
+MODULE_DEVICE_TABLE(of, of_fe_match);
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0510-net-next-mediatek-add-Kconfig-and-Makefile.patch b/target/linux/ramips/patches-4.3/0510-net-next-mediatek-add-Kconfig-and-Makefile.patch
index ac07e8f35e..51427adcc5 100644
--- a/target/linux/ramips/patches-4.3/0510-net-next-mediatek-add-Kconfig-and-Makefile.patch
+++ b/target/linux/ramips/patches-4.3/0510-net-next-mediatek-add-Kconfig-and-Makefile.patch
@@ -17,11 +17,9 @@ Signed-off-by: Michael Lee <igvtee@gmail.com>
create mode 100644 drivers/net/ethernet/mediatek/Kconfig
create mode 100644 drivers/net/ethernet/mediatek/Makefile
-diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
-index 955d06b..5302f81 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
-@@ -105,6 +105,7 @@ config LANTIQ_ETOP
+@@ -106,6 +106,7 @@ config LANTIQ_ETOP
Support for the MII0 inside the Lantiq SoC
source "drivers/net/ethernet/marvell/Kconfig"
@@ -29,11 +27,9 @@ index 955d06b..5302f81 100644
source "drivers/net/ethernet/mellanox/Kconfig"
source "drivers/net/ethernet/micrel/Kconfig"
source "drivers/net/ethernet/microchip/Kconfig"
-diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
-index 4a2ee98..ecc16c2 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
-@@ -45,6 +45,7 @@ obj-$(CONFIG_JME) += jme.o
+@@ -46,6 +46,7 @@ obj-$(CONFIG_JME) += jme.o
obj-$(CONFIG_KORINA) += korina.o
obj-$(CONFIG_LANTIQ_ETOP) += lantiq_etop.o
obj-$(CONFIG_NET_VENDOR_MARVELL) += marvell/
@@ -41,9 +37,6 @@ index 4a2ee98..ecc16c2 100644
obj-$(CONFIG_NET_VENDOR_MELLANOX) += mellanox/
obj-$(CONFIG_NET_VENDOR_MICREL) += micrel/
obj-$(CONFIG_NET_VENDOR_MICROCHIP) += microchip/
-diff --git a/drivers/net/ethernet/mediatek/Kconfig b/drivers/net/ethernet/mediatek/Kconfig
-new file mode 100644
-index 0000000..cf883c4
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/Kconfig
@@ -0,0 +1,62 @@
@@ -109,9 +102,6 @@ index 0000000..cf883c4
+ def_tristate NET_MEDIATEK_SOC
+ depends on NET_MEDIATEK_MT7621
+endif
-diff --git a/drivers/net/ethernet/mediatek/Makefile b/drivers/net/ethernet/mediatek/Makefile
-new file mode 100644
-index 0000000..c4d2dfb
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/Makefile
@@ -0,0 +1,20 @@
@@ -135,6 +125,3 @@ index 0000000..c4d2dfb
+obj-$(CONFIG_NET_MEDIATEK_GSW_MT7620) += gsw_mt7620.o
+obj-$(CONFIG_NET_MEDIATEK_GSW_MT7621) += gsw_mt7621.o
+obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk-eth-soc.o
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0511-net-mediatek-add-support-for-the-multiphy-carrier-pa.patch b/target/linux/ramips/patches-4.3/0511-net-mediatek-add-support-for-the-multiphy-carrier-pa.patch
index 349662f6d3..4d5c2d8744 100644
--- a/target/linux/ramips/patches-4.3/0511-net-mediatek-add-support-for-the-multiphy-carrier-pa.patch
+++ b/target/linux/ramips/patches-4.3/0511-net-mediatek-add-support-for-the-multiphy-carrier-pa.patch
@@ -13,11 +13,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/net/ethernet/mediatek/mdio_mt7620.c | 12 ++++++++++++
5 files changed, 16 insertions(+)
-diff --git a/drivers/net/ethernet/mediatek/gsw_mt7620.c b/drivers/net/ethernet/mediatek/gsw_mt7620.c
-index a37ed1b..28122ac 100644
--- a/drivers/net/ethernet/mediatek/gsw_mt7620.c
+++ b/drivers/net/ethernet/mediatek/gsw_mt7620.c
-@@ -54,6 +54,7 @@ static irqreturn_t gsw_interrupt_mt7620(int irq, void *_priv)
+@@ -54,6 +54,7 @@ static irqreturn_t gsw_interrupt_mt7620(
priv->link[i] = link;
}
@@ -25,22 +23,18 @@ index a37ed1b..28122ac 100644
mtk_switch_w32(gsw, status, GSW_REG_ISR);
return IRQ_HANDLED;
-diff --git a/drivers/net/ethernet/mediatek/gsw_mt7620.h b/drivers/net/ethernet/mediatek/gsw_mt7620.h
-index 0d6ee84..dcef9a8 100644
--- a/drivers/net/ethernet/mediatek/gsw_mt7620.h
+++ b/drivers/net/ethernet/mediatek/gsw_mt7620.h
-@@ -113,5 +113,6 @@ u32 mt7530_mdio_r32(struct mt7620_gsw *gsw, u32 reg);
+@@ -113,5 +113,6 @@ u32 mt7530_mdio_r32(struct mt7620_gsw *g
u32 _mt7620_mii_write(struct mt7620_gsw *gsw, u32 phy_addr,
u32 phy_register, u32 write_data);
u32 _mt7620_mii_read(struct mt7620_gsw *gsw, int phy_addr, int phy_reg);
+void mt7620_handle_carrier(struct fe_priv *priv);
#endif
-diff --git a/drivers/net/ethernet/mediatek/gsw_mt7621.c b/drivers/net/ethernet/mediatek/gsw_mt7621.c
-index 500841f..dc349ef 100644
--- a/drivers/net/ethernet/mediatek/gsw_mt7621.c
+++ b/drivers/net/ethernet/mediatek/gsw_mt7621.c
-@@ -60,6 +60,7 @@ static irqreturn_t gsw_interrupt_mt7621(int irq, void *_priv)
+@@ -60,6 +60,7 @@ static irqreturn_t gsw_interrupt_mt7621(
}
}
@@ -48,11 +42,9 @@ index 500841f..dc349ef 100644
mt7530_mdio_w32(gsw, 0x700c, 0x1f);
return IRQ_HANDLED;
-diff --git a/drivers/net/ethernet/mediatek/mdio.c b/drivers/net/ethernet/mediatek/mdio.c
-index 169c937..79a946e 100644
--- a/drivers/net/ethernet/mediatek/mdio.c
+++ b/drivers/net/ethernet/mediatek/mdio.c
-@@ -89,6 +89,7 @@ int fe_connect_phy_node(struct fe_priv *priv, struct device_node *phy_node)
+@@ -89,6 +89,7 @@ int fe_connect_phy_node(struct fe_priv *
phydev->supported &= PHY_GBIT_FEATURES;
phydev->advertising = phydev->supported;
@@ -60,11 +52,9 @@ index 169c937..79a946e 100644
dev_info(priv->device,
"connected port %d to PHY at %s [uid=%08x, driver=%s]\n",
-diff --git a/drivers/net/ethernet/mediatek/mdio_mt7620.c b/drivers/net/ethernet/mediatek/mdio_mt7620.c
-index 89c6c30..db6db52 100644
--- a/drivers/net/ethernet/mediatek/mdio_mt7620.c
+++ b/drivers/net/ethernet/mediatek/mdio_mt7620.c
-@@ -137,6 +137,17 @@ int mt7620_has_carrier(struct fe_priv *priv)
+@@ -137,6 +137,17 @@ int mt7620_has_carrier(struct fe_priv *p
}
@@ -82,12 +72,9 @@ index 89c6c30..db6db52 100644
void mt7620_print_link_state(struct fe_priv *priv, int port, int link,
int speed, int duplex)
{
-@@ -153,4 +164,5 @@ void mt7620_mdio_link_adjust(struct fe_priv *priv, int port)
+@@ -153,4 +164,5 @@ void mt7620_mdio_link_adjust(struct fe_p
mt7620_print_link_state(priv, port, priv->link[port],
priv->phy->speed[port],
(priv->phy->duplex[port] == DUPLEX_FULL));
+ mt7620_handle_carrier(priv);
}
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0512-net-mediatek-add-swconfig-driver-for-esw_rt3050.patch b/target/linux/ramips/patches-4.3/0512-net-mediatek-add-swconfig-driver-for-esw_rt3050.patch
index 2f1557e873..5d0072fe1e 100644
--- a/target/linux/ramips/patches-4.3/0512-net-mediatek-add-swconfig-driver-for-esw_rt3050.patch
+++ b/target/linux/ramips/patches-4.3/0512-net-mediatek-add-swconfig-driver-for-esw_rt3050.patch
@@ -8,8 +8,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/net/ethernet/mediatek/esw_rt3050.c | 805 ++++++++++++++++++++++++++++
1 file changed, 805 insertions(+)
-diff --git a/drivers/net/ethernet/mediatek/esw_rt3050.c b/drivers/net/ethernet/mediatek/esw_rt3050.c
-index 670ae16..352d50a 100644
--- a/drivers/net/ethernet/mediatek/esw_rt3050.c
+++ b/drivers/net/ethernet/mediatek/esw_rt3050.c
@@ -17,6 +17,8 @@
@@ -167,7 +165,7 @@ index 670ae16..352d50a 100644
static unsigned esw_get_port_disable(struct rt305x_esw *esw)
{
unsigned reg;
-@@ -261,6 +372,59 @@ static unsigned esw_get_port_disable(struct rt305x_esw *esw)
+@@ -261,6 +372,59 @@ static unsigned esw_get_port_disable(str
RT305X_ESW_POC0_DIS_PORT_M;
}
@@ -227,7 +225,7 @@ index 670ae16..352d50a 100644
static void esw_hw_init(struct rt305x_esw *esw)
{
int i;
-@@ -519,6 +683,9 @@ static void esw_hw_init(struct rt305x_esw *esw)
+@@ -519,6 +683,9 @@ static void esw_hw_init(struct rt305x_es
for (i = 0; i < RT305X_ESW_NUM_LEDS; i++)
esw->ports[i].led = 0x05;
@@ -237,7 +235,7 @@ index 670ae16..352d50a 100644
/* Only unmask the port change interrupt */
esw_w32(esw, ~RT305X_ESW_PORT_ST_CHG, RT305X_ESW_REG_IMR);
}
-@@ -541,11 +708,629 @@ static irqreturn_t esw_interrupt(int irq, void *_esw)
+@@ -541,11 +708,629 @@ static irqreturn_t esw_interrupt(int irq
return IRQ_HANDLED;
}
@@ -867,7 +865,7 @@ index 670ae16..352d50a 100644
struct rt305x_esw *esw;
struct resource *irq;
int ret;
-@@ -568,6 +1353,21 @@ static int esw_probe(struct platform_device *pdev)
+@@ -568,6 +1353,21 @@ static int esw_probe(struct platform_dev
if (reg_init)
esw->reg_led_polarity = be32_to_cpu(*reg_init);
@@ -889,7 +887,7 @@ index 670ae16..352d50a 100644
platform_set_drvdata(pdev, esw);
spin_lock_init(&esw->reg_rw_lock);
-@@ -583,6 +1383,11 @@ static int esw_probe(struct platform_device *pdev)
+@@ -583,6 +1383,11 @@ static int esw_probe(struct platform_dev
}
return ret;
@@ -901,6 +899,3 @@ index 670ae16..352d50a 100644
}
static int esw_remove(struct platform_device *pdev)
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch b/target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
index 87ad12808d..bbad8cc523 100644
--- a/target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
+++ b/target/linux/ramips/patches-4.3/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
@@ -15,11 +15,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 drivers/net/ethernet/mediatek/mt7530.c
create mode 100644 drivers/net/ethernet/mediatek/mt7530.h
-diff --git a/drivers/net/ethernet/mediatek/Makefile b/drivers/net/ethernet/mediatek/Makefile
-index c4d2dfb..07ba4c2 100644
--- a/drivers/net/ethernet/mediatek/Makefile
+++ b/drivers/net/ethernet/mediatek/Makefile
-@@ -15,6 +15,6 @@ mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7620) += soc_mt7620.o
+@@ -15,6 +15,6 @@ mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7620
mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7621) += soc_mt7621.o
obj-$(CONFIG_NET_MEDIATEK_ESW_RT3050) += esw_rt3050.o
@@ -28,9 +26,6 @@ index c4d2dfb..07ba4c2 100644
+obj-$(CONFIG_NET_MEDIATEK_GSW_MT7620) += gsw_mt7620.o mt7530.o
+obj-$(CONFIG_NET_MEDIATEK_GSW_MT7621) += gsw_mt7621.o mt7530.o
obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk-eth-soc.o
-diff --git a/drivers/net/ethernet/mediatek/mt7530.c b/drivers/net/ethernet/mediatek/mt7530.c
-new file mode 100644
-index 0000000..4d9980d
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/mt7530.c
@@ -0,0 +1,804 @@
@@ -838,9 +833,6 @@ index 0000000..4d9980d
+
+ return 0;
+}
-diff --git a/drivers/net/ethernet/mediatek/mt7530.h b/drivers/net/ethernet/mediatek/mt7530.h
-new file mode 100644
-index 0000000..1fc8c62
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/mt7530.h
@@ -0,0 +1,20 @@
@@ -864,11 +856,9 @@ index 0000000..1fc8c62
+int mt7530_probe(struct device *dev, void __iomem *base, struct mii_bus *bus, int vlan);
+
+#endif
-diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-index dae7147..6299f87 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1308,8 +1308,13 @@ static int __init fe_init(struct net_device *dev)
+@@ -1308,8 +1308,13 @@ static int __init fe_init(struct net_dev
}
err = fe_hw_init(dev);
@@ -884,8 +874,6 @@ index dae7147..6299f87 100644
err_phy_disconnect:
if (priv->phy)
-diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-index ba5ba07..d5f8b87 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -383,6 +383,7 @@ struct fe_soc_data {
@@ -896,11 +884,9 @@ index ba5ba07..d5f8b87 100644
void (*port_init)(struct fe_priv *priv, struct device_node *port);
int (*has_carrier)(struct fe_priv *priv);
int (*mdio_init)(struct fe_priv *priv);
-diff --git a/drivers/net/ethernet/mediatek/soc_mt7620.c b/drivers/net/ethernet/mediatek/soc_mt7620.c
-index 9ad6bc9..740dd90 100644
--- a/drivers/net/ethernet/mediatek/soc_mt7620.c
+++ b/drivers/net/ethernet/mediatek/soc_mt7620.c
-@@ -313,6 +313,7 @@ static struct fe_soc_data mt7620_data = {
+@@ -313,6 +313,7 @@ static struct fe_soc_data mt7620_data =
.fwd_config = mt7620_fwd_config,
.tx_dma = mt7620_tx_dma,
.switch_init = mtk_gsw_init,
@@ -908,6 +894,3 @@ index 9ad6bc9..740dd90 100644
.port_init = mt7620_port_init,
.reg_table = mt7620_reg_table,
.pdma_glo_cfg = FE_PDMA_SIZE_16DWORDS,
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0514-net-mediatek-fix_esw.patch b/target/linux/ramips/patches-4.3/0514-net-mediatek-fix_esw.patch
index 0ea4592483..de44a9f286 100644
--- a/target/linux/ramips/patches-4.3/0514-net-mediatek-fix_esw.patch
+++ b/target/linux/ramips/patches-4.3/0514-net-mediatek-fix_esw.patch
@@ -8,7 +8,7 @@
#include <linux/switch.h>
-@@ -1332,7 +1333,6 @@
+@@ -1332,7 +1333,6 @@ static int esw_probe(struct platform_dev
const __be32 *port_map, *reg_init;
struct switch_dev *swdev;
struct rt305x_esw *esw;
@@ -16,7 +16,7 @@
int ret;
esw = devm_kzalloc(&pdev->dev, sizeof(*esw), GFP_KERNEL);
-@@ -1340,7 +1340,7 @@
+@@ -1340,7 +1340,7 @@ static int esw_probe(struct platform_dev
return -ENOMEM;
esw->dev = &pdev->dev;
@@ -25,7 +25,7 @@
esw->base = devm_ioremap_resource(&pdev->dev, res);
if (!esw->base)
return -EADDRNOTAVAIL;
-@@ -1365,7 +1365,7 @@
+@@ -1365,7 +1365,7 @@ static int esw_probe(struct platform_dev
ret = register_switch(swdev, NULL);
if (ret < 0) {
dev_err(&pdev->dev, "register_switch failed\n");
@@ -34,7 +34,7 @@
}
platform_set_drvdata(pdev, esw);
-@@ -1383,11 +1383,6 @@
+@@ -1383,11 +1383,6 @@ static int esw_probe(struct platform_dev
}
return ret;
diff --git a/target/linux/ramips/patches-4.3/0601-net-mediatke-add-phy_ethtool_ioctl-support.patch b/target/linux/ramips/patches-4.3/0601-net-mediatke-add-phy_ethtool_ioctl-support.patch
index 0628364ec9..369afa97de 100644
--- a/target/linux/ramips/patches-4.3/0601-net-mediatke-add-phy_ethtool_ioctl-support.patch
+++ b/target/linux/ramips/patches-4.3/0601-net-mediatke-add-phy_ethtool_ioctl-support.patch
@@ -8,11 +8,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +++
1 file changed, 3 insertions(+)
-diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-index 9999768..84b1a43 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1342,6 +1342,9 @@ static int fe_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+@@ -1344,6 +1344,9 @@ static int fe_do_ioctl(struct net_device
return -ENODEV;
switch (cmd) {
@@ -22,6 +20,3 @@ index 9999768..84b1a43 100644
case SIOCGMIIPHY:
case SIOCGMIIREG:
case SIOCSMIIREG:
---
-1.7.10.4
-
diff --git a/target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch b/target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch
deleted file mode 100644
index 1c6da106cb..0000000000
--- a/target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch
+++ /dev/null
@@ -1,82 +0,0 @@
---- a/arch/mips/ralink/Kconfig
-+++ b/arch/mips/ralink/Kconfig
-@@ -52,6 +52,8 @@
- select SYS_SUPPORTS_SMP
- select SYS_SUPPORTS_MIPS_CPS
- select MIPS_GIC
-+ select COMMON_CLK
-+ select CLKSRC_MIPS_GIC
- select HW_HAS_PCI
- endchoice
-
---- a/arch/mips/ralink/Makefile
-+++ b/arch/mips/ralink/Makefile
-@@ -6,14 +6,18 @@
- # Copyright (C) 2009-2011 Gabor Juhos <juhosg@openwrt.org>
- # Copyright (C) 2013 John Crispin <blogic@openwrt.org>
-
--obj-y := prom.o of.o reset.o clk.o timer.o
-+obj-y := prom.o of.o reset.o
-+
-+ifndef CONFIG_MIPS_GIC
-+ obj-y += clk.o timer.o
-+endif
-
- obj-$(CONFIG_CLKEVT_RT3352) += cevt-rt3352.o
-
- obj-$(CONFIG_RALINK_ILL_ACC) += ill_acc.o
-
- obj-$(CONFIG_IRQ_INTC) += irq.o
--obj-$(CONFIG_MIPS_GIC) += irq-gic.o
-+obj-$(CONFIG_MIPS_GIC) += irq-gic.o timer-gic.o
-
- obj-$(CONFIG_SOC_RT288X) += rt288x.o
- obj-$(CONFIG_SOC_RT305X) += rt305x.o
---- a/arch/mips/ralink/irq-gic.c
-+++ b/arch/mips/ralink/irq-gic.c
-@@ -3,13 +3,6 @@
- #include <linux/of.h>
- #include <linux/irqchip.h>
-
--#include <linux/irqchip/mips-gic.h>
--
--unsigned int get_c0_compare_int(void)
--{
-- return gic_get_c0_compare_int();
--}
--
- void __init
- arch_init_irq(void)
- {
---- /dev/null
-+++ b/arch/mips/ralink/timer-gic.c
-@@ -0,0 +1,15 @@
-+#include <linux/init.h>
-+
-+#include <linux/of.h>
-+#include <linux/clk-provider.h>
-+#include <linux/clocksource.h>
-+
-+#include "common.h"
-+
-+void __init plat_time_init(void)
-+{
-+ ralink_of_remap();
-+
-+ of_clk_init(NULL);
-+ clocksource_of_init();
-+}
---- a/arch/mips/ralink/mt7621.c
-+++ b/arch/mips/ralink/mt7621.c
-@@ -152,11 +152,6 @@
- }
- break;
- }
-- cpu_clk = 880000000;
-- ralink_clk_add("cpu", cpu_clk);
-- ralink_clk_add("1e000b00.spi", 50000000);
-- ralink_clk_add("1e000c00.uartlite", 50000000);
-- ralink_clk_add("1e000d00.uart", 50000000);
- }
-
- void __init ralink_of_remap(void)
diff --git a/target/linux/ramips/patches-4.3/0903-mt7621-fix-gic-perfcounter.patch b/target/linux/ramips/patches-4.3/0903-mt7621-fix-gic-perfcounter.patch
deleted file mode 100644
index bb19511a11..0000000000
--- a/target/linux/ramips/patches-4.3/0903-mt7621-fix-gic-perfcounter.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/arch/mips/ralink/irq-gic.c
-+++ b/arch/mips/ralink/irq-gic.c
-@@ -2,6 +2,13 @@
-
- #include <linux/of.h>
- #include <linux/irqchip.h>
-+#include <linux/irqchip/mips-gic.h>
-+
-+int get_c0_perfcount_int(void)
-+{
-+ return gic_get_c0_perfcount_int();
-+}
-+EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
-
- void __init
- arch_init_irq(void)