aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorKoen Vandeputte <koen.vandeputte@ncentric.com>2019-08-05 12:55:32 +0200
committerKoen Vandeputte <koen.vandeputte@ncentric.com>2019-08-06 11:52:47 +0200
commit42d9bccadb4b5dcb1a598fb99867ede5499605c4 (patch)
tree2e1a932bb5e01da8b71691824a6eb38d77747200 /target
parent96f1d4b02b29fa6153dfa96a8672af97b139cbbc (diff)
downloadupstream-42d9bccadb4b5dcb1a598fb99867ede5499605c4.tar.gz
upstream-42d9bccadb4b5dcb1a598fb99867ede5499605c4.tar.bz2
upstream-42d9bccadb4b5dcb1a598fb99867ede5499605c4.zip
kernel: bump 4.19 to 4.19.64
Refreshed all patches. Remove upstreamed: - 100-powerpc-4xx-uic-clear-pending-interrupt-after-irq-ty.patch - 950-0309-usb-dwc2-Disable-all-EP-s-on-disconnect.patch - 950-0310-usb-dwc2-Fix-disable-all-EP-s-on-disconnect.patch Fixes: - CVE-2019-13648 - CVE-2019-3900 - CVE-2019-10207 Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'target')
-rw-r--r--target/linux/apm821xx/patches-4.19/100-powerpc-4xx-uic-clear-pending-interrupt-after-irq-ty.patch30
-rw-r--r--target/linux/brcm2708/patches-4.19/950-0040-Add-dwc_otg-driver.patch2
-rw-r--r--target/linux/brcm2708/patches-4.19/950-0309-usb-dwc2-Disable-all-EP-s-on-disconnect.patch107
-rw-r--r--target/linux/brcm2708/patches-4.19/950-0310-usb-dwc2-Fix-disable-all-EP-s-on-disconnect.patch152
-rw-r--r--target/linux/generic/hack-4.19/207-disable-modorder.patch4
-rw-r--r--target/linux/generic/hack-4.19/220-gc_sections.patch2
-rw-r--r--target/linux/generic/pending-4.19/201-extra_optimization.patch2
-rw-r--r--target/linux/generic/pending-4.19/203-kallsyms_uncompressed.patch8
-rw-r--r--target/linux/generic/pending-4.19/811-pci_disable_usb_common_quirks.patch6
-rw-r--r--[-rwxr-xr-x]target/linux/mediatek/patches-4.19/0001-arm-dts-mediatek-add-basic-support-for-MT7629-SoC.patch6
-rw-r--r--target/linux/mediatek/patches-4.19/0001-eth-sync-from-mtk-lede.patch32
-rw-r--r--target/linux/mediatek/patches-4.19/0003-mt7531-gsw-internal_phy_calibration.patch11
-rw-r--r--target/linux/mediatek/patches-4.19/0003-switch-add-mt7531.patch12
-rw-r--r--target/linux/mediatek/patches-4.19/0227-arm-dts-Add-Unielec-U7623-DTS.patch14
-rw-r--r--[-rwxr-xr-x]target/linux/mediatek/patches-4.19/0301-mtd-mtk-ecc-move-mtk-ecc-header-file-to-include-mtd.patch115
-rw-r--r--[-rwxr-xr-x]target/linux/mediatek/patches-4.19/0303-mtd-spinand-disable-on-die-ECC.patch9
-rw-r--r--[-rwxr-xr-x]target/linux/mediatek/patches-4.19/0304-dt-bindings-ARM-MediaTek-Document-devicetree-binding.patch6
-rw-r--r--target/linux/mediatek/patches-4.19/0306-spi-spi-mem-MediaTek-Add-SPI-NAND-Flash-interface-dr.patch16
-rw-r--r--[-rwxr-xr-x]target/linux/mediatek/patches-4.19/0900-bt-mtk-serial-fix.patch10
19 files changed, 148 insertions, 396 deletions
diff --git a/target/linux/apm821xx/patches-4.19/100-powerpc-4xx-uic-clear-pending-interrupt-after-irq-ty.patch b/target/linux/apm821xx/patches-4.19/100-powerpc-4xx-uic-clear-pending-interrupt-after-irq-ty.patch
deleted file mode 100644
index ee4eeb6963..0000000000
--- a/target/linux/apm821xx/patches-4.19/100-powerpc-4xx-uic-clear-pending-interrupt-after-irq-ty.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 9b84ad676e248a3e3c81db7f5d39e1739b3780aa Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey@gmail.com>
-Date: Sat, 15 Jun 2019 16:35:26 +0200
-Subject: [PATCH] powerpc/4xx/uic: clear pending interrupt after irq type/pol
- change
-
-When testing out gpio-keys with a button, a spurious
-interrupt (and therefore a key press or release event)
-gets triggered as soon as the driver enables the irq
-line for the first time.
-
-This patch clears any potential bogus generated interrupt
-that was caused by the switching of the associated irq's
-type and polarity.
-
-Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
----
- arch/powerpc/platforms/4xx/uic.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/arch/powerpc/platforms/4xx/uic.c
-+++ b/arch/powerpc/platforms/4xx/uic.c
-@@ -158,6 +158,7 @@ static int uic_set_irq_type(struct irq_d
-
- mtdcr(uic->dcrbase + UIC_PR, pr);
- mtdcr(uic->dcrbase + UIC_TR, tr);
-+ mtdcr(uic->dcrbase + UIC_SR, ~mask);
-
- raw_spin_unlock_irqrestore(&uic->lock, flags);
-
diff --git a/target/linux/brcm2708/patches-4.19/950-0040-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-4.19/950-0040-Add-dwc_otg-driver.patch
index b481a12f80..31c3055a08 100644
--- a/target/linux/brcm2708/patches-4.19/950-0040-Add-dwc_otg-driver.patch
+++ b/target/linux/brcm2708/patches-4.19/950-0040-Add-dwc_otg-driver.patch
@@ -917,7 +917,7 @@ Fixes https://github.com/raspberrypi/linux/issues/2408
}
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
-@@ -5210,7 +5210,7 @@ static void port_event(struct usb_hub *h
+@@ -5214,7 +5214,7 @@ static void port_event(struct usb_hub *h
u16 status = 0, unused;
port_dev->over_current_count++;
diff --git a/target/linux/brcm2708/patches-4.19/950-0309-usb-dwc2-Disable-all-EP-s-on-disconnect.patch b/target/linux/brcm2708/patches-4.19/950-0309-usb-dwc2-Disable-all-EP-s-on-disconnect.patch
deleted file mode 100644
index 22fc8dc279..0000000000
--- a/target/linux/brcm2708/patches-4.19/950-0309-usb-dwc2-Disable-all-EP-s-on-disconnect.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From 635c5ee81a0595cf3504e7ae4fce5e91d7e17da4 Mon Sep 17 00:00:00 2001
-From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
-Date: Wed, 19 Sep 2018 18:13:52 +0400
-Subject: [PATCH 309/725] usb: dwc2: Disable all EP's on disconnect
-
-commit dccf1bad4be7eaa096c1f3697bd37883f9a08ecb upstream.
-
-Disabling all EP's allow to reset EP's to initial state.
-On disconnect disable all EP's instead of just killing
-all requests. Because of some platform didn't catch
-disconnect event, same stuff added to
-dwc2_hsotg_core_init_disconnected() function when USB
-reset detected on the bus.
-
-Changed from version 1:
-Changed lock acquire flow in dwc2_hsotg_ep_disable()
-function.
-
-Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
-Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
----
- drivers/usb/dwc2/gadget.c | 30 +++++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 7 deletions(-)
-
---- a/drivers/usb/dwc2/gadget.c
-+++ b/drivers/usb/dwc2/gadget.c
-@@ -3107,6 +3107,8 @@ static void kill_all_requests(struct dwc
- dwc2_hsotg_txfifo_flush(hsotg, ep->fifo_index);
- }
-
-+static int dwc2_hsotg_ep_disable(struct usb_ep *ep);
-+
- /**
- * dwc2_hsotg_disconnect - disconnect service
- * @hsotg: The device state.
-@@ -3125,13 +3127,12 @@ void dwc2_hsotg_disconnect(struct dwc2_h
- hsotg->connected = 0;
- hsotg->test_mode = 0;
-
-+ /* all endpoints should be shutdown */
- for (ep = 0; ep < hsotg->num_of_eps; ep++) {
- if (hsotg->eps_in[ep])
-- kill_all_requests(hsotg, hsotg->eps_in[ep],
-- -ESHUTDOWN);
-+ dwc2_hsotg_ep_disable(&hsotg->eps_in[ep]->ep);
- if (hsotg->eps_out[ep])
-- kill_all_requests(hsotg, hsotg->eps_out[ep],
-- -ESHUTDOWN);
-+ dwc2_hsotg_ep_disable(&hsotg->eps_out[ep]->ep);
- }
-
- call_gadget(hsotg, disconnect);
-@@ -3189,13 +3190,23 @@ void dwc2_hsotg_core_init_disconnected(s
- u32 val;
- u32 usbcfg;
- u32 dcfg = 0;
-+ int ep;
-
- /* Kill any ep0 requests as controller will be reinitialized */
- kill_all_requests(hsotg, hsotg->eps_out[0], -ECONNRESET);
-
-- if (!is_usb_reset)
-+ if (!is_usb_reset) {
- if (dwc2_core_reset(hsotg, true))
- return;
-+ } else {
-+ /* all endpoints should be shutdown */
-+ for (ep = 1; ep < hsotg->num_of_eps; ep++) {
-+ if (hsotg->eps_in[ep])
-+ dwc2_hsotg_ep_disable(&hsotg->eps_in[ep]->ep);
-+ if (hsotg->eps_out[ep])
-+ dwc2_hsotg_ep_disable(&hsotg->eps_out[ep]->ep);
-+ }
-+ }
-
- /*
- * we must now enable ep0 ready for host detection and then
-@@ -3996,6 +4007,7 @@ static int dwc2_hsotg_ep_disable(struct
- unsigned long flags;
- u32 epctrl_reg;
- u32 ctrl;
-+ int locked;
-
- dev_dbg(hsotg->dev, "%s(ep %p)\n", __func__, ep);
-
-@@ -4011,7 +4023,9 @@ static int dwc2_hsotg_ep_disable(struct
-
- epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index);
-
-- spin_lock_irqsave(&hsotg->lock, flags);
-+ locked = spin_is_locked(&hsotg->lock);
-+ if (!locked)
-+ spin_lock_irqsave(&hsotg->lock, flags);
-
- ctrl = dwc2_readl(hsotg, epctrl_reg);
-
-@@ -4035,7 +4049,9 @@ static int dwc2_hsotg_ep_disable(struct
- hs_ep->fifo_index = 0;
- hs_ep->fifo_size = 0;
-
-- spin_unlock_irqrestore(&hsotg->lock, flags);
-+ if (!locked)
-+ spin_unlock_irqrestore(&hsotg->lock, flags);
-+
- return 0;
- }
-
diff --git a/target/linux/brcm2708/patches-4.19/950-0310-usb-dwc2-Fix-disable-all-EP-s-on-disconnect.patch b/target/linux/brcm2708/patches-4.19/950-0310-usb-dwc2-Fix-disable-all-EP-s-on-disconnect.patch
deleted file mode 100644
index 5336d6e6af..0000000000
--- a/target/linux/brcm2708/patches-4.19/950-0310-usb-dwc2-Fix-disable-all-EP-s-on-disconnect.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From ef5163a16655fba7490d8853172ecf91e8c8cc1a Mon Sep 17 00:00:00 2001
-From: Minas Harutyunyan <minas.harutyunyan@synopsys.com>
-Date: Mon, 10 Dec 2018 18:09:32 +0400
-Subject: [PATCH 310/725] usb: dwc2: Fix disable all EP's on disconnect
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-commit 4fe4f9fecc36956fd53c8edf96dd0c691ef98ff9 upstream.
-
-Disabling all EP's allow to reset EP's to initial state.
-Introduced new function dwc2_hsotg_ep_disable_lock() which
-before calling dwc2_hsotg_ep_disable() function acquire
-hsotg->lock and release on exiting.
-From dwc2_hsotg_ep_disable() function removed acquiring
-hsotg->lock.
-In dwc2_hsotg_core_init_disconnected() function when USB
-reset interrupt asserted disabling all ep’s by
-dwc2_hsotg_ep_disable() function.
-This updates eliminating sparse imbalance warnings.
-
-Reverted changes in dwc2_hostg_disconnect() function.
-Introduced new function dwc2_hsotg_ep_disable_lock().
-Changed dwc2_hsotg_ep_ops. Now disable point to
-dwc2_hsotg_ep_disable_lock() function.
-In functions dwc2_hsotg_udc_stop() and dwc2_hsotg_suspend()
-dwc2_hsotg_ep_disable() function replaced by
-dwc2_hsotg_ep_disable_lock() function.
-In dwc2_hsotg_ep_disable() function removed acquiring
-of hsotg->lock.
-
-Fixes: dccf1bad4be7 ("usb: dwc2: Disable all EP's on disconnect")
-Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
-Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
----
- drivers/usb/dwc2/gadget.c | 41 ++++++++++++++++++++++-----------------
- 1 file changed, 23 insertions(+), 18 deletions(-)
-
---- a/drivers/usb/dwc2/gadget.c
-+++ b/drivers/usb/dwc2/gadget.c
-@@ -3107,8 +3107,6 @@ static void kill_all_requests(struct dwc
- dwc2_hsotg_txfifo_flush(hsotg, ep->fifo_index);
- }
-
--static int dwc2_hsotg_ep_disable(struct usb_ep *ep);
--
- /**
- * dwc2_hsotg_disconnect - disconnect service
- * @hsotg: The device state.
-@@ -3130,9 +3128,11 @@ void dwc2_hsotg_disconnect(struct dwc2_h
- /* all endpoints should be shutdown */
- for (ep = 0; ep < hsotg->num_of_eps; ep++) {
- if (hsotg->eps_in[ep])
-- dwc2_hsotg_ep_disable(&hsotg->eps_in[ep]->ep);
-+ kill_all_requests(hsotg, hsotg->eps_in[ep],
-+ -ESHUTDOWN);
- if (hsotg->eps_out[ep])
-- dwc2_hsotg_ep_disable(&hsotg->eps_out[ep]->ep);
-+ kill_all_requests(hsotg, hsotg->eps_out[ep],
-+ -ESHUTDOWN);
- }
-
- call_gadget(hsotg, disconnect);
-@@ -3176,6 +3176,7 @@ static void dwc2_hsotg_irq_fifoempty(str
- GINTSTS_PTXFEMP | \
- GINTSTS_RXFLVL)
-
-+static int dwc2_hsotg_ep_disable(struct usb_ep *ep);
- /**
- * dwc2_hsotg_core_init - issue softreset to the core
- * @hsotg: The device state
-@@ -4004,10 +4005,8 @@ static int dwc2_hsotg_ep_disable(struct
- struct dwc2_hsotg *hsotg = hs_ep->parent;
- int dir_in = hs_ep->dir_in;
- int index = hs_ep->index;
-- unsigned long flags;
- u32 epctrl_reg;
- u32 ctrl;
-- int locked;
-
- dev_dbg(hsotg->dev, "%s(ep %p)\n", __func__, ep);
-
-@@ -4023,10 +4022,6 @@ static int dwc2_hsotg_ep_disable(struct
-
- epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index);
-
-- locked = spin_is_locked(&hsotg->lock);
-- if (!locked)
-- spin_lock_irqsave(&hsotg->lock, flags);
--
- ctrl = dwc2_readl(hsotg, epctrl_reg);
-
- if (ctrl & DXEPCTL_EPENA)
-@@ -4049,12 +4044,22 @@ static int dwc2_hsotg_ep_disable(struct
- hs_ep->fifo_index = 0;
- hs_ep->fifo_size = 0;
-
-- if (!locked)
-- spin_unlock_irqrestore(&hsotg->lock, flags);
--
- return 0;
- }
-
-+static int dwc2_hsotg_ep_disable_lock(struct usb_ep *ep)
-+{
-+ struct dwc2_hsotg_ep *hs_ep = our_ep(ep);
-+ struct dwc2_hsotg *hsotg = hs_ep->parent;
-+ unsigned long flags;
-+ int ret;
-+
-+ spin_lock_irqsave(&hsotg->lock, flags);
-+ ret = dwc2_hsotg_ep_disable(ep);
-+ spin_unlock_irqrestore(&hsotg->lock, flags);
-+ return ret;
-+}
-+
- /**
- * on_list - check request is on the given endpoint
- * @ep: The endpoint to check.
-@@ -4202,7 +4207,7 @@ static int dwc2_hsotg_ep_sethalt_lock(st
-
- static const struct usb_ep_ops dwc2_hsotg_ep_ops = {
- .enable = dwc2_hsotg_ep_enable,
-- .disable = dwc2_hsotg_ep_disable,
-+ .disable = dwc2_hsotg_ep_disable_lock,
- .alloc_request = dwc2_hsotg_ep_alloc_request,
- .free_request = dwc2_hsotg_ep_free_request,
- .queue = dwc2_hsotg_ep_queue_lock,
-@@ -4342,9 +4347,9 @@ static int dwc2_hsotg_udc_stop(struct us
- /* all endpoints should be shutdown */
- for (ep = 1; ep < hsotg->num_of_eps; ep++) {
- if (hsotg->eps_in[ep])
-- dwc2_hsotg_ep_disable(&hsotg->eps_in[ep]->ep);
-+ dwc2_hsotg_ep_disable_lock(&hsotg->eps_in[ep]->ep);
- if (hsotg->eps_out[ep])
-- dwc2_hsotg_ep_disable(&hsotg->eps_out[ep]->ep);
-+ dwc2_hsotg_ep_disable_lock(&hsotg->eps_out[ep]->ep);
- }
-
- spin_lock_irqsave(&hsotg->lock, flags);
-@@ -4792,9 +4797,9 @@ int dwc2_hsotg_suspend(struct dwc2_hsotg
-
- for (ep = 0; ep < hsotg->num_of_eps; ep++) {
- if (hsotg->eps_in[ep])
-- dwc2_hsotg_ep_disable(&hsotg->eps_in[ep]->ep);
-+ dwc2_hsotg_ep_disable_lock(&hsotg->eps_in[ep]->ep);
- if (hsotg->eps_out[ep])
-- dwc2_hsotg_ep_disable(&hsotg->eps_out[ep]->ep);
-+ dwc2_hsotg_ep_disable_lock(&hsotg->eps_out[ep]->ep);
- }
- }
-
diff --git a/target/linux/generic/hack-4.19/207-disable-modorder.patch b/target/linux/generic/hack-4.19/207-disable-modorder.patch
index 7d7b6a8dfb..f19d36c3de 100644
--- a/target/linux/generic/hack-4.19/207-disable-modorder.patch
+++ b/target/linux/generic/hack-4.19/207-disable-modorder.patch
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/Makefile
+++ b/Makefile
-@@ -1224,7 +1224,6 @@ all: modules
+@@ -1225,7 +1225,6 @@ all: modules
PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
-@@ -1253,7 +1252,6 @@ _modinst_:
+@@ -1254,7 +1253,6 @@ _modinst_:
rm -f $(MODLIB)/build ; \
ln -s $(CURDIR) $(MODLIB)/build ; \
fi
diff --git a/target/linux/generic/hack-4.19/220-gc_sections.patch b/target/linux/generic/hack-4.19/220-gc_sections.patch
index d6fc94646e..1ca2899099 100644
--- a/target/linux/generic/hack-4.19/220-gc_sections.patch
+++ b/target/linux/generic/hack-4.19/220-gc_sections.patch
@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -780,11 +785,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
+@@ -781,11 +786,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
endif
diff --git a/target/linux/generic/pending-4.19/201-extra_optimization.patch b/target/linux/generic/pending-4.19/201-extra_optimization.patch
index d8ad40be61..8091543976 100644
--- a/target/linux/generic/pending-4.19/201-extra_optimization.patch
+++ b/target/linux/generic/pending-4.19/201-extra_optimization.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/Makefile
+++ b/Makefile
-@@ -655,12 +655,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
+@@ -656,12 +656,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
diff --git a/target/linux/generic/pending-4.19/203-kallsyms_uncompressed.patch b/target/linux/generic/pending-4.19/203-kallsyms_uncompressed.patch
index 79e991022a..6f0adb5ce5 100644
--- a/target/linux/generic/pending-4.19/203-kallsyms_uncompressed.patch
+++ b/target/linux/generic/pending-4.19/203-kallsyms_uncompressed.patch
@@ -65,7 +65,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int absolute_percpu = 0;
static int base_relative = 0;
-@@ -439,6 +440,9 @@ static void write_src(void)
+@@ -442,6 +443,9 @@ static void write_src(void)
free(markers);
@@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
output_label("kallsyms_token_table");
off = 0;
for (i = 0; i < 256; i++) {
-@@ -497,6 +501,9 @@ static void *find_token(unsigned char *s
+@@ -500,6 +504,9 @@ static void *find_token(unsigned char *s
{
int i;
@@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
for (i = 0; i < len - 1; i++) {
if (str[i] == token[0] && str[i+1] == token[1])
return &str[i];
-@@ -569,6 +576,9 @@ static void optimize_result(void)
+@@ -572,6 +579,9 @@ static void optimize_result(void)
{
int i, best;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* using the '\0' symbol last allows compress_symbols to use standard
* fast string functions */
for (i = 255; i >= 0; i--) {
-@@ -751,6 +761,8 @@ int main(int argc, char **argv)
+@@ -754,6 +764,8 @@ int main(int argc, char **argv)
absolute_percpu = 1;
else if (strcmp(argv[i], "--base-relative") == 0)
base_relative = 1;
diff --git a/target/linux/generic/pending-4.19/811-pci_disable_usb_common_quirks.patch b/target/linux/generic/pending-4.19/811-pci_disable_usb_common_quirks.patch
index 7d36af7d26..848aecaa87 100644
--- a/target/linux/generic/pending-4.19/811-pci_disable_usb_common_quirks.patch
+++ b/target/linux/generic/pending-4.19/811-pci_disable_usb_common_quirks.patch
@@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static struct amd_chipset_info {
struct pci_dev *nb_dev;
struct pci_dev *smbus_dev;
-@@ -621,6 +623,10 @@ bool usb_amd_pt_check_port(struct device
+@@ -628,6 +630,10 @@ bool usb_amd_pt_check_port(struct device
}
EXPORT_SYMBOL_GPL(usb_amd_pt_check_port);
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/*
* Make sure the controller is completely inactive, unable to
* generate interrupts or do DMA.
-@@ -700,8 +706,17 @@ reset_needed:
+@@ -707,8 +713,17 @@ reset_needed:
uhci_reset_hc(pdev, base);
return 1;
}
@@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask)
{
u16 cmd;
-@@ -1268,3 +1283,4 @@ static void quirk_usb_early_handoff(stru
+@@ -1275,3 +1290,4 @@ static void quirk_usb_early_handoff(stru
}
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff);
diff --git a/target/linux/mediatek/patches-4.19/0001-arm-dts-mediatek-add-basic-support-for-MT7629-SoC.patch b/target/linux/mediatek/patches-4.19/0001-arm-dts-mediatek-add-basic-support-for-MT7629-SoC.patch
index 904f44402a..a8b3f99331 100755..100644
--- a/target/linux/mediatek/patches-4.19/0001-arm-dts-mediatek-add-basic-support-for-MT7629-SoC.patch
+++ b/target/linux/mediatek/patches-4.19/0001-arm-dts-mediatek-add-basic-support-for-MT7629-SoC.patch
@@ -12,9 +12,6 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
4 files changed, 704 insertions(+)
create mode 100644 include/dt-bindings/reset/mt7629-resets.h
-diff --git a/include/dt-bindings/reset/mt7629-resets.h b/include/dt-bindings/reset/mt7629-resets.h
-new file mode 100644
-index 000000000000..6bb85734f68d
--- /dev/null
+++ b/include/dt-bindings/reset/mt7629-resets.h
@@ -0,0 +1,71 @@
@@ -89,6 +86,3 @@ index 000000000000..6bb85734f68d
+#define MT7629_ETHSYS_PPE_RST 31
+
+#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT7629 */
---
-2.18.0
-
diff --git a/target/linux/mediatek/patches-4.19/0001-eth-sync-from-mtk-lede.patch b/target/linux/mediatek/patches-4.19/0001-eth-sync-from-mtk-lede.patch
index c5521c416b..814f66cc4e 100644
--- a/target/linux/mediatek/patches-4.19/0001-eth-sync-from-mtk-lede.patch
+++ b/target/linux/mediatek/patches-4.19/0001-eth-sync-from-mtk-lede.patch
@@ -1,7 +1,5 @@
-Index: linux-4.19.57/drivers/net/ethernet/mediatek/Kconfig
-===================================================================
---- linux-4.19.57.orig/drivers/net/ethernet/mediatek/Kconfig
-+++ linux-4.19.57/drivers/net/ethernet/mediatek/Kconfig
+--- a/drivers/net/ethernet/mediatek/Kconfig
++++ b/drivers/net/ethernet/mediatek/Kconfig
@@ -1,6 +1,6 @@
config NET_VENDOR_MEDIATEK
bool "MediaTek ethernet driver"
@@ -10,10 +8,8 @@ Index: linux-4.19.57/drivers/net/ethernet/mediatek/Kconfig
---help---
If you have a Mediatek SoC with ethernet, say Y.
-Index: linux-4.19.57/drivers/net/ethernet/mediatek/Makefile
-===================================================================
---- linux-4.19.57.orig/drivers/net/ethernet/mediatek/Makefile
-+++ linux-4.19.57/drivers/net/ethernet/mediatek/Makefile
+--- a/drivers/net/ethernet/mediatek/Makefile
++++ b/drivers/net/ethernet/mediatek/Makefile
@@ -2,4 +2,5 @@
# Makefile for the Mediatek SoCs built-in ethernet macs
#
@@ -21,10 +17,8 @@ Index: linux-4.19.57/drivers/net/ethernet/mediatek/Makefile
-obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk_eth_soc.o
+obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk_eth_soc.o mtk_sgmii.o \
+ mtk_eth_path.o
-Index: linux-4.19.57/drivers/net/ethernet/mediatek/mtk_eth_path.c
-===================================================================
--- /dev/null
-+++ linux-4.19.57/drivers/net/ethernet/mediatek/mtk_eth_path.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_path.c
@@ -0,0 +1,333 @@
+/*
+ * Copyright (C) 2018 MediaTek Inc.
@@ -359,10 +353,8 @@ Index: linux-4.19.57/drivers/net/ethernet/mediatek/mtk_eth_path.c
+
+ return 0;
+}
-Index: linux-4.19.57/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-===================================================================
---- linux-4.19.57.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ linux-4.19.57/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -23,6 +23,7 @@
#include <linux/reset.h>
#include <linux/tcp.h>
@@ -1139,10 +1131,8 @@ Index: linux-4.19.57/drivers/net/ethernet/mediatek/mtk_eth_soc.c
{},
};
MODULE_DEVICE_TABLE(of, of_mtk_match);
-Index: linux-4.19.57/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-===================================================================
---- linux-4.19.57.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-+++ linux-4.19.57/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -15,13 +15,17 @@
#ifndef MTK_ETH_H
#define MTK_ETH_H
@@ -1537,10 +1527,8 @@ Index: linux-4.19.57/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+int mtk_setup_hw_path(struct mtk_eth *eth, int mac_id, int phymode);
+
#endif /* MTK_ETH_H */
-Index: linux-4.19.57/drivers/net/ethernet/mediatek/mtk_sgmii.c
-===================================================================
--- /dev/null
-+++ linux-4.19.57/drivers/net/ethernet/mediatek/mtk_sgmii.c
++++ b/drivers/net/ethernet/mediatek/mtk_sgmii.c
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2018 MediaTek Inc.
diff --git a/target/linux/mediatek/patches-4.19/0003-mt7531-gsw-internal_phy_calibration.patch b/target/linux/mediatek/patches-4.19/0003-mt7531-gsw-internal_phy_calibration.patch
index 7ade515a7f..8e4ef2ae1b 100644
--- a/target/linux/mediatek/patches-4.19/0003-mt7531-gsw-internal_phy_calibration.patch
+++ b/target/linux/mediatek/patches-4.19/0003-mt7531-gsw-internal_phy_calibration.patch
@@ -1,16 +1,15 @@
--- a/drivers/net/phy/mtk/mt753x/Makefile
+++ b/drivers/net/phy/mtk/mt753x/Makefile
-@@ -5,6 +5,6 @@
- obj-$(CONFIG_MT753X_GSW) += mt753x.o
+@@ -7,5 +7,5 @@ obj-$(CONFIG_MT753X_GSW) += mt753x.o
+ mt753x-$(CONFIG_SWCONFIG) += mt753x_swconfig.o
mt753x-y += mt753x_mdio.o mt7530.o mt7531.o \
- mt753x_common.o mt753x_nl.o
+ mt753x_common.o mt753x_nl.o mt753x_phy.o
-
--- a/drivers/net/phy/mtk/mt753x/mt7531.c
+++ b/drivers/net/phy/mtk/mt753x/mt7531.c
-@@ -454,6 +454,18 @@ static void mt7531_core_pll_setup(struct gsw_mt753x *gsw)
+@@ -582,6 +582,18 @@ static void mt7531_core_pll_setup(struct
static int mt7531_internal_phy_calibration(struct gsw_mt753x *gsw)
{
@@ -31,7 +30,7 @@
--- a/drivers/net/phy/mtk/mt753x/mt753x.h
+++ b/drivers/net/phy/mtk/mt753x/mt753x.h
-@@ -141,6 +141,8 @@ void mt753x_mmd_ind_write(struct gsw_mt753x *gsw, int addr, int devad, u16 reg,
+@@ -147,6 +147,8 @@ void mt753x_mmd_ind_write(struct gsw_mt7
void mt753x_irq_worker(struct work_struct *work);
void mt753x_irq_enable(struct gsw_mt753x *gsw);
@@ -990,8 +989,6 @@
+
+ return ret;
+}
-diff --git a/target/linux/generic/files/drivers/net/phy/mtk/mt753x/mt753x_phy.h b/target/linux/generic/files/drivers/net/phy/mtk/mt753x/mt753x_phy.h
-new file mode 100755
--- /dev/null
+++ b/drivers/net/phy/mtk/mt753x/mt753x_phy.h
@@ -0,0 +1,145 @@
diff --git a/target/linux/mediatek/patches-4.19/0003-switch-add-mt7531.patch b/target/linux/mediatek/patches-4.19/0003-switch-add-mt7531.patch
index 65e56e4940..096802a30e 100644
--- a/target/linux/mediatek/patches-4.19/0003-switch-add-mt7531.patch
+++ b/target/linux/mediatek/patches-4.19/0003-switch-add-mt7531.patch
@@ -1,7 +1,5 @@
-Index: linux-4.19.57/drivers/net/phy/Kconfig
-===================================================================
---- linux-4.19.57.orig/drivers/net/phy/Kconfig
-+++ linux-4.19.57/drivers/net/phy/Kconfig
+--- a/drivers/net/phy/Kconfig
++++ b/drivers/net/phy/Kconfig
@@ -292,6 +292,8 @@ config RTL8367B_PHY
endif # RTL8366_SMI
@@ -11,10 +9,8 @@ Index: linux-4.19.57/drivers/net/phy/Kconfig
comment "MII PHY device drivers"
config SFP
-Index: linux-4.19.57/drivers/net/phy/Makefile
-===================================================================
---- linux-4.19.57.orig/drivers/net/phy/Makefile
-+++ linux-4.19.57/drivers/net/phy/Makefile
+--- a/drivers/net/phy/Makefile
++++ b/drivers/net/phy/Makefile
@@ -100,3 +100,5 @@ obj-$(CONFIG_STE10XP) += ste10Xp.o
obj-$(CONFIG_TERANETICS_PHY) += teranetics.o
obj-$(CONFIG_VITESSE_PHY) += vitesse.o
diff --git a/target/linux/mediatek/patches-4.19/0227-arm-dts-Add-Unielec-U7623-DTS.patch b/target/linux/mediatek/patches-4.19/0227-arm-dts-Add-Unielec-U7623-DTS.patch
index d6e63714e3..88222908ea 100644
--- a/target/linux/mediatek/patches-4.19/0227-arm-dts-Add-Unielec-U7623-DTS.patch
+++ b/target/linux/mediatek/patches-4.19/0227-arm-dts-Add-Unielec-U7623-DTS.patch
@@ -11,10 +11,8 @@ Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
create mode 100644 arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
create mode 100644 arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
-Index: linux-4.19.57/arch/arm/boot/dts/Makefile
-===================================================================
---- linux-4.19.57.orig/arch/arm/boot/dts/Makefile
-+++ linux-4.19.57/arch/arm/boot/dts/Makefile
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
@@ -1193,6 +1193,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt7623a-rfb-nand.dtb \
mt7623n-rfb-emmc.dtb \
@@ -23,10 +21,8 @@ Index: linux-4.19.57/arch/arm/boot/dts/Makefile
mt8127-moose.dtb \
mt8135-evbp1.dtb
dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
-Index: linux-4.19.57/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
-===================================================================
--- /dev/null
-+++ linux-4.19.57/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
++++ b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2018 Kristian Evensen <kristian.evensen@gmail.com>
@@ -46,10 +42,8 @@ Index: linux-4.19.57/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
+ reg = <0 0x80000000 0 0x20000000>;
+ };
+};
-Index: linux-4.19.57/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
-===================================================================
--- /dev/null
-+++ linux-4.19.57/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
++++ b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
@@ -0,0 +1,366 @@
+/*
+ * Copyright 2018 Kristian Evensen <kristian.evensen@gmail.com>
diff --git a/target/linux/mediatek/patches-4.19/0301-mtd-mtk-ecc-move-mtk-ecc-header-file-to-include-mtd.patch b/target/linux/mediatek/patches-4.19/0301-mtd-mtk-ecc-move-mtk-ecc-header-file-to-include-mtd.patch
index fcfb3dc368..2f82a130c3 100755..100644
--- a/target/linux/mediatek/patches-4.19/0301-mtd-mtk-ecc-move-mtk-ecc-header-file-to-include-mtd.patch
+++ b/target/linux/mediatek/patches-4.19/0301-mtd-mtk-ecc-move-mtk-ecc-header-file-to-include-mtd.patch
@@ -12,8 +12,6 @@ Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
3 files changed, 2 insertions(+), 3 deletions(-)
rename {drivers/mtd/nand/raw => include/linux/mtd}/mtk_ecc.h (100%)
-diff --git a/drivers/mtd/nand/raw/mtk_ecc.c b/drivers/mtd/nand/raw/mtk_ecc.c
-index 6432bd70c3b3..32e9784b0d4f 100644
--- a/drivers/mtd/nand/raw/mtk_ecc.c
+++ b/drivers/mtd/nand/raw/mtk_ecc.c
@@ -23,8 +23,7 @@
@@ -26,8 +24,6 @@ index 6432bd70c3b3..32e9784b0d4f 100644
#define ECC_IDLE_MASK BIT(0)
#define ECC_IRQ_EN BIT(0)
-diff --git a/drivers/mtd/nand/raw/mtk_nand.c b/drivers/mtd/nand/raw/mtk_nand.c
-index 57b5ed1699e3..e201f1417fba 100644
--- a/drivers/mtd/nand/raw/mtk_nand.c
+++ b/drivers/mtd/nand/raw/mtk_nand.c
@@ -25,7 +25,7 @@
@@ -39,10 +35,107 @@ index 57b5ed1699e3..e201f1417fba 100644
/* NAND controller register definition */
#define NFI_CNFG (0x00)
-diff --git a/drivers/mtd/nand/raw/mtk_ecc.h b/include/linux/mtd/mtk_ecc.h
-similarity index 100%
-rename from drivers/mtd/nand/raw/mtk_ecc.h
-rename to include/linux/mtd/mtk_ecc.h
---
-2.20.1
-
+--- a/drivers/mtd/nand/raw/mtk_ecc.h
++++ /dev/null
+@@ -1,49 +0,0 @@
+-/*
+- * MTK SDG1 ECC controller
+- *
+- * Copyright (c) 2016 Mediatek
+- * Authors: Xiaolei Li <xiaolei.li@mediatek.com>
+- * Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
+- * 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
+- * by the Free Software Foundation.
+- */
+-
+-#ifndef __DRIVERS_MTD_NAND_MTK_ECC_H__
+-#define __DRIVERS_MTD_NAND_MTK_ECC_H__
+-
+-#include <linux/types.h>
+-
+-enum mtk_ecc_mode {ECC_DMA_MODE = 0, ECC_NFI_MODE = 1};
+-enum mtk_ecc_operation {ECC_ENCODE, ECC_DECODE};
+-
+-struct device_node;
+-struct mtk_ecc;
+-
+-struct mtk_ecc_stats {
+- u32 corrected;
+- u32 bitflips;
+- u32 failed;
+-};
+-
+-struct mtk_ecc_config {
+- enum mtk_ecc_operation op;
+- enum mtk_ecc_mode mode;
+- dma_addr_t addr;
+- u32 strength;
+- u32 sectors;
+- u32 len;
+-};
+-
+-int mtk_ecc_encode(struct mtk_ecc *, struct mtk_ecc_config *, u8 *, u32);
+-void mtk_ecc_get_stats(struct mtk_ecc *, struct mtk_ecc_stats *, int);
+-int mtk_ecc_wait_done(struct mtk_ecc *, enum mtk_ecc_operation);
+-int mtk_ecc_enable(struct mtk_ecc *, struct mtk_ecc_config *);
+-void mtk_ecc_disable(struct mtk_ecc *);
+-void mtk_ecc_adjust_strength(struct mtk_ecc *ecc, u32 *p);
+-unsigned int mtk_ecc_get_parity_bits(struct mtk_ecc *ecc);
+-
+-struct mtk_ecc *of_mtk_ecc_get(struct device_node *);
+-void mtk_ecc_release(struct mtk_ecc *);
+-
+-#endif
+--- /dev/null
++++ b/include/linux/mtd/mtk_ecc.h
+@@ -0,0 +1,49 @@
++/*
++ * MTK SDG1 ECC controller
++ *
++ * Copyright (c) 2016 Mediatek
++ * Authors: Xiaolei Li <xiaolei.li@mediatek.com>
++ * Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
++ * 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
++ * by the Free Software Foundation.
++ */
++
++#ifndef __DRIVERS_MTD_NAND_MTK_ECC_H__
++#define __DRIVERS_MTD_NAND_MTK_ECC_H__
++
++#include <linux/types.h>
++
++enum mtk_ecc_mode {ECC_DMA_MODE = 0, ECC_NFI_MODE = 1};
++enum mtk_ecc_operation {ECC_ENCODE, ECC_DECODE};
++
++struct device_node;
++struct mtk_ecc;
++
++struct mtk_ecc_stats {
++ u32 corrected;
++ u32 bitflips;
++ u32 failed;
++};
++
++struct mtk_ecc_config {
++ enum mtk_ecc_operation op;
++ enum mtk_ecc_mode mode;
++ dma_addr_t addr;
++ u32 strength;
++ u32 sectors;
++ u32 len;
++};
++
++int mtk_ecc_encode(struct mtk_ecc *, struct mtk_ecc_config *, u8 *, u32);
++void mtk_ecc_get_stats(struct mtk_ecc *, struct mtk_ecc_stats *, int);
++int mtk_ecc_wait_done(struct mtk_ecc *, enum mtk_ecc_operation);
++int mtk_ecc_enable(struct mtk_ecc *, struct mtk_ecc_config *);
++void mtk_ecc_disable(struct mtk_ecc *);
++void mtk_ecc_adjust_strength(struct mtk_ecc *ecc, u32 *p);
++unsigned int mtk_ecc_get_parity_bits(struct mtk_ecc *ecc);
++
++struct mtk_ecc *of_mtk_ecc_get(struct device_node *);
++void mtk_ecc_release(struct mtk_ecc *);
++
++#endif
diff --git a/target/linux/mediatek/patches-4.19/0303-mtd-spinand-disable-on-die-ECC.patch b/target/linux/mediatek/patches-4.19/0303-mtd-spinand-disable-on-die-ECC.patch
index eeb096acda..cdf214688c 100755..100644
--- a/target/linux/mediatek/patches-4.19/0303-mtd-spinand-disable-on-die-ECC.patch
+++ b/target/linux/mediatek/patches-4.19/0303-mtd-spinand-disable-on-die-ECC.patch
@@ -9,11 +9,9 @@ Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
drivers/mtd/nand/spi/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
-index 30f83649c481..3b6eac391350 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
-@@ -554,7 +554,7 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from,
+@@ -552,7 +552,7 @@ static int spinand_mtd_read(struct mtd_i
int ret = 0;
if (ops->mode != MTD_OPS_RAW && spinand->eccinfo.ooblayout)
@@ -22,7 +20,7 @@ index 30f83649c481..3b6eac391350 100644
mutex_lock(&spinand->lock);
-@@ -602,7 +602,7 @@ static int spinand_mtd_write(struct mtd_info *mtd, loff_t to,
+@@ -600,7 +600,7 @@ static int spinand_mtd_write(struct mtd_
int ret = 0;
if (ops->mode != MTD_OPS_RAW && mtd->ooblayout)
@@ -31,6 +29,3 @@ index 30f83649c481..3b6eac391350 100644
mutex_lock(&spinand->lock);
---
-2.20.1
-
diff --git a/target/linux/mediatek/patches-4.19/0304-dt-bindings-ARM-MediaTek-Document-devicetree-binding.patch b/target/linux/mediatek/patches-4.19/0304-dt-bindings-ARM-MediaTek-Document-devicetree-binding.patch
index a605fd1190..29c4b951e6 100755..100644
--- a/target/linux/mediatek/patches-4.19/0304-dt-bindings-ARM-MediaTek-Document-devicetree-binding.patch
+++ b/target/linux/mediatek/patches-4.19/0304-dt-bindings-ARM-MediaTek-Document-devicetree-binding.patch
@@ -11,9 +11,6 @@ Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
1 file changed, 44 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/spi-mtk-snfi.txt
-diff --git a/Documentation/devicetree/bindings/spi/spi-mtk-snfi.txt b/Documentation/devicetree/bindings/spi/spi-mtk-snfi.txt
-new file mode 100644
-index 000000000000..a09c476c5289
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-mtk-snfi.txt
@@ -0,0 +1,44 @@
@@ -61,6 +58,3 @@ index 000000000000..a09c476c5289
+ reg = <0>;
+ };
+};
---
-2.20.1
-
diff --git a/target/linux/mediatek/patches-4.19/0306-spi-spi-mem-MediaTek-Add-SPI-NAND-Flash-interface-dr.patch b/target/linux/mediatek/patches-4.19/0306-spi-spi-mem-MediaTek-Add-SPI-NAND-Flash-interface-dr.patch
index c307abead9..2370925372 100644
--- a/target/linux/mediatek/patches-4.19/0306-spi-spi-mem-MediaTek-Add-SPI-NAND-Flash-interface-dr.patch
+++ b/target/linux/mediatek/patches-4.19/0306-spi-spi-mem-MediaTek-Add-SPI-NAND-Flash-interface-dr.patch
@@ -13,10 +13,8 @@ Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
3 files changed, 1193 insertions(+)
create mode 100644 drivers/spi/spi-mtk-snfi.c
-Index: linux-4.19.48/drivers/spi/spi-mtk-snfi.c
-===================================================================
--- /dev/null
-+++ linux-4.19.48/drivers/spi/spi-mtk-snfi.c
++++ b/drivers/spi/spi-mtk-snfi.c
@@ -0,0 +1,1183 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
@@ -1201,10 +1199,8 @@ Index: linux-4.19.48/drivers/spi/spi-mtk-snfi.c
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Xiangsheng Hou <xiangsheng.hou@mediatek.com>");
+MODULE_DESCRIPTION("Mediatek SPI Memory Interface Driver");
-Index: linux-4.19.48/drivers/spi/Kconfig
-===================================================================
---- linux-4.19.48.orig/drivers/spi/Kconfig
-+++ linux-4.19.48/drivers/spi/Kconfig
+--- a/drivers/spi/Kconfig
++++ b/drivers/spi/Kconfig
@@ -389,6 +389,15 @@ config SPI_MT65XX
say Y or M here.If you are not sure, say N.
SPI drivers for Mediatek MT65XX and MT81XX series ARM SoCs.
@@ -1221,10 +1217,8 @@ Index: linux-4.19.48/drivers/spi/Kconfig
config SPI_NUC900
tristate "Nuvoton NUC900 series SPI"
depends on ARCH_W90X900
-Index: linux-4.19.48/drivers/spi/Makefile
-===================================================================
---- linux-4.19.48.orig/drivers/spi/Makefile
-+++ linux-4.19.48/drivers/spi/Makefile
+--- a/drivers/spi/Makefile
++++ b/drivers/spi/Makefile
@@ -57,6 +57,7 @@ obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mp
obj-$(CONFIG_SPI_MPC52xx_PSC) += spi-mpc52xx-psc.o
obj-$(CONFIG_SPI_MPC52xx) += spi-mpc52xx.o
diff --git a/target/linux/mediatek/patches-4.19/0900-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-4.19/0900-bt-mtk-serial-fix.patch
index ae1ef16a79..330d2a5b77 100755..100644
--- a/target/linux/mediatek/patches-4.19/0900-bt-mtk-serial-fix.patch
+++ b/target/linux/mediatek/patches-4.19/0900-bt-mtk-serial-fix.patch
@@ -1,8 +1,6 @@
-diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
-index ebfb0bd..2b9ba39 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
-@@ -80,6 +80,7 @@ struct serial8250_config {
+@@ -80,6 +80,7 @@ struct serial8250_config {
#define UART_CAP_MINI (1 << 17) /* Mini UART on BCM283X family lacks:
* STOP PARITY EPAR SPAR WLEN5 WLEN6
*/
@@ -10,11 +8,9 @@ index ebfb0bd..2b9ba39 100644
#define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */
#define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */
-diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
-index c39482b..e4a69a0 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
-@@ -297,7 +297,7 @@
+@@ -297,7 +297,7 @@ static const struct serial8250_config ua
.tx_loadsz = 16,
.fcr = UART_FCR_ENABLE_FIFO |
UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT,
@@ -23,7 +19,7 @@ index c39482b..e4a69a0 100644
},
[PORT_NPCM] = {
.name = "Nuvoton 16550",
-@@ -2663,6 +2663,11 @@ static unsigned int serial8250_get_baud_rate(struct uart_port *port,
+@@ -2644,6 +2644,11 @@ serial8250_do_set_termios(struct uart_po
unsigned long flags;
unsigned int baud, quot, frac = 0;