From 8072264b96785184b76aa46bcd08b4f9cdfada42 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Mon, 22 Aug 2016 19:05:45 +0200 Subject: [PATCH] kernel: update kernel 4.4 to version 4.4.19 Refresh patches for all targets that support kernel 4.4. Compile-tested on all targets that use kernel 4.4 and aren't marked broken. Runtime-tested on ar71xx, octeon and x86/64. Signed-off-by: Stijn Tintel --- include/kernel-version.mk | 4 +- ...-integrate-ppc4xx-rng-into-crypto4xx.patch | 38 +---- .../002-powerpc_ibm_phy_add_ar8035.patch | 7 +- ...ansfer-termination-synchronization-s.patch | 13 +- ...ntroduce-new-universal-API-to-reques.patch | 26 +--- ...ansfer-termination-synchronization-s.patch | 27 +--- .../patches-4.4/015-dmaengine-dw-fixed.patch | 21 +-- .../apm821xx/patches-4.4/020-sata-dwc.patch | 77 +++++----- .../patches-4.4/030-usb-dwc2-endian-fix.patch | 95 ------------ .../200-add-meraki-mr24-ikarem-support.patch | 3 +- .../201-add-amcc-apollo3g-support.patch | 8 +- .../202-add-netgear-wndr4700-support.patch | 8 +- .../300-fix-atheros-nics-on-apm82181.patch | 4 +- .../301-fix-memory-map-wndr4700.patch | 4 +- .../701-powerpc_ibm_apm82181_phyclk_fix.patch | 12 +- .../702-powerpc_ibm_phy_add_dt_parser.patch | 17 +-- .../800-usb-dwc2-add-wndr4700-otg.patch | 4 +- ...mware-loader-for-uPD720201-and-uPD72.patch | 11 +- .../802-usb-xhci-force-msi-renesas-xhci.patch | 21 ++- ...-for-Microchip-TC654-TC655-PWM-fan-c.patch | 14 +- ...it-set-and-show-temp-as-common-codes.patch | 142 ++++++++---------- ...mon-lm90-expose-to-thermal-fw-via-DT.patch | 32 ++-- .../910-unaligned_access_hacks.patch | 8 +- ...NFIG_MEMCG-but-leave-it-disabled-due.patch | 4 +- ...wr_led-and-the-required-input-trigge.patch | 2 +- .../0111-mm-Remove-the-PFN-busy-warning.patch | 2 +- ...erify-planes-array-in-buffer-dequeue.patch | 53 ------- ...ch-GPIO-portions-to-use-GPIOLIB_IRQC.patch | 4 +- .../patches-4.4/021-bcma-from-4.6.patch | 6 +- ...nce-error-output-if-MS_SILENT-is-set.patch | 2 +- ...ence-early-error-if-MS_SILENT-is-set.patch | 4 +- ...ix-infinite-loop-in-bgmac_dma_tx_add.patch | 27 ---- ...e-that-.debug_frame-is-generated-vs..patch | 41 ----- .../096-arc-add-model-property-in-dts.patch | 29 ---- ...make-challenge-acks-less-predictable.patch | 76 ---------- ...ort-BCM53573-series-of-wireless-SoCs.patch | 2 +- .../patches-4.4/204-module_strip.patch | 4 +- .../generic/patches-4.4/220-gc_sections.patch | 12 +- .../patches-4.4/221-module_exports.patch | 2 +- .../332-arc-add-OWRTDTB-section.patch | 4 +- ...mtd-device-named-ubi-or-data-on-boot.patch | 4 +- .../patches-4.4/655-increase_skb_pad.patch | 2 +- .../generic/patches-4.4/721-phy_packets.patch | 4 +- .../patches-4.4/834-ledtrig-libata.patch | 8 +- ...7-usb-dwc3-add-generic-OF-glue-layer.patch | 14 +- ...c3-of-simple-fix-build-warning-on-PM.patch | 15 +- ...impossible-check-for-of_clk_get_pare.patch | 19 +-- ...-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch | 10 +- ...ke-sure-mode-is-only-determined-once.patch | 75 +++++---- ...i-qup-Fix-transaction-done-signaling.patch | 11 +- ...i-qup-Fix-DMA-mode-to-work-correctly.patch | 85 +++++------ ...qup-Fix-block-mode-to-work-correctly.patch | 85 +++++------ ...qup-properly-detect-extra-interrupts.patch | 19 +-- ...-read-opflags-to-see-if-transaction-.patch | 11 +- .../801-override-compiler-flags.patch | 4 +- ...ackport-v4.7-0day-patches-from-Boris.patch | 26 ++-- ...vebu-make-device-IO-strongly-ordered.patch | 47 ------ ...5-linksys_armada_385_fix_crypto_sram.patch | 13 -- .../001-omap4_pandaboard-wlan_fix.patch | 7 +- .../oxnas/patches-4.4/999-libata-hacks.patch | 4 +- ...54-mtd-add-chunked-read-io-to-m25p80.patch | 6 +- 61 files changed, 400 insertions(+), 939 deletions(-) delete mode 100644 target/linux/apm821xx/patches-4.4/030-usb-dwc2-endian-fix.patch delete mode 100644 target/linux/brcm2708/patches-4.4/0317-videobuf2-v4l2-Verify-planes-array-in-buffer-dequeue.patch delete mode 100644 target/linux/generic/patches-4.4/076-0003-net-bgmac-Fix-infinite-loop-in-bgmac_dma_tx_add.patch delete mode 100644 target/linux/generic/patches-4.4/095-ARC-unwind-ensure-that-.debug_frame-is-generated-vs..patch delete mode 100644 target/linux/generic/patches-4.4/096-tcp-make-challenge-acks-less-predictable.patch delete mode 100644 target/linux/mvebu/patches-4.4/024-mvebu-make-device-IO-strongly-ordered.patch delete mode 100644 target/linux/mvebu/patches-4.4/105-linksys_armada_385_fix_crypto_sram.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 36097bbe26..150fd3fda0 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -4,11 +4,11 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .29 LINUX_VERSION-4.1 = .20 -LINUX_VERSION-4.4 = .15 +LINUX_VERSION-4.4 = .19 LINUX_KERNEL_MD5SUM-3.18.29 = b25737a0bc98e80d12200de93f239c28 LINUX_KERNEL_MD5SUM-4.1.20 = 075c38a3a23ca5bc80437b13606df00a -LINUX_KERNEL_MD5SUM-4.4.15 = 7b59c25c783173969bfb62cac4f057ce +LINUX_KERNEL_MD5SUM-4.4.19 = 03dfcd3522015afde8d7a5c0b6e5d6b6 ifdef KERNEL_PATCHVER LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) diff --git a/target/linux/apm821xx/patches-4.4/001-crypto4xx-integrate-ppc4xx-rng-into-crypto4xx.patch b/target/linux/apm821xx/patches-4.4/001-crypto4xx-integrate-ppc4xx-rng-into-crypto4xx.patch index b395f0f7a3..324c695d05 100644 --- a/target/linux/apm821xx/patches-4.4/001-crypto4xx-integrate-ppc4xx-rng-into-crypto4xx.patch +++ b/target/linux/apm821xx/patches-4.4/001-crypto4xx-integrate-ppc4xx-rng-into-crypto4xx.patch @@ -25,8 +25,6 @@ Signed-off-by: Herbert Xu create mode 100644 drivers/crypto/amcc/crypto4xx_trng.c create mode 100644 drivers/crypto/amcc/crypto4xx_trng.h -diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig -index c76a88d..ac51149 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@ -268,19 +268,6 @@ config HW_RANDOM_NOMADIK @@ -49,11 +47,9 @@ index c76a88d..ac51149 100644 config HW_RANDOM_PSERIES tristate "pSeries HW Random Number Generator support" depends on PPC64 && IBMVIO -diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile -index e09305b..63022b4 100644 --- a/drivers/char/hw_random/Makefile +++ b/drivers/char/hw_random/Makefile -@@ -22,7 +22,6 @@ obj-$(CONFIG_HW_RANDOM_TX4939) += tx4939-rng.o +@@ -22,7 +22,6 @@ obj-$(CONFIG_HW_RANDOM_TX4939) += tx4939 obj-$(CONFIG_HW_RANDOM_MXC_RNGA) += mxc-rnga.o obj-$(CONFIG_HW_RANDOM_OCTEON) += octeon-rng.o obj-$(CONFIG_HW_RANDOM_NOMADIK) += nomadik-rng.o @@ -61,9 +57,6 @@ index e09305b..63022b4 100644 obj-$(CONFIG_HW_RANDOM_PSERIES) += pseries-rng.o obj-$(CONFIG_HW_RANDOM_POWERNV) += powernv-rng.o obj-$(CONFIG_HW_RANDOM_EXYNOS) += exynos-rng.o -diff --git a/drivers/char/hw_random/ppc4xx-rng.c b/drivers/char/hw_random/ppc4xx-rng.c -deleted file mode 100644 -index c0db438..0000000 --- a/drivers/char/hw_random/ppc4xx-rng.c +++ /dev/null @@ -1,147 +0,0 @@ @@ -214,11 +207,9 @@ index c0db438..0000000 -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Josh Boyer "); -MODULE_DESCRIPTION("HW RNG driver for PPC 4xx processors"); -diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig -index 0a22ac7..12fd499 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig -@@ -279,6 +279,14 @@ config CRYPTO_DEV_PPC4XX +@@ -277,6 +277,14 @@ config CRYPTO_DEV_PPC4XX help This option allows you to have support for AMCC crypto acceleration. @@ -233,16 +224,12 @@ index 0a22ac7..12fd499 100644 config CRYPTO_DEV_OMAP_SHAM tristate "Support for OMAP MD5/SHA1/SHA2 hw accelerator" depends on ARCH_OMAP2PLUS -diff --git a/drivers/crypto/amcc/Makefile b/drivers/crypto/amcc/Makefile -index 5c0c62b..b955399 100644 --- a/drivers/crypto/amcc/Makefile +++ b/drivers/crypto/amcc/Makefile @@ -1,2 +1,3 @@ obj-$(CONFIG_CRYPTO_DEV_PPC4XX) += crypto4xx.o crypto4xx-y := crypto4xx_core.o crypto4xx_alg.o crypto4xx_sa.o +crypto4xx-$(CONFIG_HW_RANDOM_PPC4XX) += crypto4xx_trng.o -diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c -index 62134c8..dae1e39 100644 --- a/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c @@ -40,6 +40,7 @@ @@ -253,7 +240,7 @@ index 62134c8..dae1e39 100644 #define PPC4XX_SEC_VERSION_STR "0.5" -@@ -1225,6 +1226,7 @@ static int crypto4xx_probe(struct platform_device *ofdev) +@@ -1221,6 +1222,7 @@ static int crypto4xx_probe(struct platfo if (rc) goto err_start_dev; @@ -261,7 +248,7 @@ index 62134c8..dae1e39 100644 return 0; err_start_dev: -@@ -1252,6 +1254,8 @@ static int crypto4xx_remove(struct platform_device *ofdev) +@@ -1248,6 +1250,8 @@ static int crypto4xx_remove(struct platf struct device *dev = &ofdev->dev; struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev); @@ -270,7 +257,7 @@ index 62134c8..dae1e39 100644 free_irq(core_dev->irq, dev); irq_dispose_mapping(core_dev->irq); -@@ -1272,7 +1276,7 @@ MODULE_DEVICE_TABLE(of, crypto4xx_match); +@@ -1268,7 +1272,7 @@ MODULE_DEVICE_TABLE(of, crypto4xx_match) static struct platform_driver crypto4xx_driver = { .driver = { @@ -279,13 +266,11 @@ index 62134c8..dae1e39 100644 .of_match_table = crypto4xx_match, }, .probe = crypto4xx_probe, -@@ -1284,4 +1288,3 @@ module_platform_driver(crypto4xx_driver); +@@ -1280,4 +1284,3 @@ module_platform_driver(crypto4xx_driver) MODULE_LICENSE("GPL"); MODULE_AUTHOR("James Hsiao "); MODULE_DESCRIPTION("Driver for AMCC PPC4xx crypto accelerator"); - -diff --git a/drivers/crypto/amcc/crypto4xx_core.h b/drivers/crypto/amcc/crypto4xx_core.h -index bac0bde..ecfdcfe 100644 --- a/drivers/crypto/amcc/crypto4xx_core.h +++ b/drivers/crypto/amcc/crypto4xx_core.h @@ -24,6 +24,8 @@ @@ -313,8 +298,6 @@ index bac0bde..ecfdcfe 100644 u32 int_status; u32 irq; struct tasklet_struct tasklet; -diff --git a/drivers/crypto/amcc/crypto4xx_reg_def.h b/drivers/crypto/amcc/crypto4xx_reg_def.h -index 5f5fbc0..46fe57c 100644 --- a/drivers/crypto/amcc/crypto4xx_reg_def.h +++ b/drivers/crypto/amcc/crypto4xx_reg_def.h @@ -125,6 +125,7 @@ @@ -325,9 +308,6 @@ index 5f5fbc0..46fe57c 100644 #define PPC4XX_INT_DESCR_CNT 4 #define PPC4XX_INT_TIMEOUT_CNT 0 #define PPC4XX_INT_CFG 1 -diff --git a/drivers/crypto/amcc/crypto4xx_trng.c b/drivers/crypto/amcc/crypto4xx_trng.c -new file mode 100644 -index 0000000..677ca17 --- /dev/null +++ b/drivers/crypto/amcc/crypto4xx_trng.c @@ -0,0 +1,131 @@ @@ -462,9 +442,6 @@ index 0000000..677ca17 +} + +MODULE_ALIAS("ppc4xx_rng"); -diff --git a/drivers/crypto/amcc/crypto4xx_trng.h b/drivers/crypto/amcc/crypto4xx_trng.h -new file mode 100644 -index 0000000..931d225 --- /dev/null +++ b/drivers/crypto/amcc/crypto4xx_trng.h @@ -0,0 +1,34 @@ @@ -502,6 +479,3 @@ index 0000000..931d225 +#endif + +#endif --- -2.8.1 - diff --git a/target/linux/apm821xx/patches-4.4/002-powerpc_ibm_phy_add_ar8035.patch b/target/linux/apm821xx/patches-4.4/002-powerpc_ibm_phy_add_ar8035.patch index b7316e15b3..f885167e04 100644 --- a/target/linux/apm821xx/patches-4.4/002-powerpc_ibm_phy_add_ar8035.patch +++ b/target/linux/apm821xx/patches-4.4/002-powerpc_ibm_phy_add_ar8035.patch @@ -14,11 +14,9 @@ Signed-off-by: Christian Lamparter drivers/net/ethernet/ibm/emac/phy.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) -diff --git a/drivers/net/ethernet/ibm/emac/phy.c b/drivers/net/ethernet/ibm/emac/phy.c -index d3b9d10..5b88cc6 100644 --- a/drivers/net/ethernet/ibm/emac/phy.c +++ b/drivers/net/ethernet/ibm/emac/phy.c -@@ -470,12 +470,38 @@ static struct mii_phy_def m88e1112_phy_def = { +@@ -470,12 +470,38 @@ static struct mii_phy_def m88e1112_phy_d .ops = &m88e1112_phy_ops, }; @@ -57,6 +55,3 @@ index d3b9d10..5b88cc6 100644 &genmii_phy_def, NULL }; --- -2.8.1 - diff --git a/target/linux/apm821xx/patches-4.4/010-dmaengine-Add-transfer-termination-synchronization-s.patch b/target/linux/apm821xx/patches-4.4/010-dmaengine-Add-transfer-termination-synchronization-s.patch index 924f7970a8..89bdd49d2b 100644 --- a/target/linux/apm821xx/patches-4.4/010-dmaengine-Add-transfer-termination-synchronization-s.patch +++ b/target/linux/apm821xx/patches-4.4/010-dmaengine-Add-transfer-termination-synchronization-s.patch @@ -17,11 +17,9 @@ Signed-off-by: Vinod Koul drivers/dma/dmaengine.c | 81 +++++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 39 deletions(-) -diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c -index f2cbff9..81a36fc 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c -@@ -542,6 +542,42 @@ static struct dma_chan *private_candidate(const dma_cap_mask_t *mask, +@@ -542,6 +542,42 @@ static struct dma_chan *private_candidat return NULL; } @@ -64,7 +62,7 @@ index f2cbff9..81a36fc 100644 /** * dma_get_slave_channel - try to get specific channel exclusively * @chan: target channel -@@ -580,7 +616,6 @@ struct dma_chan *dma_get_any_slave_channel(struct dma_device *device) +@@ -580,7 +616,6 @@ struct dma_chan *dma_get_any_slave_chann { dma_cap_mask_t mask; struct dma_chan *chan; @@ -72,7 +70,7 @@ index f2cbff9..81a36fc 100644 dma_cap_zero(mask); dma_cap_set(DMA_SLAVE, mask); -@@ -588,23 +623,11 @@ struct dma_chan *dma_get_any_slave_channel(struct dma_device *device) +@@ -588,23 +623,11 @@ struct dma_chan *dma_get_any_slave_chann /* lock against __dma_request_channel */ mutex_lock(&dma_list_mutex); @@ -98,7 +96,7 @@ index f2cbff9..81a36fc 100644 } EXPORT_SYMBOL_GPL(dma_get_any_slave_channel); -@@ -621,35 +644,15 @@ struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, +@@ -621,35 +644,15 @@ struct dma_chan *__dma_request_channel(c { struct dma_device *device, *_d; struct dma_chan *chan = NULL; @@ -138,6 +136,3 @@ index f2cbff9..81a36fc 100644 } mutex_unlock(&dma_list_mutex); --- -2.8.1 - diff --git a/target/linux/apm821xx/patches-4.4/011-dmaengine-core-Introduce-new-universal-API-to-reques.patch b/target/linux/apm821xx/patches-4.4/011-dmaengine-core-Introduce-new-universal-API-to-reques.patch index 0296714639..7a0e26f6a3 100644 --- a/target/linux/apm821xx/patches-4.4/011-dmaengine-core-Introduce-new-universal-API-to-reques.patch +++ b/target/linux/apm821xx/patches-4.4/011-dmaengine-core-Introduce-new-universal-API-to-reques.patch @@ -69,11 +69,9 @@ Signed-off-by: Vinod Koul include/linux/dmaengine.h | 51 +++++++++++++++++++--- 3 files changed, 127 insertions(+), 36 deletions(-) -diff --git a/Documentation/dmaengine/client.txt b/Documentation/dmaengine/client.txt -index 11fb87f..4b04d89 100644 --- a/Documentation/dmaengine/client.txt +++ b/Documentation/dmaengine/client.txt -@@ -22,25 +22,14 @@ The slave DMA usage consists of following steps: +@@ -22,25 +22,14 @@ The slave DMA usage consists of followin Channel allocation is slightly different in the slave DMA context, client drivers typically need a channel from a particular DMA controller only and even in some cases a specific channel is desired. @@ -86,7 +84,8 @@ index 11fb87f..4b04d89 100644 - void *filter_param); - where dma_filter_fn is defined as: - typedef bool (*dma_filter_fn)(struct dma_chan *chan, void *filter_param); -- ++ struct dma_chan *dma_request_chan(struct device *dev, const char *name); + - The 'filter_fn' parameter is optional, but highly recommended for - slave and cyclic channels as they typically need to obtain a specific - DMA channel. @@ -97,16 +96,12 @@ index 11fb87f..4b04d89 100644 - Otherwise, the 'filter_fn' routine will be called once for each free - channel which has a capability in 'mask'. 'filter_fn' is expected to - return 'true' when the desired DMA channel is found. -+ struct dma_chan *dma_request_chan(struct device *dev, const char *name); -+ + Which will find and return the 'name' DMA channel associated with the 'dev' + device. The association is done via DT, ACPI or board file based + dma_slave_map matching table. A channel allocated via this interface is exclusive to the caller, until dma_release_channel() is called. -diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c -index 81a36fc..a094dbb 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -43,6 +43,7 @@ @@ -117,7 +112,7 @@ index 81a36fc..a094dbb 100644 #include #include #include -@@ -665,27 +666,73 @@ struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, +@@ -665,27 +666,73 @@ struct dma_chan *__dma_request_channel(c } EXPORT_SYMBOL_GPL(__dma_request_channel); @@ -199,7 +194,7 @@ index 81a36fc..a094dbb 100644 /** * dma_request_slave_channel - try to allocate an exclusive slave channel -@@ -697,17 +744,35 @@ EXPORT_SYMBOL_GPL(dma_request_slave_channel_reason); +@@ -697,17 +744,35 @@ EXPORT_SYMBOL_GPL(dma_request_slave_chan struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name) { @@ -239,8 +234,6 @@ index 81a36fc..a094dbb 100644 void dma_release_channel(struct dma_chan *chan) { mutex_lock(&dma_list_mutex); -diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h -index c47c68e..d50a6b51 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -607,11 +607,38 @@ enum dmaengine_alignment { @@ -290,7 +283,7 @@ index c47c68e..d50a6b51 100644 dma_cap_mask_t cap_mask; unsigned short max_xor; unsigned short max_pq; -@@ -1140,9 +1168,11 @@ enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); +@@ -1140,9 +1168,11 @@ enum dma_status dma_wait_for_async_tx(st void dma_issue_pending_all(void); struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); @@ -304,7 +297,7 @@ index c47c68e..d50a6b51 100644 void dma_release_channel(struct dma_chan *chan); int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps); #else -@@ -1166,16 +1196,21 @@ static inline struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, +@@ -1166,16 +1196,21 @@ static inline struct dma_chan *__dma_req { return NULL; } @@ -331,7 +324,7 @@ index c47c68e..d50a6b51 100644 static inline void dma_release_channel(struct dma_chan *chan) { } -@@ -1186,6 +1221,8 @@ static inline int dma_get_slave_caps(struct dma_chan *chan, +@@ -1186,6 +1221,8 @@ static inline int dma_get_slave_caps(str } #endif @@ -340,6 +333,3 @@ index c47c68e..d50a6b51 100644 static inline int dmaengine_desc_set_reuse(struct dma_async_tx_descriptor *tx) { struct dma_slave_caps caps; --- -2.8.1 - diff --git a/target/linux/apm821xx/patches-4.4/012-dmaengine-Add-transfer-termination-synchronization-s.patch b/target/linux/apm821xx/patches-4.4/012-dmaengine-Add-transfer-termination-synchronization-s.patch index 8fcf8caa8a..21efb046c2 100644 --- a/target/linux/apm821xx/patches-4.4/012-dmaengine-Add-transfer-termination-synchronization-s.patch +++ b/target/linux/apm821xx/patches-4.4/012-dmaengine-Add-transfer-termination-synchronization-s.patch @@ -53,11 +53,9 @@ Signed-off-by: Vinod Koul include/linux/dmaengine.h | 90 ++++++++++++++++++++++++++++++++++++ 4 files changed, 148 insertions(+), 5 deletions(-) -diff --git a/Documentation/dmaengine/client.txt b/Documentation/dmaengine/client.txt -index 11fb87f..d9f9f46 100644 --- a/Documentation/dmaengine/client.txt +++ b/Documentation/dmaengine/client.txt -@@ -128,7 +128,7 @@ The slave DMA usage consists of following steps: +@@ -117,7 +117,7 @@ The slave DMA usage consists of followin transaction. For cyclic DMA, a callback function may wish to terminate the @@ -66,7 +64,7 @@ index 11fb87f..d9f9f46 100644 Therefore, it is important that DMA engine drivers drop any locks before calling the callback function which may cause a -@@ -166,12 +166,29 @@ The slave DMA usage consists of following steps: +@@ -155,12 +155,29 @@ The slave DMA usage consists of followin Further APIs: @@ -97,7 +95,7 @@ index 11fb87f..d9f9f46 100644 2. int dmaengine_pause(struct dma_chan *chan) This pauses activity on the DMA channel without data loss. -@@ -197,3 +214,20 @@ Further APIs: +@@ -186,3 +203,20 @@ Further APIs: a running DMA channel. It is recommended that DMA engine users pause or stop (via dmaengine_terminate_all()) the channel before using this API. @@ -118,8 +116,6 @@ index 11fb87f..d9f9f46 100644 + + The behavior of this function is undefined if dma_async_issue_pending() has + been called between dmaengine_terminate_async() and this function. -diff --git a/Documentation/dmaengine/provider.txt b/Documentation/dmaengine/provider.txt -index 67d4ce4..122b7f4 100644 --- a/Documentation/dmaengine/provider.txt +++ b/Documentation/dmaengine/provider.txt @@ -327,8 +327,24 @@ supported. @@ -149,11 +145,9 @@ index 67d4ce4..122b7f4 100644 Misc notes (stuff that should be documented, but don't really know where to put them) -diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c -index 3ecec14..d6fc82e 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c -@@ -265,8 +265,11 @@ static void dma_chan_put(struct dma_chan *chan) +@@ -266,8 +266,11 @@ static void dma_chan_put(struct dma_chan module_put(dma_chan_to_owner(chan)); /* This channel is not in use anymore, free it */ @@ -166,11 +160,9 @@ index 3ecec14..d6fc82e 100644 /* If the channel is used via a DMA request router, free the mapping */ if (chan->router && chan->router->route_free) { -diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h -index c47c68e..4662d9a 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h -@@ -654,6 +654,8 @@ enum dmaengine_alignment { +@@ -681,6 +681,8 @@ struct dma_filter { * paused. Returns 0 or an error code * @device_terminate_all: Aborts all transfers on a channel. Returns 0 * or an error code @@ -179,7 +171,7 @@ index c47c68e..4662d9a 100644 * @device_tx_status: poll for transaction completion, the optional * txstate parameter can be supplied with a pointer to get a * struct with auxiliary transfer status information, otherwise the call -@@ -737,6 +739,7 @@ struct dma_device { +@@ -765,6 +767,7 @@ struct dma_device { int (*device_pause)(struct dma_chan *chan); int (*device_resume)(struct dma_chan *chan); int (*device_terminate_all)(struct dma_chan *chan); @@ -187,7 +179,7 @@ index c47c68e..4662d9a 100644 enum dma_status (*device_tx_status)(struct dma_chan *chan, dma_cookie_t cookie, -@@ -828,6 +831,13 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_sg( +@@ -856,6 +859,13 @@ static inline struct dma_async_tx_descri src_sg, src_nents, flags); } @@ -201,7 +193,7 @@ index c47c68e..4662d9a 100644 static inline int dmaengine_terminate_all(struct dma_chan *chan) { if (chan->device->device_terminate_all) -@@ -836,6 +846,86 @@ static inline int dmaengine_terminate_all(struct dma_chan *chan) +@@ -864,6 +874,86 @@ static inline int dmaengine_terminate_al return -ENOSYS; } @@ -288,6 +280,3 @@ index c47c68e..4662d9a 100644 static inline int dmaengine_pause(struct dma_chan *chan) { if (chan->device->device_pause) --- -2.8.1 - diff --git a/target/linux/apm821xx/patches-4.4/015-dmaengine-dw-fixed.patch b/target/linux/apm821xx/patches-4.4/015-dmaengine-dw-fixed.patch index 96b11a82b6..0380088547 100644 --- a/target/linux/apm821xx/patches-4.4/015-dmaengine-dw-fixed.patch +++ b/target/linux/apm821xx/patches-4.4/015-dmaengine-dw-fixed.patch @@ -65,8 +65,8 @@ Andy Shevchenko (4): sound/soc/intel/common/sst-firmware.c | 2 +- 11 files changed, 64 insertions(+), 78 deletions(-) ---- a/drivers/dma/dw/core.c 2016-05-21 23:13:19.964478443 +0200 -+++ b/drivers/dma/dw/core.c 2016-05-21 22:47:08.665465180 +0200 +--- a/drivers/dma/dw/core.c ++++ b/drivers/dma/dw/core.c @@ -45,22 +45,19 @@ DW_DMA_MSIZE_16; \ u8 _dmsize = _is_slave ? _sconfig->dst_maxburst : \ @@ -1116,8 +1116,8 @@ Andy Shevchenko (4): channel_writel(dwc, LLP, 0); } } ---- a/drivers/dma/dw/pci.c 2016-05-21 23:13:19.964478443 +0200 -+++ b/drivers/dma/dw/pci.c 2016-05-21 22:47:08.665465180 +0200 +--- a/drivers/dma/dw/pci.c ++++ b/drivers/dma/dw/pci.c @@ -17,8 +17,8 @@ static int dw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid) @@ -1150,8 +1150,8 @@ Andy Shevchenko (4): { } }; MODULE_DEVICE_TABLE(pci, dw_pci_id_table); ---- a/drivers/dma/dw/platform.c 2016-05-21 23:13:19.964478443 +0200 -+++ b/drivers/dma/dw/platform.c 2016-05-21 22:47:08.665465180 +0200 +--- a/drivers/dma/dw/platform.c ++++ b/drivers/dma/dw/platform.c @@ -42,13 +42,13 @@ static struct dma_chan *dw_dma_of_xlate( slave.src_id = dma_spec->args[0]; @@ -1309,8 +1309,8 @@ Andy Shevchenko (4): { } }; MODULE_DEVICE_TABLE(acpi, dw_dma_acpi_id_table); ---- a/drivers/dma/dw/regs.h 2016-05-21 23:13:19.964478443 +0200 -+++ b/drivers/dma/dw/regs.h 2016-05-21 22:47:08.665465180 +0200 +--- a/drivers/dma/dw/regs.h ++++ b/drivers/dma/dw/regs.h @@ -114,10 +114,6 @@ struct dw_dma_regs { #define dma_writel_native writel #endif @@ -1475,8 +1475,6 @@ Andy Shevchenko (4): int dw_dma_remove(struct dw_dma_chip *chip); /* DMA API extensions */ -diff --git a/include/linux/platform_data/dma-dw.h b/include/linux/platform_data/dma-dw.h -index 03b6095..d15d8ba 100644 --- a/include/linux/platform_data/dma-dw.h +++ b/include/linux/platform_data/dma-dw.h @@ -21,15 +21,15 @@ @@ -1517,6 +1515,3 @@ index 03b6095..d15d8ba 100644 unsigned char nr_masters; unsigned char data_width[DW_DMA_MAX_NR_MASTERS]; }; --- -2.8.1 - diff --git a/target/linux/apm821xx/patches-4.4/020-sata-dwc.patch b/target/linux/apm821xx/patches-4.4/020-sata-dwc.patch index 772c0dcf9b..1a6ce05624 100644 --- a/target/linux/apm821xx/patches-4.4/020-sata-dwc.patch +++ b/target/linux/apm821xx/patches-4.4/020-sata-dwc.patch @@ -66,8 +66,6 @@ Mans Rullgard (11): drivers/ata/sata_dwc_460ex.c | 552 ++++++++++++++++++++++--------------------- 1 file changed, 283 insertions(+), 269 deletions(-) -diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c -index 9020349..00c2af1 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c @@ -30,10 +30,12 @@ @@ -197,7 +195,7 @@ index 9020349..00c2af1 100644 /* * Prototypes */ -@@ -215,6 +192,93 @@ static void sata_dwc_dma_xfer_complete(struct ata_port *ap, u32 check_status); +@@ -215,6 +192,93 @@ static void sata_dwc_dma_xfer_complete(s static void sata_dwc_port_stop(struct ata_port *ap); static void sata_dwc_clear_dmacr(struct sata_dwc_device_port *hsdevp, u8 tag); @@ -291,7 +289,7 @@ index 9020349..00c2af1 100644 static const char *get_prot_descript(u8 protocol) { switch ((enum ata_tf_protocols)protocol) { -@@ -305,21 +369,20 @@ static struct dma_async_tx_descriptor *dma_dwc_xfer_setup(struct ata_queued_cmd +@@ -305,21 +369,20 @@ static struct dma_async_tx_descriptor *d struct ata_port *ap = qc->ap; struct sata_dwc_device_port *hsdevp = HSDEVP_FROM_AP(ap); struct sata_dwc_device *hsdev = HSDEV_FROM_AP(ap); @@ -318,7 +316,7 @@ index 9020349..00c2af1 100644 sconf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; sconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; -@@ -336,8 +399,8 @@ static struct dma_async_tx_descriptor *dma_dwc_xfer_setup(struct ata_queued_cmd +@@ -336,8 +399,8 @@ static struct dma_async_tx_descriptor *d desc->callback = dma_dwc_xfer_done; desc->callback_param = hsdev; @@ -329,7 +327,7 @@ index 9020349..00c2af1 100644 return desc; } -@@ -350,48 +413,38 @@ static int sata_dwc_scr_read(struct ata_link *link, unsigned int scr, u32 *val) +@@ -350,48 +413,38 @@ static int sata_dwc_scr_read(struct ata_ return -EINVAL; } @@ -389,7 +387,7 @@ index 9020349..00c2af1 100644 } static u32 qcmd_tag_to_mask(u8 tag) -@@ -412,7 +465,7 @@ static void sata_dwc_error_intr(struct ata_port *ap, +@@ -412,7 +465,7 @@ static void sata_dwc_error_intr(struct a ata_ehi_clear_desc(ehi); @@ -398,7 +396,7 @@ index 9020349..00c2af1 100644 status = ap->ops->sff_check_status(ap); tag = ap->link.active_tag; -@@ -423,7 +476,7 @@ static void sata_dwc_error_intr(struct ata_port *ap, +@@ -423,7 +476,7 @@ static void sata_dwc_error_intr(struct a hsdevp->dma_pending[tag], hsdevp->cmd_issued[tag]); /* Clear error register and interrupt bit */ @@ -407,7 +405,7 @@ index 9020349..00c2af1 100644 clear_interrupt_bit(hsdev, SATA_DWC_INTPR_ERR); /* This is the only error happening now. TODO check for exact error */ -@@ -462,12 +515,12 @@ static irqreturn_t sata_dwc_isr(int irq, void *dev_instance) +@@ -462,12 +515,12 @@ static irqreturn_t sata_dwc_isr(int irq, int handled, num_processed, port = 0; uint intpr, sactive, sactive2, tag_mask; struct sata_dwc_device_port *hsdevp; @@ -422,7 +420,7 @@ index 9020349..00c2af1 100644 ap = host->ports[port]; hsdevp = HSDEVP_FROM_AP(ap); -@@ -486,12 +539,12 @@ static irqreturn_t sata_dwc_isr(int irq, void *dev_instance) +@@ -486,12 +539,12 @@ static irqreturn_t sata_dwc_isr(int irq, if (intpr & SATA_DWC_INTPR_NEWFP) { clear_interrupt_bit(hsdev, SATA_DWC_INTPR_NEWFP); @@ -437,7 +435,7 @@ index 9020349..00c2af1 100644 qc = ata_qc_from_tag(ap, tag); /* -@@ -505,11 +558,11 @@ static irqreturn_t sata_dwc_isr(int irq, void *dev_instance) +@@ -505,11 +558,11 @@ static irqreturn_t sata_dwc_isr(int irq, handled = 1; goto DONE; } @@ -512,7 +510,7 @@ index 9020349..00c2af1 100644 } else { /* * This should not happen, it indicates the driver is out of -@@ -688,10 +737,9 @@ static void sata_dwc_clear_dmacr(struct sata_dwc_device_port *hsdevp, u8 tag) +@@ -688,10 +737,9 @@ static void sata_dwc_clear_dmacr(struct */ dev_err(hsdev->dev, "%s DMA protocol RX and TX DMA not pending tag=0x%02x pending=%d dmacr: 0x%08x\n", @@ -526,7 +524,7 @@ index 9020349..00c2af1 100644 } } -@@ -716,7 +764,7 @@ static void sata_dwc_dma_xfer_complete(struct ata_port *ap, u32 check_status) +@@ -716,7 +764,7 @@ static void sata_dwc_dma_xfer_complete(s __func__, qc->tag, qc->tf.command, get_dma_dir_descript(qc->dma_dir), get_prot_descript(qc->tf.protocol), @@ -535,7 +533,7 @@ index 9020349..00c2af1 100644 } #endif -@@ -725,7 +773,7 @@ static void sata_dwc_dma_xfer_complete(struct ata_port *ap, u32 check_status) +@@ -725,7 +773,7 @@ static void sata_dwc_dma_xfer_complete(s dev_err(ap->dev, "%s DMA protocol RX and TX DMA not pending dmacr: 0x%08x\n", __func__, @@ -544,7 +542,7 @@ index 9020349..00c2af1 100644 } hsdevp->dma_pending[tag] = SATA_DWC_DMA_PENDING_NONE; -@@ -742,8 +790,9 @@ static int sata_dwc_qc_complete(struct ata_port *ap, struct ata_queued_cmd *qc, +@@ -742,8 +790,9 @@ static int sata_dwc_qc_complete(struct a u8 status = 0; u32 mask = 0x0; u8 tag = qc->tag; @@ -555,7 +553,7 @@ index 9020349..00c2af1 100644 dev_dbg(ap->dev, "%s checkstatus? %x\n", __func__, check_status); if (hsdevp->dma_pending[tag] == SATA_DWC_DMA_PENDING_TX) -@@ -756,10 +805,8 @@ static int sata_dwc_qc_complete(struct ata_port *ap, struct ata_queued_cmd *qc, +@@ -756,10 +805,8 @@ static int sata_dwc_qc_complete(struct a /* clear active bit */ mask = (~(qcmd_tag_to_mask(tag))); @@ -568,7 +566,7 @@ index 9020349..00c2af1 100644 ata_qc_complete(qc); return 0; } -@@ -767,54 +814,62 @@ static int sata_dwc_qc_complete(struct ata_port *ap, struct ata_queued_cmd *qc, +@@ -767,54 +814,62 @@ static int sata_dwc_qc_complete(struct a static void sata_dwc_enable_interrupts(struct sata_dwc_device *hsdev) { /* Enable selective interrupts by setting the interrupt maskregister*/ @@ -621,18 +619,18 @@ index 9020349..00c2af1 100644 + port->lbal_addr = base + 0x0c; + port->lbam_addr = base + 0x10; + port->lbah_addr = base + 0x14; - -- port->error_addr = (void __iomem *)base + 0x04; -- port->feature_addr = (void __iomem *)base + 0x04; ++ + port->device_addr = base + 0x18; + port->command_addr = base + 0x1c; + port->status_addr = base + 0x1c; -- port->nsect_addr = (void __iomem *)base + 0x08; +- port->error_addr = (void __iomem *)base + 0x04; +- port->feature_addr = (void __iomem *)base + 0x04; + port->altstatus_addr = base + 0x20; + port->ctl_addr = base + 0x20; +} -+ + +- port->nsect_addr = (void __iomem *)base + 0x08; +static int sata_dwc_dma_get_channel(struct sata_dwc_device_port *hsdevp) +{ + struct sata_dwc_device *hsdev = hsdevp->hsdev; @@ -662,7 +660,7 @@ index 9020349..00c2af1 100644 } /* -@@ -829,7 +884,6 @@ static int sata_dwc_port_start(struct ata_port *ap) +@@ -829,7 +884,6 @@ static int sata_dwc_port_start(struct at struct sata_dwc_device *hsdev; struct sata_dwc_device_port *hsdevp = NULL; struct device *pdev; @@ -670,7 +668,7 @@ index 9020349..00c2af1 100644 int i; hsdev = HSDEV_FROM_AP(ap); -@@ -853,20 +907,13 @@ static int sata_dwc_port_start(struct ata_port *ap) +@@ -853,20 +907,13 @@ static int sata_dwc_port_start(struct at } hsdevp->hsdev = hsdev; @@ -696,7 +694,7 @@ index 9020349..00c2af1 100644 for (i = 0; i < SATA_DWC_QCMD_MAX; i++) hsdevp->cmd_issued[i] = SATA_DWC_CMD_ISSUED_NOT; -@@ -877,18 +924,18 @@ static int sata_dwc_port_start(struct ata_port *ap) +@@ -877,18 +924,18 @@ static int sata_dwc_port_start(struct at if (ap->port_no == 0) { dev_dbg(ap->dev, "%s: clearing TXCHEN, RXCHEN in DMAC\n", __func__); @@ -736,7 +734,7 @@ index 9020349..00c2af1 100644 kfree(hsdevp); ap->private_data = NULL; -@@ -924,22 +973,20 @@ static void sata_dwc_exec_command_by_tag(struct ata_port *ap, +@@ -924,22 +973,20 @@ static void sata_dwc_exec_command_by_tag struct ata_taskfile *tf, u8 tag, u32 cmd_issued) { @@ -761,7 +759,7 @@ index 9020349..00c2af1 100644 ata_sff_exec_command(ap, tf); } -@@ -992,18 +1039,18 @@ static void sata_dwc_bmdma_start_by_tag(struct ata_queued_cmd *qc, u8 tag) +@@ -992,18 +1039,18 @@ static void sata_dwc_bmdma_start_by_tag( sata_dwc_tf_dump(ap, &qc->tf); if (start_dma) { @@ -785,7 +783,7 @@ index 9020349..00c2af1 100644 /* Enable AHB DMA transfer on the specified channel */ dmaengine_submit(desc); -@@ -1025,36 +1072,12 @@ static void sata_dwc_bmdma_start(struct ata_queued_cmd *qc) +@@ -1025,36 +1072,12 @@ static void sata_dwc_bmdma_start(struct sata_dwc_bmdma_start_by_tag(qc, tag); } @@ -823,7 +821,7 @@ index 9020349..00c2af1 100644 #ifdef DEBUG_NCQ if (qc->tag > 0 || ap->link.sactive > 1) -@@ -1068,47 +1091,33 @@ static unsigned int sata_dwc_qc_issue(struct ata_queued_cmd *qc) +@@ -1068,47 +1091,33 @@ static unsigned int sata_dwc_qc_issue(st if (!ata_is_ncq(qc->tf.protocol)) tag = 0; @@ -883,7 +881,7 @@ index 9020349..00c2af1 100644 static void sata_dwc_error_handler(struct ata_port *ap) { ata_sff_error_handler(ap); -@@ -1125,17 +1134,22 @@ static int sata_dwc_hardreset(struct ata_link *link, unsigned int *class, +@@ -1125,17 +1134,22 @@ static int sata_dwc_hardreset(struct ata sata_dwc_enable_interrupts(hsdev); /* Reconfigure the DMA control register */ @@ -911,7 +909,7 @@ index 9020349..00c2af1 100644 /* * scsi mid-layer and libata interface structures */ -@@ -1148,7 +1162,13 @@ static struct scsi_host_template sata_dwc_sht = { +@@ -1148,7 +1162,13 @@ static struct scsi_host_template sata_dw */ .sg_tablesize = LIBATA_MAX_PRD, /* .can_queue = ATA_MAX_QUEUE, */ @@ -926,7 +924,7 @@ index 9020349..00c2af1 100644 }; static struct ata_port_operations sata_dwc_ops = { -@@ -1157,7 +1177,6 @@ static struct ata_port_operations sata_dwc_ops = { +@@ -1157,7 +1177,6 @@ static struct ata_port_operations sata_d .error_handler = sata_dwc_error_handler, .hardreset = sata_dwc_hardreset, @@ -934,7 +932,7 @@ index 9020349..00c2af1 100644 .qc_issue = sata_dwc_qc_issue, .scr_read = sata_dwc_scr_read, -@@ -1166,6 +1185,8 @@ static struct ata_port_operations sata_dwc_ops = { +@@ -1166,6 +1185,8 @@ static struct ata_port_operations sata_d .port_start = sata_dwc_port_start, .port_stop = sata_dwc_port_stop, @@ -943,7 +941,7 @@ index 9020349..00c2af1 100644 .bmdma_setup = sata_dwc_bmdma_setup, .bmdma_start = sata_dwc_bmdma_start, }; -@@ -1184,13 +1205,14 @@ static int sata_dwc_probe(struct platform_device *ofdev) +@@ -1184,13 +1205,14 @@ static int sata_dwc_probe(struct platfor struct sata_dwc_device *hsdev; u32 idr, versionr; char *ver = (char *)&versionr; @@ -959,7 +957,7 @@ index 9020349..00c2af1 100644 /* Allocate DWC SATA device */ host = ata_host_alloc_pinfo(&ofdev->dev, ppi, SATA_DWC_MAX_PORTS); -@@ -1201,57 +1223,33 @@ static int sata_dwc_probe(struct platform_device *ofdev) +@@ -1201,57 +1223,33 @@ static int sata_dwc_probe(struct platfor host->private_data = hsdev; /* Ioremap SATA registers */ @@ -1026,7 +1024,7 @@ index 9020349..00c2af1 100644 /* Enable SATA Interrupts */ sata_dwc_enable_interrupts(hsdev); -@@ -1263,6 +1261,25 @@ static int sata_dwc_probe(struct platform_device *ofdev) +@@ -1263,6 +1261,25 @@ static int sata_dwc_probe(struct platfor goto error_out; } @@ -1052,7 +1050,7 @@ index 9020349..00c2af1 100644 /* * Now, register with libATA core, this will also initiate the * device discovery process, invoking our port_start() handler & -@@ -1276,12 +1293,7 @@ static int sata_dwc_probe(struct platform_device *ofdev) +@@ -1276,12 +1293,7 @@ static int sata_dwc_probe(struct platfor return 0; error_out: @@ -1066,7 +1064,7 @@ index 9020349..00c2af1 100644 return err; } -@@ -1293,11 +1305,13 @@ static int sata_dwc_remove(struct platform_device *ofdev) +@@ -1293,11 +1305,13 @@ static int sata_dwc_remove(struct platfo ata_host_detach(host); @@ -1083,6 +1081,3 @@ index 9020349..00c2af1 100644 dev_dbg(&ofdev->dev, "done\n"); return 0; } --- -2.8.1 - diff --git a/target/linux/apm821xx/patches-4.4/030-usb-dwc2-endian-fix.patch b/target/linux/apm821xx/patches-4.4/030-usb-dwc2-endian-fix.patch deleted file mode 100644 index 9078b6c351..0000000000 --- a/target/linux/apm821xx/patches-4.4/030-usb-dwc2-endian-fix.patch +++ /dev/null @@ -1,95 +0,0 @@ -From: Arnd Bergmann -Subject: [PATCH v4] usb: dwc2: fix regression on big-endian PowerPC/ARM systems -Date: Fri, 13 May 2016 15:52:27 +0200 -Message-Id: <1463147559-544140-1-git-send-email-arnd@arndb.de> - -A patch that went into Linux-4.4 to fix big-endian mode on a Lantiq -MIPS system unfortunately broke big-endian operation on PowerPC -APM82181 as reported by Christian Lamparter, and likely other -systems. - -It actually introduced multiple issues: - -- it broke big-endian ARM kernels: any machine that was working - correctly with a little-endian kernel is no longer using byteswaps - on big-endian kernels, which clearly breaks them. -- On PowerPC the same thing must be true: if it was working before, - using big-endian kernels is now broken. Unlike ARM, 32-bit PowerPC - usually uses big-endian kernels, so they are likely all broken. -- The barrier for dwc2_writel is on the wrong side of the __raw_writel(), - so the MMIO no longer synchronizes with DMA operations. -- On architectures that require specific CPU instructions for MMIO - access, using the __raw_ variant may turn this into a pointer - dereference that does not have the same effect as the readl/writel. - -This patch is a simple revert for all architectures other than MIPS, -in the hope that we can more easily backport it to fix the regression -on PowerPC and ARM systems without breaking the Lantiq system again. - -We should follow this up with a more elaborate change to add runtime -detection of endianness, to make sure it also works on all other -combinations of architectures and implementations of the usb-dwc2 -device. That patch however will be fairly large and not appropriate -for backports to stable kernels. - -Felipe suggested a different approach, using an endianness switching -register to always put the device into LE mode, but unfortunately -the dwc2 hardware does not provide a generic way to do that. Also, -I see no practical way of addressing the problem more generally by -patching architecture specific code on MIPS. - -Signed-off-by: Arnd Bergmann -Fixes: 95c8bc360944 ("usb: dwc2: Use platform endianness when accessing registers") ---- - drivers/usb/dwc2/core.h | 27 +++++++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - -diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h -index 3c58d633ce80..dec0b21fc626 100644 ---- a/drivers/usb/dwc2/core.h -+++ b/drivers/usb/dwc2/core.h -@@ -64,6 +64,17 @@ - DWC2_TRACE_SCHEDULER_VB(pr_fmt("%s: SCH: " fmt), \ - dev_name(hsotg->dev), ##__VA_ARGS__) - -+#ifdef CONFIG_MIPS -+/* -+ * There are some MIPS machines that can run in either big-endian -+ * or little-endian mode and that use the dwc2 register without -+ * a byteswap in both ways. -+ * Unlike other architectures, MIPS apparently does not require a -+ * barrier before the __raw_writel() to synchronize with DMA but does -+ * require the barrier after the __raw_writel() to serialize a set of -+ * writes. This set of operations was added specifically for MIPS and -+ * should only be used there. -+ */ - static inline u32 dwc2_readl(const void __iomem *addr) - { - u32 value = __raw_readl(addr); -@@ -90,6 +101,22 @@ static inline void dwc2_writel(u32 value, void __iomem *addr) - pr_info("INFO:: wrote %08x to %p\n", value, addr); - #endif - } -+#else -+/* Normal architectures just use readl/write */ -+static inline u32 dwc2_readl(const void __iomem *addr) -+{ -+ return readl(addr); -+} -+ -+static inline void dwc2_writel(u32 value, void __iomem *addr) -+{ -+ writel(value, addr); -+ -+#ifdef DWC2_LOG_WRITES -+ pr_info("info:: wrote %08x to %p\n", value, addr); -+#endif -+} -+#endif - - /* Maximum number of Endpoints/HostChannels */ - #define MAX_EPS_CHANNELS 16 --- -2.7.0 - - diff --git a/target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch b/target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch index 45892f272f..018bcf21a0 100644 --- a/target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch +++ b/target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch @@ -3,7 +3,7 @@ @@ -40,6 +40,19 @@ config EBONY help This option enables support for the IBM PPC440GP evaluation board. - + +config IKAREM + bool "Ikarem" + depends on 44x @@ -29,3 +29,4 @@ + "meraki,ikarem", "mosaixtech,icon" }; + diff --git a/target/linux/apm821xx/patches-4.4/201-add-amcc-apollo3g-support.patch b/target/linux/apm821xx/patches-4.4/201-add-amcc-apollo3g-support.patch index 8dc09243bf..0581a43e33 100644 --- a/target/linux/apm821xx/patches-4.4/201-add-amcc-apollo3g-support.patch +++ b/target/linux/apm821xx/patches-4.4/201-add-amcc-apollo3g-support.patch @@ -1,5 +1,5 @@ ---- a/arch/powerpc/platforms/44x/Kconfig 2016-05-21 23:02:29.933525903 +0200 -+++ b/arch/powerpc/platforms/44x/Kconfig 2016-05-21 23:06:50.843908233 +0200 +--- a/arch/powerpc/platforms/44x/Kconfig ++++ b/arch/powerpc/platforms/44x/Kconfig @@ -143,6 +143,17 @@ config CANYONLANDS help This option enables support for the AMCC PPC460EX evaluation board. @@ -18,8 +18,8 @@ config GLACIER bool "Glacier" depends on 44x ---- a/arch/powerpc/platforms/44x/ppc44x_simple.c 2016-05-21 23:02:29.933525903 +0200 -+++ b/arch/powerpc/platforms/44x/ppc44x_simple.c 2016-05-21 23:06:01.130502053 +0200 +--- a/arch/powerpc/platforms/44x/ppc44x_simple.c ++++ b/arch/powerpc/platforms/44x/ppc44x_simple.c @@ -50,6 +50,7 @@ machine_device_initcall(ppc44x_simple, p * board.c file for it rather than adding it to this list. */ diff --git a/target/linux/apm821xx/patches-4.4/202-add-netgear-wndr4700-support.patch b/target/linux/apm821xx/patches-4.4/202-add-netgear-wndr4700-support.patch index 81531915ba..6b6db1dddb 100644 --- a/target/linux/apm821xx/patches-4.4/202-add-netgear-wndr4700-support.patch +++ b/target/linux/apm821xx/patches-4.4/202-add-netgear-wndr4700-support.patch @@ -1,5 +1,5 @@ ---- a/arch/powerpc/platforms/44x/Makefile 2016-05-31 19:28:28.825973250 +0200 -+++ b/arch/powerpc/platforms/44x/Makefile 2016-05-31 19:28:22.135960329 +0200 +--- a/arch/powerpc/platforms/44x/Makefile ++++ b/arch/powerpc/platforms/44x/Makefile @@ -3,6 +3,7 @@ ifneq ($(CONFIG_PPC4xx_CPM),y) obj-$(CONFIG_44x) += idle.o endif @@ -8,8 +8,8 @@ obj-$(CONFIG_EBONY) += ebony.o obj-$(CONFIG_SAM440EP) += sam440ep.o obj-$(CONFIG_WARP) += warp.o ---- a/arch/powerpc/platforms/44x/Kconfig 2016-05-31 19:33:57.049940191 +0200 -+++ b/arch/powerpc/platforms/44x/Kconfig 2016-05-31 19:30:01.699485861 +0200 +--- a/arch/powerpc/platforms/44x/Kconfig ++++ b/arch/powerpc/platforms/44x/Kconfig @@ -260,6 +260,19 @@ config ICON help This option enables support for the AMCC PPC440SPe evaluation board. diff --git a/target/linux/apm821xx/patches-4.4/300-fix-atheros-nics-on-apm82181.patch b/target/linux/apm821xx/patches-4.4/300-fix-atheros-nics-on-apm82181.patch index b9e5fb07c6..0b1affcfe7 100644 --- a/target/linux/apm821xx/patches-4.4/300-fix-atheros-nics-on-apm82181.patch +++ b/target/linux/apm821xx/patches-4.4/300-fix-atheros-nics-on-apm82181.patch @@ -1,5 +1,5 @@ ---- a/arch/powerpc/sysdev/ppc4xx_pci.c 2016-05-30 17:23:34.543707092 +0200 -+++ b/arch/powerpc/sysdev/ppc4xx_pci.c 2016-05-30 17:31:02.497707885 +0200 +--- a/arch/powerpc/sysdev/ppc4xx_pci.c ++++ b/arch/powerpc/sysdev/ppc4xx_pci.c @@ -1066,15 +1066,24 @@ static int __init apm821xx_pciex_init_po u32 val; diff --git a/target/linux/apm821xx/patches-4.4/301-fix-memory-map-wndr4700.patch b/target/linux/apm821xx/patches-4.4/301-fix-memory-map-wndr4700.patch index b44f8bba8a..d6a1006177 100644 --- a/target/linux/apm821xx/patches-4.4/301-fix-memory-map-wndr4700.patch +++ b/target/linux/apm821xx/patches-4.4/301-fix-memory-map-wndr4700.patch @@ -1,5 +1,5 @@ ---- a/arch/powerpc/sysdev/ppc4xx_pci.c 2016-05-30 17:57:30.125498459 +0200 -+++ b/arch/powerpc/sysdev/ppc4xx_pci.c 2016-05-30 18:00:39.236007798 +0200 +--- a/arch/powerpc/sysdev/ppc4xx_pci.c ++++ b/arch/powerpc/sysdev/ppc4xx_pci.c @@ -1913,9 +1913,9 @@ static void __init ppc4xx_configure_pcie * if it works */ diff --git a/target/linux/apm821xx/patches-4.4/701-powerpc_ibm_apm82181_phyclk_fix.patch b/target/linux/apm821xx/patches-4.4/701-powerpc_ibm_apm82181_phyclk_fix.patch index ec9de179a4..011e785e99 100644 --- a/target/linux/apm821xx/patches-4.4/701-powerpc_ibm_apm82181_phyclk_fix.patch +++ b/target/linux/apm821xx/patches-4.4/701-powerpc_ibm_apm82181_phyclk_fix.patch @@ -1,8 +1,6 @@ -diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c -index 5d7db6c..01bed2e 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c -@@ -129,6 +129,7 @@ static inline void emac_report_timeout_error(struct emac_instance *dev, +@@ -129,6 +129,7 @@ static inline void emac_report_timeout_e { if (emac_has_feature(dev, EMAC_FTR_440GX_PHY_CLK_FIX | EMAC_FTR_460EX_PHY_CLK_FIX | @@ -10,7 +8,7 @@ index 5d7db6c..01bed2e 100644 EMAC_FTR_440EP_PHY_CLK_FIX)) DBG(dev, "%s" NL, error); else if (net_ratelimit()) -@@ -146,6 +147,10 @@ static inline void emac_rx_clk_tx(struct emac_instance *dev) +@@ -146,6 +147,10 @@ static inline void emac_rx_clk_tx(struct if (emac_has_feature(dev, EMAC_FTR_440EP_PHY_CLK_FIX)) dcri_clrset(SDR0, SDR0_MFR, 0, SDR0_MFR_ECS >> dev->cell_index); @@ -21,7 +19,7 @@ index 5d7db6c..01bed2e 100644 #endif } -@@ -155,6 +160,10 @@ static inline void emac_rx_clk_default(struct emac_instance *dev) +@@ -155,6 +160,10 @@ static inline void emac_rx_clk_default(s if (emac_has_feature(dev, EMAC_FTR_440EP_PHY_CLK_FIX)) dcri_clrset(SDR0, SDR0_MFR, SDR0_MFR_ECS >> dev->cell_index, 0); @@ -32,7 +30,7 @@ index 5d7db6c..01bed2e 100644 #endif } -@@ -2587,7 +2596,7 @@ static int emac_init_config(struct emac_instance *dev) +@@ -2587,7 +2596,7 @@ static int emac_init_config(struct emac_ if (of_device_is_compatible(np, "ibm,emac-apm821xx")) { dev->features |= (EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE | EMAC_FTR_APM821XX_NO_HALF_DUPLEX | @@ -41,8 +39,6 @@ index 5d7db6c..01bed2e 100644 } } else if (of_device_is_compatible(np, "ibm,emac4")) { dev->features |= EMAC_FTR_EMAC4; -diff --git a/drivers/net/ethernet/ibm/emac/core.h b/drivers/net/ethernet/ibm/emac/core.h -index 93ae114..072176a 100644 --- a/drivers/net/ethernet/ibm/emac/core.h +++ b/drivers/net/ethernet/ibm/emac/core.h @@ -333,6 +333,8 @@ struct emac_instance { diff --git a/target/linux/apm821xx/patches-4.4/702-powerpc_ibm_phy_add_dt_parser.patch b/target/linux/apm821xx/patches-4.4/702-powerpc_ibm_phy_add_dt_parser.patch index a1ca7c610e..c84e761ed0 100644 --- a/target/linux/apm821xx/patches-4.4/702-powerpc_ibm_phy_add_dt_parser.patch +++ b/target/linux/apm821xx/patches-4.4/702-powerpc_ibm_phy_add_dt_parser.patch @@ -8,8 +8,6 @@ Subject: [PATCH] phy device tree support for emac drivers/net/ethernet/ibm/emac/core.h | 4 + 2 files changed, 265 insertions(+) -diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c -index 4c9771d..5a8a26c 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -42,6 +42,7 @@ @@ -20,7 +18,7 @@ index 4c9771d..5a8a26c 100644 #include #include -@@ -2383,6 +2384,246 @@ static int emac_read_uint_prop(struct device_node *np, const char *name, +@@ -2392,6 +2393,246 @@ static int emac_read_uint_prop(struct de return 0; } @@ -267,7 +265,7 @@ index 4c9771d..5a8a26c 100644 static int emac_init_phy(struct emac_instance *dev) { struct device_node *np = dev->ofdev->dev.of_node; -@@ -2453,6 +2694,18 @@ static int emac_init_phy(struct emac_instance *dev) +@@ -2462,6 +2703,18 @@ static int emac_init_phy(struct emac_ins emac_configure(dev); @@ -286,7 +284,7 @@ index 4c9771d..5a8a26c 100644 if (dev->phy_address != 0xffffffff) phy_map = ~(1 << dev->phy_address); -@@ -2480,6 +2733,7 @@ static int emac_init_phy(struct emac_instance *dev) +@@ -2489,6 +2742,7 @@ static int emac_init_phy(struct emac_ins return -ENXIO; } @@ -294,7 +292,7 @@ index 4c9771d..5a8a26c 100644 /* Init PHY */ if (dev->phy.def->ops->init) dev->phy.def->ops->init(&dev->phy); -@@ -2898,6 +3152,8 @@ static int emac_probe(struct platform_device *ofdev) +@@ -2907,6 +3161,8 @@ static int emac_probe(struct platform_de /* I have a bad feeling about this ... */ err_detach_tah: @@ -303,7 +301,7 @@ index 4c9771d..5a8a26c 100644 if (emac_has_feature(dev, EMAC_FTR_HAS_TAH)) tah_detach(dev->tah_dev, dev->tah_port); err_detach_rgmii: -@@ -2948,6 +3204,11 @@ static int emac_remove(struct platform_device *ofdev) +@@ -2957,6 +3213,11 @@ static int emac_remove(struct platform_d if (emac_has_feature(dev, EMAC_FTR_HAS_ZMII)) zmii_detach(dev->zmii_dev, dev->zmii_port); @@ -315,8 +313,6 @@ index 4c9771d..5a8a26c 100644 busy_phy_map &= ~(1 << dev->phy.address); DBG(dev, "busy_phy_map now %#x" NL, busy_phy_map); -diff --git a/drivers/net/ethernet/ibm/emac/core.h b/drivers/net/ethernet/ibm/emac/core.h -index 93ae114..0710a66 100644 --- a/drivers/net/ethernet/ibm/emac/core.h +++ b/drivers/net/ethernet/ibm/emac/core.h @@ -199,6 +199,10 @@ struct emac_instance { @@ -330,6 +326,3 @@ index 93ae114..0710a66 100644 /* ZMII infos if any */ u32 zmii_ph; u32 zmii_port; --- -2.1.4 - diff --git a/target/linux/apm821xx/patches-4.4/800-usb-dwc2-add-wndr4700-otg.patch b/target/linux/apm821xx/patches-4.4/800-usb-dwc2-add-wndr4700-otg.patch index 24d267ef4a..eee3fd06ec 100644 --- a/target/linux/apm821xx/patches-4.4/800-usb-dwc2-add-wndr4700-otg.patch +++ b/target/linux/apm821xx/patches-4.4/800-usb-dwc2-add-wndr4700-otg.patch @@ -1,5 +1,5 @@ ---- a/drivers/usb/dwc2/platform.c 2016-05-26 21:39:41.347838639 +0200 -+++ b/drivers/usb/dwc2/platform.c 2016-05-26 21:44:01.554907417 +0200 +--- a/drivers/usb/dwc2/platform.c ++++ b/drivers/usb/dwc2/platform.c @@ -115,6 +115,37 @@ static const struct dwc2_core_params par .hibernation = -1, }; diff --git a/target/linux/apm821xx/patches-4.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-4.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch index e56e95576d..dec3da3e07 100644 --- a/target/linux/apm821xx/patches-4.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch +++ b/target/linux/apm821xx/patches-4.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch @@ -33,8 +33,6 @@ Signed-off-by: Christian Lamparter drivers/usb/host/xhci-pci.c | 492 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 492 insertions(+) -diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c -index 48672fa..328c891 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -24,6 +24,8 @@ @@ -46,7 +44,7 @@ index 48672fa..328c891 100644 #include "xhci.h" #include "xhci-trace.h" -@@ -207,6 +209,458 @@ static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) +@@ -209,6 +211,458 @@ static void xhci_pme_acpi_rtd3_enable(st static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } #endif /* CONFIG_ACPI */ @@ -505,7 +503,7 @@ index 48672fa..328c891 100644 /* called during probe() after chip reset completes */ static int xhci_pci_setup(struct usb_hcd *hcd) { -@@ -246,6 +700,22 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) +@@ -248,6 +702,22 @@ static int xhci_pci_probe(struct pci_dev struct hc_driver *driver; struct usb_hcd *hcd; @@ -528,7 +526,7 @@ index 48672fa..328c891 100644 driver = (struct hc_driver *)id->driver_data; /* Prevent runtime suspending between USB-2 and USB-3 initialization */ -@@ -303,6 +773,16 @@ static void xhci_pci_remove(struct pci_dev *dev) +@@ -305,6 +775,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; @@ -545,6 +543,3 @@ index 48672fa..328c891 100644 xhci = hcd_to_xhci(pci_get_drvdata(dev)); xhci->xhc_state |= XHCI_STATE_REMOVING; if (xhci->shared_hcd) { --- -2.8.1 - diff --git a/target/linux/apm821xx/patches-4.4/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.4/802-usb-xhci-force-msi-renesas-xhci.patch index a09e9dc41c..465faef2dc 100644 --- a/target/linux/apm821xx/patches-4.4/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-4.4/802-usb-xhci-force-msi-renesas-xhci.patch @@ -11,11 +11,9 @@ produce a noisy warning. drivers/usb/host/pci-quirks.c | 362 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) -diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c -index 1c4d89e..555bd3f 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -172,7 +172,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) +@@ -176,7 +176,7 @@ static void xhci_pci_quirks(struct devic } if (pdev->vendor == PCI_VENDOR_ID_RENESAS && pdev->device == 0x0015) @@ -24,11 +22,9 @@ index 1c4d89e..555bd3f 100644 if (pdev->vendor == PCI_VENDOR_ID_VIA) xhci->quirks |= XHCI_RESET_ON_RESUME; -diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c -index 9e71c96..27cfcb9 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -389,10 +389,14 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd) +@@ -388,10 +388,14 @@ static int xhci_try_enable_msi(struct us free_irq(hcd->irq, hcd); hcd->irq = 0; @@ -46,12 +42,13 @@ index 9e71c96..27cfcb9 100644 if (!ret) /* hcd->irq is 0, we have MSI */ -diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h -index 6b085aa..514dc3f 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1649,3 +1649,4 @@ struct xhci_hcd { - #define XHCI_BROKEN_STREAMS (1 << 19) - #define XHCI_PME_STUCK_QUIRK (1 << 20) +@@ -1648,6 +1648,7 @@ struct xhci_hcd { + /* support xHCI 0.96 spec USB2 software LPM */ + unsigned sw_lpm_support:1; + /* support xHCI 1.0 spec USB2 hardware LPM */ +#define XHCI_FORCE_MSI (1 << 24) - unsigned int num_active_eps; + unsigned hw_lpm_support:1; + /* cached usb2 extened protocol capabilites */ + u32 *ext_caps; diff --git a/target/linux/apm821xx/patches-4.4/901-hwmon-add-driver-for-Microchip-TC654-TC655-PWM-fan-c.patch b/target/linux/apm821xx/patches-4.4/901-hwmon-add-driver-for-Microchip-TC654-TC655-PWM-fan-c.patch index 53b9bdbc17..8c27dd13fb 100644 --- a/target/linux/apm821xx/patches-4.4/901-hwmon-add-driver-for-Microchip-TC654-TC655-PWM-fan-c.patch +++ b/target/linux/apm821xx/patches-4.4/901-hwmon-add-driver-for-Microchip-TC654-TC655-PWM-fan-c.patch @@ -24,11 +24,9 @@ Signed-off-by: Christian Lamparter 3 files changed, 980 insertions(+) create mode 100644 drivers/hwmon/tc654.c -diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig -index ff94007..941fe4951 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig -@@ -1514,6 +1514,16 @@ config SENSORS_INA2XX +@@ -1493,6 +1493,16 @@ config SENSORS_INA2XX This driver can also be built as a module. If so, the module will be called ina2xx. @@ -45,11 +43,9 @@ index ff94007..941fe4951 100644 config SENSORS_TC74 tristate "Microchip TC74" depends on I2C -diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile -index 2ef5b7c..04270c7 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile -@@ -145,6 +145,7 @@ obj-$(CONFIG_SENSORS_SMSC47B397)+= smsc47b397.o +@@ -143,6 +143,7 @@ obj-$(CONFIG_SENSORS_SMSC47B397)+= smsc4 obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o obj-$(CONFIG_SENSORS_SMSC47M192)+= smsc47m192.o obj-$(CONFIG_SENSORS_AMC6821) += amc6821.o @@ -57,9 +53,6 @@ index 2ef5b7c..04270c7 100644 obj-$(CONFIG_SENSORS_TC74) += tc74.o obj-$(CONFIG_SENSORS_THMC50) += thmc50.o obj-$(CONFIG_SENSORS_TMP102) += tmp102.o -diff --git a/drivers/hwmon/tc654.c b/drivers/hwmon/tc654.c -new file mode 100644 -index 0000000..d584baf --- /dev/null +++ b/drivers/hwmon/tc654.c @@ -0,0 +1,969 @@ @@ -1032,6 +1025,3 @@ index 0000000..d584baf +MODULE_AUTHOR("Christian Lamparter "); +MODULE_DESCRIPTION("Microchip TC654/TC655 hwmon driver"); +MODULE_LICENSE("GPL"); --- -2.8.1 - diff --git a/target/linux/apm821xx/patches-4.4/911-hwmon-lm90-split-set-and-show-temp-as-common-codes.patch b/target/linux/apm821xx/patches-4.4/911-hwmon-lm90-split-set-and-show-temp-as-common-codes.patch index a2e38c5c74..e450f9045f 100644 --- a/target/linux/apm821xx/patches-4.4/911-hwmon-lm90-split-set-and-show-temp-as-common-codes.patch +++ b/target/linux/apm821xx/patches-4.4/911-hwmon-lm90-split-set-and-show-temp-as-common-codes.patch @@ -26,11 +26,9 @@ Reviewed-on: https://chromium-review.googlesource.com/212413 Reviewed-by: Olof Johansson Commit-Queue: Olof Johansson --- -diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c -index c9ff08d..fb9e224 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c -@@ -473,20 +473,29 @@ +@@ -473,20 +473,29 @@ static int lm90_read16(struct i2c_client * various registers have different meanings as a result of selecting a * non-default remote channel. */ @@ -65,7 +63,7 @@ index c9ff08d..fb9e224 100644 } /* -@@ -759,29 +768,34 @@ +@@ -759,29 +768,34 @@ static u16 temp_to_u16_adt7461(struct lm * Sysfs stuff */ @@ -110,7 +108,7 @@ index c9ff08d..fb9e224 100644 { static const u8 reg[TEMP8_REG_NUM] = { LM90_REG_W_LOCAL_LOW, -@@ -794,10 +808,37 @@ +@@ -794,60 +808,79 @@ static ssize_t set_temp8(struct device * MAX6659_REG_W_REMOTE_EMERG, }; @@ -118,26 +116,39 @@ index c9ff08d..fb9e224 100644 struct lm90_data *data = dev_get_drvdata(dev); struct i2c_client *client = data->client; - int nr = attr->index; -+ int err; -+ -+ /* +16 degrees offset for temp2 for the LM99 */ +- long val; + int err; + +- err = kstrtol(buf, 10, &val); +- if (err < 0) +- return err; +- + /* +16 degrees offset for temp2 for the LM99 */ +- if (data->kind == lm99 && attr->index == 3) + if (data->kind == lm99 && index == 3) -+ val -= 16000; -+ -+ mutex_lock(&data->update_lock); -+ if (data->kind == adt7461 || data->kind == tmp451) + val -= 16000; + + mutex_lock(&data->update_lock); + if (data->kind == adt7461 || data->kind == tmp451) +- data->temp8[nr] = temp_to_u8_adt7461(data, val); + data->temp8[index] = temp_to_u8_adt7461(data, val); -+ else if (data->kind == max6646) + else if (data->kind == max6646) +- data->temp8[nr] = temp_to_u8(val); + data->temp8[index] = temp_to_u8(val); -+ else + else +- data->temp8[nr] = temp_to_s8(val); +- +- lm90_select_remote_channel(client, data, nr >= 6); +- i2c_smbus_write_byte_data(client, reg[nr], data->temp8[nr]); +- lm90_select_remote_channel(client, data, 0); + data->temp8[index] = temp_to_s8(val); -+ + + if ((err = lm90_select_remote_channel(client, data, index >= 6)) || + (err = i2c_smbus_write_byte_data(client, reg[index], + data->temp8[index])) || + (err = lm90_select_remote_channel(client, data, 0))) + dev_err(dev, "write_temp8 failed, err %d\n", err); -+ mutex_unlock(&data->update_lock); + mutex_unlock(&data->update_lock); + + return err; +} @@ -147,84 +158,62 @@ index c9ff08d..fb9e224 100644 +{ + struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); + int index = attr->index; - long val; - int err; - -@@ -805,49 +846,41 @@ - if (err < 0) - return err; - -- /* +16 degrees offset for temp2 for the LM99 */ -- if (data->kind == lm99 && attr->index == 3) -- val -= 16000; -+ err = write_temp8(dev, index, val); ++ long val; ++ int err; ++ ++ err = kstrtol(buf, 10, &val); + if (err < 0) + return err; - -- mutex_lock(&data->update_lock); -- if (data->kind == adt7461 || data->kind == tmp451) -- data->temp8[nr] = temp_to_u8_adt7461(data, val); -- else if (data->kind == max6646) -- data->temp8[nr] = temp_to_u8(val); -- else -- data->temp8[nr] = temp_to_s8(val); -- -- lm90_select_remote_channel(client, data, nr >= 6); -- i2c_smbus_write_byte_data(client, reg[nr], data->temp8[nr]); -- lm90_select_remote_channel(client, data, 0); -- -- mutex_unlock(&data->update_lock); - return count; -+} -+ -+static int read_temp11(struct device *dev, int index) -+{ -+ struct lm90_data *data = lm90_update_device(dev); -+ int temp; + -+ if (data->kind == adt7461 || data->kind == tmp451) -+ temp = temp_from_u16_adt7461(data, data->temp11[index]); -+ else if (data->kind == max6646) -+ temp = temp_from_u16(data->temp11[index]); -+ else -+ temp = temp_from_s16(data->temp11[index]); -+ -+ /* +16 degrees offset for temp2 for the LM99 */ -+ if (data->kind == lm99 && index <= 2) -+ temp += 16000; ++ err = write_temp8(dev, index, val); ++ if (err < 0) ++ return err; + -+ return temp; + return count; } - static ssize_t show_temp11(struct device *dev, struct device_attribute *devattr, - char *buf) +-static ssize_t show_temp11(struct device *dev, struct device_attribute *devattr, +- char *buf) ++static int read_temp11(struct device *dev, int index) { - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); -- struct lm90_data *data = lm90_update_device(dev); -- int temp; +- struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); + struct lm90_data *data = lm90_update_device(dev); + int temp; -- if (data->kind == adt7461 || data->kind == tmp451) + if (data->kind == adt7461 || data->kind == tmp451) - temp = temp_from_u16_adt7461(data, data->temp11[attr->index]); -- else if (data->kind == max6646) ++ temp = temp_from_u16_adt7461(data, data->temp11[index]); + else if (data->kind == max6646) - temp = temp_from_u16(data->temp11[attr->index]); -- else ++ temp = temp_from_u16(data->temp11[index]); + else - temp = temp_from_s16(data->temp11[attr->index]); -- -- /* +16 degrees offset for temp2 for the LM99 */ ++ temp = temp_from_s16(data->temp11[index]); + + /* +16 degrees offset for temp2 for the LM99 */ - if (data->kind == lm99 && attr->index <= 2) -- temp += 16000; -- ++ if (data->kind == lm99 && index <= 2) + temp += 16000; + - return sprintf(buf, "%d\n", temp); -+ return sprintf(buf, "%d\n", read_temp11(dev, attr->index)); ++ return temp; } -static ssize_t set_temp11(struct device *dev, struct device_attribute *devattr, - const char *buf, size_t count) ++static ssize_t show_temp11(struct device *dev, struct device_attribute *devattr, ++ char *buf) ++{ ++ struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); ++ ++ return sprintf(buf, "%d\n", read_temp11(dev, attr->index)); ++} ++ +static int write_temp11(struct device *dev, int nr, int index, long val) { struct { u8 high; -@@ -861,17 +894,9 @@ +@@ -861,18 +894,10 @@ static ssize_t set_temp11(struct device { LM90_REG_W_REMOTE_HIGHH, LM90_REG_W_REMOTE_HIGHL, 1 } }; @@ -235,14 +224,15 @@ index c9ff08d..fb9e224 100644 - int index = attr->index; - long val; int err; -- + - err = kstrtol(buf, 10, &val); - if (err < 0) - return err; - +- /* +16 degrees offset for temp2 for the LM99 */ if (data->kind == lm99 && index <= 2) -@@ -887,15 +912,50 @@ + val -= 16000; +@@ -887,15 +912,50 @@ static ssize_t set_temp11(struct device else data->temp11[index] = temp_to_s8(val) << 8; diff --git a/target/linux/apm821xx/patches-4.4/912-hwmon-lm90-expose-to-thermal-fw-via-DT.patch b/target/linux/apm821xx/patches-4.4/912-hwmon-lm90-expose-to-thermal-fw-via-DT.patch index fe7337b530..9eb9ceeaac 100644 --- a/target/linux/apm821xx/patches-4.4/912-hwmon-lm90-expose-to-thermal-fw-via-DT.patch +++ b/target/linux/apm821xx/patches-4.4/912-hwmon-lm90-expose-to-thermal-fw-via-DT.patch @@ -27,8 +27,6 @@ Tested-by: Wei Ni Reviewed-by: Olof Johansson Commit-Queue: Olof Johansson --- -diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c -index fb9e224..c54d3c8 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c @@ -96,6 +96,8 @@ @@ -40,21 +38,21 @@ index fb9e224..c54d3c8 100644 /* * Addresses to scan -@@ -118,6 +120,13 @@ - +@@ -119,6 +121,13 @@ static const unsigned short normal_i2c[] enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680, max6646, w83l771, max6696, sa56004, g781, tmp451 }; -+ + +enum sensor_id { + LOCAL = 0, + REMOTE, + REMOTE2, + SENSOR_ID_END, +}; - ++ /* * The LM90 registers -@@ -368,6 +377,7 @@ + */ +@@ -368,6 +377,7 @@ struct lm90_data { struct i2c_client *client; struct device *hwmon_dev; const struct attribute_group *groups[6]; @@ -62,12 +60,10 @@ index fb9e224..c54d3c8 100644 struct mutex update_lock; struct regulator *regulator; char valid; /* zero until following fields are valid */ -@@ -878,6 +888,24 @@ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - +@@ -880,6 +890,24 @@ static ssize_t show_temp11(struct device return sprintf(buf, "%d\n", read_temp11(dev, attr->index)); -+} -+ + } + +static int lm90_read_local_temp(void *dev, int *temp) +{ + *temp = read_temp11(dev, 4); @@ -84,10 +80,12 @@ index fb9e224..c54d3c8 100644 +{ + *temp = read_temp11(dev, 5); + return 0; - } - ++} ++ static int write_temp11(struct device *dev, int nr, int index, long val) -@@ -1150,6 +1238,18 @@ + { + struct { +@@ -1210,6 +1238,18 @@ static const struct attribute_group lm90 .attrs = lm90_temp3_attributes, }; @@ -106,7 +104,7 @@ index fb9e224..c54d3c8 100644 /* pec used for ADM1032 only */ static ssize_t show_pec(struct device *dev, struct device_attribute *dummy, char *buf) -@@ -1599,6 +1699,30 @@ +@@ -1659,6 +1699,30 @@ static int lm90_probe(struct i2c_client } } @@ -137,7 +135,7 @@ index fb9e224..c54d3c8 100644 return 0; exit_unregister: -@@ -1674,8 +1726,11 @@ +@@ -1674,8 +1738,11 @@ exit_restore: static int lm90_remove(struct i2c_client *client) { diff --git a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch index 17a53ed6e6..235365daba 100644 --- a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch @@ -370,7 +370,7 @@ return neigh_create(&arp_tbl, pkey, dev); --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c -@@ -450,48 +450,53 @@ static void tcp_options_write(__be32 *pt +@@ -451,48 +451,53 @@ static void tcp_options_write(__be32 *pt u16 options = opts->options; /* mungable copy */ if (unlikely(OPTION_MD5 & options)) { @@ -447,7 +447,7 @@ } if (unlikely(opts->num_sack_blocks)) { -@@ -499,16 +504,17 @@ static void tcp_options_write(__be32 *pt +@@ -500,16 +505,17 @@ static void tcp_options_write(__be32 *pt tp->duplicate_sack : tp->selective_acks; int this_sack; @@ -471,7 +471,7 @@ } tp->rx_opt.dsack = 0; -@@ -521,13 +527,14 @@ static void tcp_options_write(__be32 *pt +@@ -522,13 +528,14 @@ static void tcp_options_write(__be32 *pt if (foc->exp) { len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len; @@ -838,7 +838,7 @@ --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -3809,14 +3809,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -3819,14 +3819,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/brcm2708/patches-4.4/0061-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch b/target/linux/brcm2708/patches-4.4/0061-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch index 9f36433d98..6418cc0af3 100644 --- a/target/linux/brcm2708/patches-4.4/0061-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch +++ b/target/linux/brcm2708/patches-4.4/0061-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch @@ -10,7 +10,7 @@ Subject: [PATCH 061/423] config: Enable CONFIG_MEMCG, but leave it disabled --- a/kernel/cgroup.c +++ b/kernel/cgroup.c -@@ -5306,7 +5306,7 @@ int __init cgroup_init_early(void) +@@ -5307,7 +5307,7 @@ int __init cgroup_init_early(void) return 0; } @@ -19,7 +19,7 @@ Subject: [PATCH 061/423] config: Enable CONFIG_MEMCG, but leave it disabled /** * cgroup_init - cgroup initialization -@@ -5802,6 +5802,27 @@ static int __init cgroup_disable(char *s +@@ -5803,6 +5803,27 @@ static int __init cgroup_disable(char *s } __setup("cgroup_disable=", cgroup_disable); diff --git a/target/linux/brcm2708/patches-4.4/0073-BCM270x_DT-Add-pwr_led-and-the-required-input-trigge.patch b/target/linux/brcm2708/patches-4.4/0073-BCM270x_DT-Add-pwr_led-and-the-required-input-trigge.patch index 586b726155..44b2866877 100644 --- a/target/linux/brcm2708/patches-4.4/0073-BCM270x_DT-Add-pwr_led-and-the-required-input-trigge.patch +++ b/target/linux/brcm2708/patches-4.4/0073-BCM270x_DT-Add-pwr_led-and-the-required-input-trigge.patch @@ -80,7 +80,7 @@ See: https://github.com/raspberrypi/linux/issues/1064 else --- a/drivers/leds/trigger/Kconfig +++ b/drivers/leds/trigger/Kconfig -@@ -126,4 +126,11 @@ config LEDS_TRIGGER_USBDEV +@@ -122,4 +122,11 @@ config LEDS_TRIGGER_USBDEV This allows LEDs to be controlled by the presence/activity of an USB device. If unsure, say N. diff --git a/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch b/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch index 2d7d12151e..59e61b7486 100644 --- a/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch +++ b/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch @@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -6780,8 +6780,6 @@ int alloc_contig_range(unsigned long sta +@@ -6782,8 +6782,6 @@ int alloc_contig_range(unsigned long sta /* Make sure the range is really isolated. */ if (test_pages_isolated(outer_start, end, false)) { diff --git a/target/linux/brcm2708/patches-4.4/0317-videobuf2-v4l2-Verify-planes-array-in-buffer-dequeue.patch b/target/linux/brcm2708/patches-4.4/0317-videobuf2-v4l2-Verify-planes-array-in-buffer-dequeue.patch deleted file mode 100644 index 0672cdffe8..0000000000 --- a/target/linux/brcm2708/patches-4.4/0317-videobuf2-v4l2-Verify-planes-array-in-buffer-dequeue.patch +++ /dev/null @@ -1,53 +0,0 @@ -From b9e91e565c8c05abec932a3d1bcb9bab81570ad6 Mon Sep 17 00:00:00 2001 -From: Sakari Ailus -Date: Sun, 3 Apr 2016 16:31:03 -0300 -Subject: [PATCH 317/423] videobuf2-v4l2: Verify planes array in buffer - dequeueing - -commit 2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab upstream. - -When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer -which will be dequeued is not known until the buffer has been removed from -the queue. The number of planes is specific to a buffer, not to the queue. - -This does lead to the situation where multi-plane buffers may be requested -and queued with n planes, but VIDIOC_DQBUF IOCTL may be passed an argument -struct with fewer planes. - -__fill_v4l2_buffer() however uses the number of planes from the dequeued -videobuf2 buffer, overwriting kernel memory (the m.planes array allocated -in video_usercopy() in v4l2-ioctl.c) if the user provided fewer -planes than the dequeued buffer had. Oops! - -Fixes: b0e0e1f83de3 ("[media] media: videobuf2: Prepare to divide videobuf2") - -Signed-off-by: Sakari Ailus -Acked-by: Hans Verkuil -Signed-off-by: Mauro Carvalho Chehab -Signed-off-by: Greg Kroah-Hartman ---- - drivers/media/v4l2-core/videobuf2-v4l2.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/drivers/media/v4l2-core/videobuf2-v4l2.c -+++ b/drivers/media/v4l2-core/videobuf2-v4l2.c -@@ -67,6 +67,11 @@ static int __verify_planes_array(struct - return 0; - } - -+static int __verify_planes_array_core(struct vb2_buffer *vb, const void *pb) -+{ -+ return __verify_planes_array(vb, pb); -+} -+ - /** - * __verify_length() - Verify that the bytesused value for each plane fits in - * the plane length and that the data offset doesn't exceed the bytesused value. -@@ -432,6 +437,7 @@ static int __fill_vb2_buffer(struct vb2_ - } - - static const struct vb2_buf_ops v4l2_buf_ops = { -+ .verify_planes_array = __verify_planes_array_core, - .fill_user_buffer = __fill_v4l2_buffer, - .fill_vb2_buffer = __fill_vb2_buffer, - .set_timestamp = __set_timestamp, diff --git a/target/linux/brcm47xx/patches-4.4/901-Revert-bcma-switch-GPIO-portions-to-use-GPIOLIB_IRQC.patch b/target/linux/brcm47xx/patches-4.4/901-Revert-bcma-switch-GPIO-portions-to-use-GPIOLIB_IRQC.patch index 05f9d5d379..7c2c54e338 100644 --- a/target/linux/brcm47xx/patches-4.4/901-Revert-bcma-switch-GPIO-portions-to-use-GPIOLIB_IRQC.patch +++ b/target/linux/brcm47xx/patches-4.4/901-Revert-bcma-switch-GPIO-portions-to-use-GPIOLIB_IRQC.patch @@ -20,7 +20,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/bcma/Kconfig +++ b/drivers/bcma/Kconfig -@@ -99,7 +99,7 @@ config BCMA_DRIVER_GMAC_CMN +@@ -106,7 +106,7 @@ config BCMA_DRIVER_GMAC_CMN config BCMA_DRIVER_GPIO bool "BCMA GPIO driver" depends on BCMA && GPIOLIB @@ -223,7 +223,7 @@ Signed-off-by: Rafał Miłecki } --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h -@@ -646,6 +646,7 @@ struct bcma_drv_cc { +@@ -649,6 +649,7 @@ struct bcma_drv_cc { spinlock_t gpio_lock; #ifdef CONFIG_BCMA_DRIVER_GPIO struct gpio_chip gpio; diff --git a/target/linux/generic/patches-4.4/021-bcma-from-4.6.patch b/target/linux/generic/patches-4.4/021-bcma-from-4.6.patch index 8d903694c5..dede2f1f23 100644 --- a/target/linux/generic/patches-4.4/021-bcma-from-4.6.patch +++ b/target/linux/generic/patches-4.4/021-bcma-from-4.6.patch @@ -359,7 +359,7 @@ #define BCMA_CORE_ARM_CA7 0x847 #define BCMA_CORE_SYS_MEM 0x849 #define BCMA_CORE_DEFAULT 0xFFF -@@ -199,6 +201,7 @@ struct bcma_host_ops { +@@ -200,6 +202,7 @@ struct bcma_host_ops { #define BCMA_PKG_ID_BCM4707 1 #define BCMA_PKG_ID_BCM4708 2 #define BCMA_PKG_ID_BCM4709 0 @@ -470,7 +470,7 @@ extern u32 bcma_chipco_get_alp_clock(struct bcma_drv_cc *cc); --- a/drivers/bcma/bcma_private.h +++ b/drivers/bcma/bcma_private.h -@@ -47,10 +47,6 @@ int bcma_sprom_get(struct bcma_bus *bus) +@@ -45,10 +45,6 @@ int bcma_sprom_get(struct bcma_bus *bus) void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc); void bcma_core_chipcommon_init(struct bcma_drv_cc *cc); void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable); @@ -481,7 +481,7 @@ /* driver_chipcommon_b.c */ int bcma_core_chipcommon_b_init(struct bcma_drv_cc_b *ccb); -@@ -62,6 +58,21 @@ void bcma_pmu_init(struct bcma_drv_cc *c +@@ -60,6 +56,21 @@ void bcma_pmu_init(struct bcma_drv_cc *c u32 bcma_pmu_get_alp_clock(struct bcma_drv_cc *cc); u32 bcma_pmu_get_cpu_clock(struct bcma_drv_cc *cc); diff --git a/target/linux/generic/patches-4.4/046-ubifs-silence-error-output-if-MS_SILENT-is-set.patch b/target/linux/generic/patches-4.4/046-ubifs-silence-error-output-if-MS_SILENT-is-set.patch index 74418f0c90..95de680989 100644 --- a/target/linux/generic/patches-4.4/046-ubifs-silence-error-output-if-MS_SILENT-is-set.patch +++ b/target/linux/generic/patches-4.4/046-ubifs-silence-error-output-if-MS_SILENT-is-set.patch @@ -18,7 +18,7 @@ Signed-off-by: Richard Weinberger --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c -@@ -2108,8 +2108,9 @@ static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags, +@@ -2107,8 +2107,9 @@ static struct dentry *ubifs_mount(struct */ ubi = open_ubi(name, UBI_READONLY); if (IS_ERR(ubi)) { diff --git a/target/linux/generic/patches-4.4/047-ubifs-silence-early-error-if-MS_SILENT-is-set.patch b/target/linux/generic/patches-4.4/047-ubifs-silence-early-error-if-MS_SILENT-is-set.patch index e8717f2acf..189b96c41c 100644 --- a/target/linux/generic/patches-4.4/047-ubifs-silence-early-error-if-MS_SILENT-is-set.patch +++ b/target/linux/generic/patches-4.4/047-ubifs-silence-early-error-if-MS_SILENT-is-set.patch @@ -16,7 +16,7 @@ Signed-off-by: Richard Weinberger --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c -@@ -520,19 +520,19 @@ static int init_constants_early(struct ubifs_info *c) +@@ -520,19 +520,19 @@ static int init_constants_early(struct u c->max_write_shift = fls(c->max_write_size) - 1; if (c->leb_size < UBIFS_MIN_LEB_SZ) { @@ -41,7 +41,7 @@ Signed-off-by: Richard Weinberger return -EINVAL; } -@@ -543,8 +543,8 @@ static int init_constants_early(struct ubifs_info *c) +@@ -543,8 +543,8 @@ static int init_constants_early(struct u if (c->max_write_size < c->min_io_size || c->max_write_size % c->min_io_size || !is_power_of_2(c->max_write_size)) { diff --git a/target/linux/generic/patches-4.4/076-0003-net-bgmac-Fix-infinite-loop-in-bgmac_dma_tx_add.patch b/target/linux/generic/patches-4.4/076-0003-net-bgmac-Fix-infinite-loop-in-bgmac_dma_tx_add.patch deleted file mode 100644 index 3834e64cd3..0000000000 --- a/target/linux/generic/patches-4.4/076-0003-net-bgmac-Fix-infinite-loop-in-bgmac_dma_tx_add.patch +++ /dev/null @@ -1,27 +0,0 @@ -From e86663c475d384ab5f46cb5637e9b7ad08c5c505 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Fri, 15 Jul 2016 15:42:52 -0700 -Subject: [PATCH] net: bgmac: Fix infinite loop in bgmac_dma_tx_add() - -Nothing is decrementing the index "i" while we are cleaning up the -fragments we could not successful transmit. - -Fixes: 9cde94506eacf ("bgmac: implement scatter/gather support") -Reported-by: coverity (CID 1352048) -Signed-off-by: Florian Fainelli -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/broadcom/bgmac.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/ethernet/broadcom/bgmac.c -+++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -207,7 +207,7 @@ err_dma: - dma_unmap_single(dma_dev, slot->dma_addr, skb_headlen(skb), - DMA_TO_DEVICE); - -- while (i > 0) { -+ while (i-- > 0) { - int index = (ring->end + i) % BGMAC_TX_RING_SLOTS; - struct bgmac_slot_info *slot = &ring->slots[index]; - u32 ctl1 = le32_to_cpu(ring->cpu_base[index].ctl1); diff --git a/target/linux/generic/patches-4.4/095-ARC-unwind-ensure-that-.debug_frame-is-generated-vs..patch b/target/linux/generic/patches-4.4/095-ARC-unwind-ensure-that-.debug_frame-is-generated-vs..patch deleted file mode 100644 index b86c98de6c..0000000000 --- a/target/linux/generic/patches-4.4/095-ARC-unwind-ensure-that-.debug_frame-is-generated-vs..patch +++ /dev/null @@ -1,41 +0,0 @@ -From 23cd0de28cc7978130b770dd59b18ac143253351 Mon Sep 17 00:00:00 2001 -From: Vineet Gupta -Date: Tue, 28 Jun 2016 09:42:25 +0530 -Subject: [PATCH] ARC: unwind: ensure that .debug_frame is generated (vs. - .eh_frame) - -With recent binutils update to support dwarf CFI pseudo-ops in gas, we -now get .eh_frame vs. .debug_frame. Although the call frame info is -exactly the same in both, the CIE differs, which the current kernel -unwinder can't cope with. - -This broke both the kernel unwinder as well as loadable modules (latter -because of a new unhandled relo R_ARC_32_PCREL from .rela.eh_frame in -the module loader) - -The ideal solution would be to switch unwinder to .eh_frame. -For now however we can make do by just ensureing .debug_frame is -generated by removing -fasynchronous-unwind-tables - - .eh_frame generated with -gdwarf-2 -fasynchronous-unwind-tables - .debug_frame generated with -gdwarf-2 - -Fixes STAR 9001058196 - -Cc: stable@vger.kernel.org -Signed-off-by: Vineet Gupta ---- - arch/arc/Makefile | 2 -- - 1 file changed, 2 deletions(-) - ---- a/arch/arc/Makefile -+++ b/arch/arc/Makefile -@@ -48,8 +48,6 @@ endif - - endif - --cflags-$(CONFIG_ARC_DW2_UNWIND) += -fasynchronous-unwind-tables -- - # By default gcc 4.8 generates dwarf4 which kernel unwinder can't grok - ifeq ($(atleast_gcc48),y) - cflags-$(CONFIG_ARC_DW2_UNWIND) += -gdwarf-2 diff --git a/target/linux/generic/patches-4.4/096-arc-add-model-property-in-dts.patch b/target/linux/generic/patches-4.4/096-arc-add-model-property-in-dts.patch index dfaa7bc05e..85019ed008 100644 --- a/target/linux/generic/patches-4.4/096-arc-add-model-property-in-dts.patch +++ b/target/linux/generic/patches-4.4/096-arc-add-model-property-in-dts.patch @@ -31,8 +31,6 @@ Cc: Christian Ruppert arch/arc/boot/dts/vdk_hs38_smp.dts | 1 + 13 files changed, 13 insertions(+) -diff --git a/arch/arc/boot/dts/abilis_tb100_dvk.dts b/arch/arc/boot/dts/abilis_tb100_dvk.dts -index 3dd6ed9..3acf04d 100644 --- a/arch/arc/boot/dts/abilis_tb100_dvk.dts +++ b/arch/arc/boot/dts/abilis_tb100_dvk.dts @@ -24,6 +24,7 @@ @@ -43,8 +41,6 @@ index 3dd6ed9..3acf04d 100644 chosen { bootargs = "earlycon=uart8250,mmio32,0xff100000,9600n8 console=ttyS0,9600n8"; }; -diff --git a/arch/arc/boot/dts/abilis_tb101_dvk.dts b/arch/arc/boot/dts/abilis_tb101_dvk.dts -index 1cf51c2..37d88c5 100644 --- a/arch/arc/boot/dts/abilis_tb101_dvk.dts +++ b/arch/arc/boot/dts/abilis_tb101_dvk.dts @@ -24,6 +24,7 @@ @@ -55,8 +51,6 @@ index 1cf51c2..37d88c5 100644 chosen { bootargs = "earlycon=uart8250,mmio32,0xff100000,9600n8 console=ttyS0,9600n8"; }; -diff --git a/arch/arc/boot/dts/axs101.dts b/arch/arc/boot/dts/axs101.dts -index 3f9b058..d9b9b9d 100644 --- a/arch/arc/boot/dts/axs101.dts +++ b/arch/arc/boot/dts/axs101.dts @@ -13,6 +13,7 @@ @@ -67,8 +61,6 @@ index 3f9b058..d9b9b9d 100644 compatible = "snps,axs101", "snps,arc-sdp"; chosen { -diff --git a/arch/arc/boot/dts/axs103.dts b/arch/arc/boot/dts/axs103.dts -index e6d0e31..ec7fb27 100644 --- a/arch/arc/boot/dts/axs103.dts +++ b/arch/arc/boot/dts/axs103.dts @@ -16,6 +16,7 @@ @@ -79,8 +71,6 @@ index e6d0e31..ec7fb27 100644 compatible = "snps,axs103", "snps,arc-sdp"; chosen { -diff --git a/arch/arc/boot/dts/axs103_idu.dts b/arch/arc/boot/dts/axs103_idu.dts -index f999fef..070c297 100644 --- a/arch/arc/boot/dts/axs103_idu.dts +++ b/arch/arc/boot/dts/axs103_idu.dts @@ -16,6 +16,7 @@ @@ -91,8 +81,6 @@ index f999fef..070c297 100644 compatible = "snps,axs103", "snps,arc-sdp"; chosen { -diff --git a/arch/arc/boot/dts/nsim_700.dts b/arch/arc/boot/dts/nsim_700.dts -index 105a001..97a9a91 100644 --- a/arch/arc/boot/dts/nsim_700.dts +++ b/arch/arc/boot/dts/nsim_700.dts @@ -10,6 +10,7 @@ @@ -103,8 +91,6 @@ index 105a001..97a9a91 100644 compatible = "snps,nsim"; clock-frequency = <80000000>; /* 80 MHZ */ #address-cells = <1>; -diff --git a/arch/arc/boot/dts/nsim_hs.dts b/arch/arc/boot/dts/nsim_hs.dts -index fc81879..1d47b14 100644 --- a/arch/arc/boot/dts/nsim_hs.dts +++ b/arch/arc/boot/dts/nsim_hs.dts @@ -10,6 +10,7 @@ @@ -115,8 +101,6 @@ index fc81879..1d47b14 100644 compatible = "snps,nsim_hs"; #address-cells = <2>; #size-cells = <2>; -diff --git a/arch/arc/boot/dts/nsim_hs_idu.dts b/arch/arc/boot/dts/nsim_hs_idu.dts -index 46ab319..b3a69a8 100644 --- a/arch/arc/boot/dts/nsim_hs_idu.dts +++ b/arch/arc/boot/dts/nsim_hs_idu.dts @@ -10,6 +10,7 @@ @@ -127,8 +111,6 @@ index 46ab319..b3a69a8 100644 compatible = "snps,nsim_hs"; interrupt-parent = <&core_intc>; -diff --git a/arch/arc/boot/dts/nsimosci.dts b/arch/arc/boot/dts/nsimosci.dts -index 1c169dc..80f3c33 100644 --- a/arch/arc/boot/dts/nsimosci.dts +++ b/arch/arc/boot/dts/nsimosci.dts @@ -10,6 +10,7 @@ @@ -139,8 +121,6 @@ index 1c169dc..80f3c33 100644 compatible = "snps,nsimosci"; clock-frequency = <20000000>; /* 20 MHZ */ #address-cells = <1>; -diff --git a/arch/arc/boot/dts/nsimosci_hs.dts b/arch/arc/boot/dts/nsimosci_hs.dts -index d64a96f..f680f1e 100644 --- a/arch/arc/boot/dts/nsimosci_hs.dts +++ b/arch/arc/boot/dts/nsimosci_hs.dts @@ -10,6 +10,7 @@ @@ -151,8 +131,6 @@ index d64a96f..f680f1e 100644 compatible = "snps,nsimosci_hs"; clock-frequency = <20000000>; /* 20 MHZ */ #address-cells = <1>; -diff --git a/arch/arc/boot/dts/nsimosci_hs_idu.dts b/arch/arc/boot/dts/nsimosci_hs_idu.dts -index f6bf0ca..6e46b11 100644 --- a/arch/arc/boot/dts/nsimosci_hs_idu.dts +++ b/arch/arc/boot/dts/nsimosci_hs_idu.dts @@ -10,6 +10,7 @@ @@ -163,8 +141,6 @@ index f6bf0ca..6e46b11 100644 compatible = "snps,nsimosci_hs"; clock-frequency = <5000000>; /* 5 MHZ */ #address-cells = <1>; -diff --git a/arch/arc/boot/dts/vdk_hs38.dts b/arch/arc/boot/dts/vdk_hs38.dts -index 5d803dd..3c51103 100644 --- a/arch/arc/boot/dts/vdk_hs38.dts +++ b/arch/arc/boot/dts/vdk_hs38.dts @@ -13,6 +13,7 @@ @@ -175,8 +151,6 @@ index 5d803dd..3c51103 100644 compatible = "snps,axs103"; chosen { -diff --git a/arch/arc/boot/dts/vdk_hs38_smp.dts b/arch/arc/boot/dts/vdk_hs38_smp.dts -index 031a5bc..0054684 100644 --- a/arch/arc/boot/dts/vdk_hs38_smp.dts +++ b/arch/arc/boot/dts/vdk_hs38_smp.dts @@ -13,6 +13,7 @@ @@ -187,6 +161,3 @@ index 031a5bc..0054684 100644 compatible = "snps,axs103"; chosen { --- -2.7.4 - diff --git a/target/linux/generic/patches-4.4/096-tcp-make-challenge-acks-less-predictable.patch b/target/linux/generic/patches-4.4/096-tcp-make-challenge-acks-less-predictable.patch deleted file mode 100644 index a783c6ebbc..0000000000 --- a/target/linux/generic/patches-4.4/096-tcp-make-challenge-acks-less-predictable.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 75ff39ccc1bd5d3c455b6822ab09e533c551f758 Mon Sep 17 00:00:00 2001 -From: Eric Dumazet -Date: Sun, 10 Jul 2016 10:04:02 +0200 -Subject: [PATCH] tcp: make challenge acks less predictable - -Yue Cao claims that current host rate limiting of challenge ACKS -(RFC 5961) could leak enough information to allow a patient attacker -to hijack TCP sessions. He will soon provide details in an academic -paper. - -This patch increases the default limit from 100 to 1000, and adds -some randomization so that the attacker can no longer hijack -sessions without spending a considerable amount of probes. - -Based on initial analysis and patch from Linus. - -Note that we also have per socket rate limiting, so it is tempting -to remove the host limit in the future. - -v2: randomize the count of challenge acks per second, not the period. - -Fixes: 282f23c6ee34 ("tcp: implement RFC 5961 3.2") -Reported-by: Yue Cao -Signed-off-by: Eric Dumazet -Suggested-by: Linus Torvalds -Cc: Yuchung Cheng -Cc: Neal Cardwell -Acked-by: Neal Cardwell -Acked-by: Yuchung Cheng -Signed-off-by: David S. Miller ---- - net/ipv4/tcp_input.c | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - ---- a/net/ipv4/tcp_input.c -+++ b/net/ipv4/tcp_input.c -@@ -89,7 +89,7 @@ int sysctl_tcp_adv_win_scale __read_most - EXPORT_SYMBOL(sysctl_tcp_adv_win_scale); - - /* rfc5961 challenge ack rate limiting */ --int sysctl_tcp_challenge_ack_limit = 100; -+int sysctl_tcp_challenge_ack_limit = 1000; - - int sysctl_tcp_stdurg __read_mostly; - int sysctl_tcp_rfc1337 __read_mostly; -@@ -3427,7 +3427,7 @@ static void tcp_send_challenge_ack(struc - static u32 challenge_timestamp; - static unsigned int challenge_count; - struct tcp_sock *tp = tcp_sk(sk); -- u32 now; -+ u32 count, now; - - /* First check our per-socket dupack rate limit. */ - if (tcp_oow_rate_limited(sock_net(sk), skb, -@@ -3435,13 +3435,18 @@ static void tcp_send_challenge_ack(struc - &tp->last_oow_ack_time)) - return; - -- /* Then check the check host-wide RFC 5961 rate limit. */ -+ /* Then check host-wide RFC 5961 rate limit. */ - now = jiffies / HZ; - if (now != challenge_timestamp) { -+ u32 half = (sysctl_tcp_challenge_ack_limit + 1) >> 1; -+ - challenge_timestamp = now; -- challenge_count = 0; -+ WRITE_ONCE(challenge_count, half + -+ prandom_u32_max(sysctl_tcp_challenge_ack_limit)); - } -- if (++challenge_count <= sysctl_tcp_challenge_ack_limit) { -+ count = READ_ONCE(challenge_count); -+ if (count > 0) { -+ WRITE_ONCE(challenge_count, count - 1); - NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPCHALLENGEACK); - tcp_send_ack(sk); - } diff --git a/target/linux/generic/patches-4.4/180-bcma-support-BCM53573-series-of-wireless-SoCs.patch b/target/linux/generic/patches-4.4/180-bcma-support-BCM53573-series-of-wireless-SoCs.patch index 49e8e5d00e..5939b6b625 100644 --- a/target/linux/generic/patches-4.4/180-bcma-support-BCM53573-series-of-wireless-SoCs.patch +++ b/target/linux/generic/patches-4.4/180-bcma-support-BCM53573-series-of-wireless-SoCs.patch @@ -92,7 +92,7 @@ Signed-off-by: Rafał Miłecki else if (ticks > maxt) --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h -@@ -203,6 +203,9 @@ struct bcma_host_ops { +@@ -204,6 +204,9 @@ struct bcma_host_ops { #define BCMA_PKG_ID_BCM4709 0 #define BCMA_CHIP_ID_BCM47094 53030 #define BCMA_CHIP_ID_BCM53018 53018 diff --git a/target/linux/generic/patches-4.4/204-module_strip.patch b/target/linux/generic/patches-4.4/204-module_strip.patch index f51f14c307..8b807da542 100644 --- a/target/linux/generic/patches-4.4/204-module_strip.patch +++ b/target/linux/generic/patches-4.4/204-module_strip.patch @@ -109,7 +109,7 @@ Signed-off-by: Felix Fietkau config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -2859,6 +2859,7 @@ static struct module *setup_load_info(st +@@ -2864,6 +2864,7 @@ static struct module *setup_load_info(st static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau const char *modmagic = get_modinfo(info, "vermagic"); int err; -@@ -2884,6 +2885,7 @@ static int check_modinfo(struct module * +@@ -2889,6 +2890,7 @@ static int check_modinfo(struct module * pr_warn("%s: module is from the staging directory, the quality " "is unknown, you have been warned.\n", mod->name); } diff --git a/target/linux/generic/patches-4.4/220-gc_sections.patch b/target/linux/generic/patches-4.4/220-gc_sections.patch index 6c8fa3b4c9..cbe03d5c5e 100644 --- a/target/linux/generic/patches-4.4/220-gc_sections.patch +++ b/target/linux/generic/patches-4.4/220-gc_sections.patch @@ -324,7 +324,7 @@ Signed-off-by: Gabor Juhos VMLINUX_SYMBOL(__ctors_end) = .; #else #define KERNEL_CTORS() -@@ -552,7 +553,7 @@ +@@ -556,7 +557,7 @@ #define SBSS(sbss_align) \ . = ALIGN(sbss_align); \ .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { \ @@ -333,7 +333,7 @@ Signed-off-by: Gabor Juhos *(.scommon) \ } -@@ -570,7 +571,7 @@ +@@ -574,7 +575,7 @@ BSS_FIRST_SECTIONS \ *(.bss..page_aligned) \ *(.dynbss) \ @@ -342,7 +342,7 @@ Signed-off-by: Gabor Juhos *(COMMON) \ } -@@ -619,7 +620,7 @@ +@@ -623,7 +624,7 @@ . = ALIGN(8); \ __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__start___bug_table) = .; \ @@ -351,7 +351,7 @@ Signed-off-by: Gabor Juhos VMLINUX_SYMBOL(__stop___bug_table) = .; \ } #else -@@ -631,7 +632,7 @@ +@@ -635,7 +636,7 @@ . = ALIGN(4); \ .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__tracedata_start) = .; \ @@ -360,7 +360,7 @@ Signed-off-by: Gabor Juhos VMLINUX_SYMBOL(__tracedata_end) = .; \ } #else -@@ -648,17 +649,17 @@ +@@ -652,17 +653,17 @@ #define INIT_SETUP(initsetup_align) \ . = ALIGN(initsetup_align); \ VMLINUX_SYMBOL(__setup_start) = .; \ @@ -382,7 +382,7 @@ Signed-off-by: Gabor Juhos INIT_CALLS_LEVEL(0) \ INIT_CALLS_LEVEL(1) \ INIT_CALLS_LEVEL(2) \ -@@ -672,21 +673,21 @@ +@@ -676,21 +677,21 @@ #define CON_INITCALL \ VMLINUX_SYMBOL(__con_initcall_start) = .; \ diff --git a/target/linux/generic/patches-4.4/221-module_exports.patch b/target/linux/generic/patches-4.4/221-module_exports.patch index 60c0e701d7..510a86c468 100644 --- a/target/linux/generic/patches-4.4/221-module_exports.patch +++ b/target/linux/generic/patches-4.4/221-module_exports.patch @@ -43,7 +43,7 @@ } \ \ /* __*init sections */ \ -@@ -706,6 +716,8 @@ +@@ -710,6 +720,8 @@ EXIT_TEXT \ EXIT_DATA \ EXIT_CALL \ diff --git a/target/linux/generic/patches-4.4/332-arc-add-OWRTDTB-section.patch b/target/linux/generic/patches-4.4/332-arc-add-OWRTDTB-section.patch index e8f0d1ecf6..5a2b67cfcd 100644 --- a/target/linux/generic/patches-4.4/332-arc-add-OWRTDTB-section.patch +++ b/target/linux/generic/patches-4.4/332-arc-add-OWRTDTB-section.patch @@ -40,7 +40,7 @@ Signed-off-by: Alexey Brodkin ;---------------------------------------------------------------- --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c -@@ -370,6 +370,8 @@ static inline int is_kernel(unsigned lon +@@ -366,6 +366,8 @@ static inline int is_kernel(unsigned lon return 0; } @@ -49,7 +49,7 @@ Signed-off-by: Alexey Brodkin void __init setup_arch(char **cmdline_p) { #ifdef CONFIG_ARC_UBOOT_SUPPORT -@@ -383,7 +385,7 @@ void __init setup_arch(char **cmdline_p) +@@ -379,7 +381,7 @@ void __init setup_arch(char **cmdline_p) #endif { /* No, so try the embedded one */ diff --git a/target/linux/generic/patches-4.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/patches-4.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch index 8494064eb1..f08f9b4a7c 100644 --- a/target/linux/generic/patches-4.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch +++ b/target/linux/generic/patches-4.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch @@ -11,7 +11,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c -@@ -1200,6 +1200,49 @@ static struct mtd_info * __init open_mtd +@@ -1203,6 +1203,49 @@ static struct mtd_info * __init open_mtd return mtd; } @@ -61,7 +61,7 @@ Signed-off-by: Daniel Golle static int __init ubi_init(void) { int err, i, k; -@@ -1283,6 +1326,12 @@ static int __init ubi_init(void) +@@ -1286,6 +1329,12 @@ static int __init ubi_init(void) } } diff --git a/target/linux/generic/patches-4.4/655-increase_skb_pad.patch b/target/linux/generic/patches-4.4/655-increase_skb_pad.patch index ad95d4c67e..09685b13bf 100644 --- a/target/linux/generic/patches-4.4/655-increase_skb_pad.patch +++ b/target/linux/generic/patches-4.4/655-increase_skb_pad.patch @@ -1,6 +1,6 @@ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2179,7 +2179,7 @@ static inline int pskb_network_may_pull( +@@ -2180,7 +2180,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/target/linux/generic/patches-4.4/721-phy_packets.patch b/target/linux/generic/patches-4.4/721-phy_packets.patch index e232c0f563..c3fbb955b8 100644 --- a/target/linux/generic/patches-4.4/721-phy_packets.patch +++ b/target/linux/generic/patches-4.4/721-phy_packets.patch @@ -41,7 +41,7 @@ */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2210,6 +2210,10 @@ static inline int pskb_trim(struct sk_bu +@@ -2211,6 +2211,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -52,7 +52,7 @@ /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -2314,16 +2318,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -2315,16 +2319,6 @@ static inline struct sk_buff *dev_alloc_ } diff --git a/target/linux/generic/patches-4.4/834-ledtrig-libata.patch b/target/linux/generic/patches-4.4/834-ledtrig-libata.patch index c60fc1a515..c3d187a098 100644 --- a/target/linux/generic/patches-4.4/834-ledtrig-libata.patch +++ b/target/linux/generic/patches-4.4/834-ledtrig-libata.patch @@ -69,7 +69,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -4774,6 +4787,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -4780,6 +4793,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -79,7 +79,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = tag; -@@ -5671,6 +5687,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -5677,6 +5693,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -89,7 +89,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -5692,6 +5711,12 @@ static void ata_host_release(struct devi +@@ -5698,6 +5717,12 @@ static void ata_host_release(struct devi kfree(ap->pmp_link); kfree(ap->slave_link); @@ -102,7 +102,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6138,7 +6163,23 @@ int ata_host_register(struct ata_host *h +@@ -6144,7 +6169,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } diff --git a/target/linux/ipq806x/patches-4.4/097-usb-dwc3-add-generic-OF-glue-layer.patch b/target/linux/ipq806x/patches-4.4/097-usb-dwc3-add-generic-OF-glue-layer.patch index 96e9859060..214bedc95a 100644 --- a/target/linux/ipq806x/patches-4.4/097-usb-dwc3-add-generic-OF-glue-layer.patch +++ b/target/linux/ipq806x/patches-4.4/097-usb-dwc3-add-generic-OF-glue-layer.patch @@ -24,14 +24,12 @@ Signed-off-by: Nitheesh Sekar 3 files changed, 188 insertions(+) create mode 100644 drivers/usb/dwc3/dwc3-of-simple.c -diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig -index 5a42c45..070e704 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -87,6 +87,15 @@ config USB_DWC3_KEYSTONE Support of USB2/3 functionality in TI Keystone2 platforms. Say 'Y' or 'M' here if you have one such device - + +config USB_DWC3_OF_SIMPLE + tristate "Generic OF Simple Glue Layer" + depends on OF && COMMON_CLK @@ -44,20 +42,15 @@ index 5a42c45..070e704 100644 config USB_DWC3_ST tristate "STMicroelectronics Platforms" depends on ARCH_STI && OF -diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile -index acc951d..6491f9b 100644 --- a/drivers/usb/dwc3/Makefile +++ b/drivers/usb/dwc3/Makefile -@@ -37,5 +37,6 @@ obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o +@@ -37,5 +37,6 @@ obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-oma obj-$(CONFIG_USB_DWC3_EXYNOS) += dwc3-exynos.o obj-$(CONFIG_USB_DWC3_PCI) += dwc3-pci.o obj-$(CONFIG_USB_DWC3_KEYSTONE) += dwc3-keystone.o +obj-$(CONFIG_USB_DWC3_OF_SIMPLE) += dwc3-of-simple.o obj-$(CONFIG_USB_DWC3_QCOM) += dwc3-qcom.o obj-$(CONFIG_USB_DWC3_ST) += dwc3-st.o -diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c -new file mode 100644 -index 0000000..60c4c5a --- /dev/null +++ b/drivers/usb/dwc3/dwc3-of-simple.c @@ -0,0 +1,178 @@ @@ -239,6 +232,3 @@ index 0000000..60c4c5a +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("DesignWare USB3 OF Simple Glue Layer"); +MODULE_AUTHOR("Felipe Balbi "); --- -2.7.2 - diff --git a/target/linux/ipq806x/patches-4.4/098-usb-dwc3-of-simple-fix-build-warning-on-PM.patch b/target/linux/ipq806x/patches-4.4/098-usb-dwc3-of-simple-fix-build-warning-on-PM.patch index 2fbdd1b4be..b982c82367 100644 --- a/target/linux/ipq806x/patches-4.4/098-usb-dwc3-of-simple-fix-build-warning-on-PM.patch +++ b/target/linux/ipq806x/patches-4.4/098-usb-dwc3-of-simple-fix-build-warning-on-PM.patch @@ -16,26 +16,21 @@ Signed-off-by: Nitheesh Sekar drivers/usb/dwc3/dwc3-of-simple.c | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c -index 60c4c5a..9c9f741 100644 --- a/drivers/usb/dwc3/dwc3-of-simple.c +++ b/drivers/usb/dwc3/dwc3-of-simple.c -@@ -122,6 +122,7 @@ static int dwc3_of_simple_remove(struct platform_device *pdev) +@@ -122,6 +122,7 @@ static int dwc3_of_simple_remove(struct return 0; } - + +#ifdef CONFIG_PM static int dwc3_of_simple_runtime_suspend(struct device *dev) { struct dwc3_of_simple *simple = dev_get_drvdata(dev); -@@ -150,6 +151,7 @@ static int dwc3_of_simple_runtime_resume(struct device *dev) - +@@ -150,6 +151,7 @@ static int dwc3_of_simple_runtime_resume + return 0; } +#endif - + static const struct dev_pm_ops dwc3_of_simple_dev_pm_ops = { SET_RUNTIME_PM_OPS(dwc3_of_simple_runtime_suspend, --- -2.7.2 - diff --git a/target/linux/ipq806x/patches-4.4/099-usb-dwc3-Remove-impossible-check-for-of_clk_get_pare.patch b/target/linux/ipq806x/patches-4.4/099-usb-dwc3-Remove-impossible-check-for-of_clk_get_pare.patch index 44506c1256..32f9e34177 100644 --- a/target/linux/ipq806x/patches-4.4/099-usb-dwc3-Remove-impossible-check-for-of_clk_get_pare.patch +++ b/target/linux/ipq806x/patches-4.4/099-usb-dwc3-Remove-impossible-check-for-of_clk_get_pare.patch @@ -19,34 +19,29 @@ Signed-off-by: Nitheesh Sekar drivers/usb/dwc3/dwc3-of-simple.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c -index 9c9f741..9743353 100644 --- a/drivers/usb/dwc3/dwc3-of-simple.c +++ b/drivers/usb/dwc3/dwc3-of-simple.c -@@ -42,6 +42,7 @@ static int dwc3_of_simple_probe(struct platform_device *pdev) +@@ -42,6 +42,7 @@ static int dwc3_of_simple_probe(struct p struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - + + unsigned int count; int ret; int i; - -@@ -49,11 +50,11 @@ static int dwc3_of_simple_probe(struct platform_device *pdev) + +@@ -49,11 +50,11 @@ static int dwc3_of_simple_probe(struct p if (!simple) return -ENOMEM; - + - ret = of_clk_get_parent_count(np); - if (ret < 0) - return ret; + count = of_clk_get_parent_count(np); + if (!count) + return -ENOENT; - + - simple->num_clocks = ret; + simple->num_clocks = count; - + simple->clks = devm_kcalloc(dev, simple->num_clocks, sizeof(struct clk *), GFP_KERNEL); --- -2.7.2 - diff --git a/target/linux/ipq806x/patches-4.4/100-usb-phy-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch b/target/linux/ipq806x/patches-4.4/100-usb-phy-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch index d5549191e2..0da1927b44 100644 --- a/target/linux/ipq806x/patches-4.4/100-usb-phy-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch +++ b/target/linux/ipq806x/patches-4.4/100-usb-phy-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch @@ -1,9 +1,9 @@ --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig -@@ -390,4 +390,15 @@ - Enable this to support the Broadcom Cygnus PCIe PHY. - If unsure, say N. - +@@ -390,4 +390,15 @@ config PHY_CYGNUS_PCIE + Enable this to support the Broadcom Cygnus PCIe PHY. + If unsure, say N. + +config PHY_QCOM_DWC3 + tristate "QCOM DWC3 USB PHY support" + depends on ARCH_QCOM @@ -18,7 +18,7 @@ endmenu --- a/drivers/phy/Makefile +++ b/drivers/phy/Makefile -@@ -48,3 +48,4 @@ obj-$(CONFIG_PHY_TUSB1210) += +@@ -48,3 +48,4 @@ obj-$(CONFIG_PHY_TUSB1210) += phy-tusb1 obj-$(CONFIG_PHY_BRCMSTB_SATA) += phy-brcmstb-sata.o obj-$(CONFIG_PHY_PISTACHIO_USB) += phy-pistachio-usb.o obj-$(CONFIG_PHY_CYGNUS_PCIE) += phy-bcm-cygnus-pcie.o diff --git a/target/linux/ipq806x/patches-4.4/710-spi-qup-Make-sure-mode-is-only-determined-once.patch b/target/linux/ipq806x/patches-4.4/710-spi-qup-Make-sure-mode-is-only-determined-once.patch index e5dafd76b4..338c3a0c2b 100644 --- a/target/linux/ipq806x/patches-4.4/710-spi-qup-Make-sure-mode-is-only-determined-once.patch +++ b/target/linux/ipq806x/patches-4.4/710-spi-qup-Make-sure-mode-is-only-determined-once.patch @@ -14,22 +14,20 @@ Change-Id: If3cdd924355e037d77dc8201a72895fac0461aa5 drivers/spi/spi-qup.c | 96 +++++++++++++++++++-------------------------------- 1 file changed, 36 insertions(+), 60 deletions(-) -diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c -index eb2cb8c..714fd4e 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -150,13 +150,20 @@ struct spi_qup { int rx_bytes; int qup_v1; - + - int use_dma; + int mode; struct dma_slave_config rx_conf; struct dma_slave_config tx_conf; - int mode; }; - - + + +static inline bool spi_qup_is_dma_xfer(int mode) +{ + if (mode == QUP_IO_M_MODE_DMOV || mode == QUP_IO_M_MODE_BAM) @@ -41,19 +39,19 @@ index eb2cb8c..714fd4e 100644 static inline bool spi_qup_is_valid_state(struct spi_qup *controller) { u32 opstate = readl_relaxed(controller->base + QUP_STATE); -@@ -427,7 +434,7 @@ static irqreturn_t spi_qup_qup_irq(int irq, void *dev_id) +@@ -427,7 +434,7 @@ static irqreturn_t spi_qup_qup_irq(int i error = -EIO; } - + - if (!controller->use_dma) { + if (!spi_qup_is_dma_xfer(controller->mode)) { if (opflags & QUP_OP_IN_SERVICE_FLAG) spi_qup_fifo_read(controller, xfer); - -@@ -446,43 +453,11 @@ static irqreturn_t spi_qup_qup_irq(int irq, void *dev_id) + +@@ -446,43 +453,11 @@ static irqreturn_t spi_qup_qup_irq(int i return IRQ_HANDLED; } - + -static u32 -spi_qup_get_mode(struct spi_master *master, struct spi_transfer *xfer) -{ @@ -93,17 +91,17 @@ index eb2cb8c..714fd4e 100644 - u32 config, iomode, mode, control; + u32 config, iomode, control; int ret, n_words; - + if (spi->mode & SPI_LOOP && xfer->len > controller->in_fifo_sz) { -@@ -503,24 +478,22 @@ static int spi_qup_io_config(struct spi_device *spi, struct spi_transfer *xfer) +@@ -503,24 +478,22 @@ static int spi_qup_io_config(struct spi_ return -EIO; } - + - controller->mode = mode = spi_qup_get_mode(spi->master, xfer); + controller->w_size = DIV_ROUND_UP(xfer->bits_per_word, 8); + controller->n_words = xfer->len / controller->w_size; n_words = controller->n_words; - + - if (mode == QUP_IO_M_MODE_FIFO) { + if (n_words <= (controller->in_fifo_sz / sizeof(u32))) { + controller->mode = QUP_IO_M_MODE_FIFO; @@ -127,9 +125,9 @@ index eb2cb8c..714fd4e 100644 + controller->mode = QUP_IO_M_MODE_BAM; writel_relaxed(0, controller->base + QUP_MX_READ_CNT); writel_relaxed(0, controller->base + QUP_MX_WRITE_CNT); - -@@ -541,19 +514,26 @@ static int spi_qup_io_config(struct spi_device *spi, struct spi_transfer *xfer) - + +@@ -541,19 +514,26 @@ static int spi_qup_io_config(struct spi_ + writel_relaxed(0, controller->base + QUP_MX_OUTPUT_CNT); } + } else { @@ -140,46 +138,46 @@ index eb2cb8c..714fd4e 100644 + writel_relaxed(0, controller->base + QUP_MX_READ_CNT); + writel_relaxed(0, controller->base + QUP_MX_WRITE_CNT); } - + iomode = readl_relaxed(controller->base + QUP_IO_M_MODES); /* Set input and output transfer mode */ iomode &= ~(QUP_IO_M_INPUT_MODE_MASK | QUP_IO_M_OUTPUT_MODE_MASK); - + - if (!controller->use_dma) + if (!spi_qup_is_dma_xfer(controller->mode)) iomode &= ~(QUP_IO_M_PACK_EN | QUP_IO_M_UNPACK_EN); else iomode |= QUP_IO_M_PACK_EN | QUP_IO_M_UNPACK_EN; - + - iomode |= (mode << QUP_IO_M_OUTPUT_MODE_MASK_SHIFT); - iomode |= (mode << QUP_IO_M_INPUT_MODE_MASK_SHIFT); + iomode |= (controller->mode << QUP_IO_M_OUTPUT_MODE_MASK_SHIFT); + iomode |= (controller->mode << QUP_IO_M_INPUT_MODE_MASK_SHIFT); - + writel_relaxed(iomode, controller->base + QUP_IO_M_MODES); - -@@ -594,7 +574,7 @@ static int spi_qup_io_config(struct spi_device *spi, struct spi_transfer *xfer) + +@@ -594,7 +574,7 @@ static int spi_qup_io_config(struct spi_ config |= xfer->bits_per_word - 1; config |= QUP_CONFIG_SPI_MODE; - + - if (controller->use_dma) { + if (spi_qup_is_dma_xfer(controller->mode)) { if (!xfer->tx_buf) config |= QUP_CONFIG_NO_OUTPUT; if (!xfer->rx_buf) -@@ -612,7 +592,7 @@ static int spi_qup_io_config(struct spi_device *spi, struct spi_transfer *xfer) +@@ -612,7 +592,7 @@ static int spi_qup_io_config(struct spi_ * status change in BAM mode */ - + - if (mode == QUP_IO_M_MODE_BAM) + if (spi_qup_is_dma_xfer(controller->mode)) mask = QUP_OP_IN_SERVICE_FLAG | QUP_OP_OUT_SERVICE_FLAG; - + writel_relaxed(mask, controller->base + QUP_OPERATIONAL_MASK); -@@ -646,7 +626,7 @@ static int spi_qup_transfer_one(struct spi_master *master, +@@ -646,7 +626,7 @@ static int spi_qup_transfer_one(struct s controller->tx_bytes = 0; spin_unlock_irqrestore(&controller->lock, flags); - + - if (controller->use_dma) + if (spi_qup_is_dma_xfer(controller->mode)) ret = spi_qup_do_dma(master, xfer); @@ -188,13 +186,13 @@ index eb2cb8c..714fd4e 100644 @@ -670,7 +650,7 @@ exit: ret = controller->error; spin_unlock_irqrestore(&controller->lock, flags); - + - if (ret && controller->use_dma) + if (ret && spi_qup_is_dma_xfer(controller->mode)) spi_qup_dma_terminate(master, xfer); - + return ret; -@@ -681,9 +661,7 @@ static bool spi_qup_can_dma(struct spi_master *master, struct spi_device *spi, +@@ -681,9 +661,7 @@ static bool spi_qup_can_dma(struct spi_m { struct spi_qup *qup = spi_master_get_devdata(master); size_t dma_align = dma_get_cache_alignment(); @@ -202,24 +200,21 @@ index eb2cb8c..714fd4e 100644 - - qup->use_dma = 0; + int n_words; - + if (xfer->rx_buf && (xfer->len % qup->in_blk_sz || IS_ERR_OR_NULL(master->dma_rx) || -@@ -695,12 +673,10 @@ static bool spi_qup_can_dma(struct spi_master *master, struct spi_device *spi, +@@ -695,12 +673,10 @@ static bool spi_qup_can_dma(struct spi_m !IS_ALIGNED((size_t)xfer->tx_buf, dma_align))) return false; - + - mode = spi_qup_get_mode(master, xfer); - if (mode == QUP_IO_M_MODE_FIFO) + n_words = xfer->len / DIV_ROUND_UP(xfer->bits_per_word, 8); + if (n_words <= (qup->in_fifo_sz / sizeof(u32))) return false; - + - qup->use_dma = 1; - return true; } - --- -2.7.2 - + diff --git a/target/linux/ipq806x/patches-4.4/711-spi-qup-Fix-transaction-done-signaling.patch b/target/linux/ipq806x/patches-4.4/711-spi-qup-Fix-transaction-done-signaling.patch index dd4bad344b..99f455ef3c 100644 --- a/target/linux/ipq806x/patches-4.4/711-spi-qup-Fix-transaction-done-signaling.patch +++ b/target/linux/ipq806x/patches-4.4/711-spi-qup-Fix-transaction-done-signaling.patch @@ -16,20 +16,15 @@ Signed-off-by: Andy Gross drivers/spi/spi-qup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c -index 714fd4e..fe629f2 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c -@@ -447,7 +447,8 @@ static irqreturn_t spi_qup_qup_irq(int irq, void *dev_id) +@@ -447,7 +447,8 @@ static irqreturn_t spi_qup_qup_irq(int i controller->xfer = xfer; spin_unlock_irqrestore(&controller->lock, flags); - + - if (controller->rx_bytes == xfer->len || error) + if ((controller->rx_bytes == xfer->len && + (opflags & QUP_OP_MAX_INPUT_DONE_FLAG)) || error) complete(&controller->done); - + return IRQ_HANDLED; --- -2.7.2 - diff --git a/target/linux/ipq806x/patches-4.4/712-spi-qup-Fix-DMA-mode-to-work-correctly.patch b/target/linux/ipq806x/patches-4.4/712-spi-qup-Fix-DMA-mode-to-work-correctly.patch index d9abc65ce2..9c7bbeabda 100644 --- a/target/linux/ipq806x/patches-4.4/712-spi-qup-Fix-DMA-mode-to-work-correctly.patch +++ b/target/linux/ipq806x/patches-4.4/712-spi-qup-Fix-DMA-mode-to-work-correctly.patch @@ -14,29 +14,27 @@ Signed-off-by: Andy Gross drivers/spi/spi-qup.c | 95 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 63 insertions(+), 32 deletions(-) -diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c -index fe629f2..089c5e8 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -143,6 +143,7 @@ struct spi_qup { - + struct spi_transfer *xfer; struct completion done; + struct completion dma_tx_done; int error; int w_size; /* bytes per SPI word */ int n_words; -@@ -285,16 +286,16 @@ static void spi_qup_fifo_write(struct spi_qup *controller, - +@@ -285,16 +286,16 @@ static void spi_qup_fifo_write(struct sp + static void spi_qup_dma_done(void *data) { - struct spi_qup *qup = data; + struct completion *done = data; - + - complete(&qup->done); + complete(done); } - + static int spi_qup_prep_sg(struct spi_master *master, struct spi_transfer *xfer, enum dma_transfer_direction dir, - dma_async_tx_callback callback) @@ -47,25 +45,25 @@ index fe629f2..089c5e8 100644 unsigned long flags = DMA_PREP_INTERRUPT | DMA_PREP_FENCE; struct dma_async_tx_descriptor *desc; struct scatterlist *sgl; -@@ -313,11 +314,11 @@ static int spi_qup_prep_sg(struct spi_master *master, struct spi_transfer *xfer, +@@ -313,11 +314,11 @@ static int spi_qup_prep_sg(struct spi_ma } - + desc = dmaengine_prep_slave_sg(chan, sgl, nents, dir, flags); - if (!desc) - return -EINVAL; + if (IS_ERR_OR_NULL(desc)) + return desc ? PTR_ERR(desc) : -EINVAL; - + desc->callback = callback; - desc->callback_param = qup; + desc->callback_param = data; - + cookie = dmaengine_submit(desc); - -@@ -333,18 +334,29 @@ static void spi_qup_dma_terminate(struct spi_master *master, + +@@ -333,18 +334,29 @@ static void spi_qup_dma_terminate(struct dmaengine_terminate_all(master->dma_rx); } - + -static int spi_qup_do_dma(struct spi_master *master, struct spi_transfer *xfer) +static int spi_qup_do_dma(struct spi_master *master, struct spi_transfer *xfer, +unsigned long timeout) @@ -73,7 +71,7 @@ index fe629f2..089c5e8 100644 + struct spi_qup *qup = spi_master_get_devdata(master); dma_async_tx_callback rx_done = NULL, tx_done = NULL; int ret; - + + /* before issuing the descriptors, set the QUP to run */ + ret = spi_qup_set_state(qup, QUP_STATE_RUN); + if (ret) { @@ -87,27 +85,27 @@ index fe629f2..089c5e8 100644 + + if (xfer->tx_buf) tx_done = spi_qup_dma_done; - + if (xfer->rx_buf) { - ret = spi_qup_prep_sg(master, xfer, DMA_DEV_TO_MEM, rx_done); + ret = spi_qup_prep_sg(master, xfer, DMA_DEV_TO_MEM, rx_done, + &qup->done); if (ret) return ret; - -@@ -352,17 +364,26 @@ static int spi_qup_do_dma(struct spi_master *master, struct spi_transfer *xfer) + +@@ -352,17 +364,26 @@ static int spi_qup_do_dma(struct spi_mas } - + if (xfer->tx_buf) { - ret = spi_qup_prep_sg(master, xfer, DMA_MEM_TO_DEV, tx_done); + ret = spi_qup_prep_sg(master, xfer, DMA_MEM_TO_DEV, tx_done, + &qup->dma_tx_done); if (ret) return ret; - + dma_async_issue_pending(master->dma_tx); } - + - return 0; + if (xfer->rx_buf && !wait_for_completion_timeout(&qup->done, timeout)) + return -ETIMEDOUT; @@ -118,17 +116,17 @@ index fe629f2..089c5e8 100644 + + return ret; } - + -static int spi_qup_do_pio(struct spi_master *master, struct spi_transfer *xfer) +static int spi_qup_do_pio(struct spi_master *master, struct spi_transfer *xfer, + unsigned long timeout) { struct spi_qup *qup = spi_master_get_devdata(master); int ret; -@@ -382,6 +403,15 @@ static int spi_qup_do_pio(struct spi_master *master, struct spi_transfer *xfer) +@@ -382,6 +403,15 @@ static int spi_qup_do_pio(struct spi_mas if (qup->mode == QUP_IO_M_MODE_FIFO) spi_qup_fifo_write(qup, xfer); - + + ret = spi_qup_set_state(qup, QUP_STATE_RUN); + if (ret) { + dev_warn(qup->dev, "cannot set RUN state\n"); @@ -140,36 +138,36 @@ index fe629f2..089c5e8 100644 + return 0; } - -@@ -430,7 +460,6 @@ static irqreturn_t spi_qup_qup_irq(int irq, void *dev_id) + +@@ -430,7 +460,6 @@ static irqreturn_t spi_qup_qup_irq(int i dev_warn(controller->dev, "CLK_OVER_RUN\n"); if (spi_err & SPI_ERROR_CLK_UNDER_RUN) dev_warn(controller->dev, "CLK_UNDER_RUN\n"); - error = -EIO; } - -@@ -619,6 +648,7 @@ static int spi_qup_transfer_one(struct spi_master *master, + +@@ -619,6 +648,7 @@ static int spi_qup_transfer_one(struct s timeout = 100 * msecs_to_jiffies(timeout); - + reinit_completion(&controller->done); + reinit_completion(&controller->dma_tx_done); - + spin_lock_irqsave(&controller->lock, flags); controller->xfer = xfer; -@@ -628,21 +658,13 @@ static int spi_qup_transfer_one(struct spi_master *master, +@@ -628,21 +658,13 @@ static int spi_qup_transfer_one(struct s spin_unlock_irqrestore(&controller->lock, flags); - + if (spi_qup_is_dma_xfer(controller->mode)) - ret = spi_qup_do_dma(master, xfer); + ret = spi_qup_do_dma(master, xfer, timeout); else - ret = spi_qup_do_pio(master, xfer); + ret = spi_qup_do_pio(master, xfer, timeout); - + if (ret) goto exit; - + - if (spi_qup_set_state(controller, QUP_STATE_RUN)) { - dev_warn(controller->dev, "cannot set EXECUTE state\n"); - goto exit; @@ -181,10 +179,10 @@ index fe629f2..089c5e8 100644 exit: spi_qup_set_state(controller, QUP_STATE_RESET); spin_lock_irqsave(&controller->lock, flags); -@@ -664,15 +686,23 @@ static bool spi_qup_can_dma(struct spi_master *master, struct spi_device *spi, +@@ -664,15 +686,23 @@ static bool spi_qup_can_dma(struct spi_m size_t dma_align = dma_get_cache_alignment(); int n_words; - + - if (xfer->rx_buf && (xfer->len % qup->in_blk_sz || - IS_ERR_OR_NULL(master->dma_rx) || - !IS_ALIGNED((size_t)xfer->rx_buf, dma_align))) @@ -193,7 +191,7 @@ index fe629f2..089c5e8 100644 + if (!IS_ALIGNED((size_t)xfer->rx_buf, dma_align) || + IS_ERR_OR_NULL(master->dma_rx)) + return false; - + - if (xfer->tx_buf && (xfer->len % qup->out_blk_sz || - IS_ERR_OR_NULL(master->dma_tx) || - !IS_ALIGNED((size_t)xfer->tx_buf, dma_align))) @@ -210,17 +208,14 @@ index fe629f2..089c5e8 100644 + if (qup->qup_v1 && (xfer->len % qup->out_blk_sz)) + return false; + } - + n_words = xfer->len / DIV_ROUND_UP(xfer->bits_per_word, 8); if (n_words <= (qup->in_fifo_sz / sizeof(u32))) -@@ -875,6 +905,7 @@ static int spi_qup_probe(struct platform_device *pdev) - +@@ -875,6 +905,7 @@ static int spi_qup_probe(struct platform + spin_lock_init(&controller->lock); init_completion(&controller->done); + init_completion(&controller->dma_tx_done); - + iomode = readl_relaxed(base + QUP_IO_M_MODES); - --- -2.7.2 - + diff --git a/target/linux/ipq806x/patches-4.4/713-spi-qup-Fix-block-mode-to-work-correctly.patch b/target/linux/ipq806x/patches-4.4/713-spi-qup-Fix-block-mode-to-work-correctly.patch index 7a05ecdba5..eb0b45cd1c 100644 --- a/target/linux/ipq806x/patches-4.4/713-spi-qup-Fix-block-mode-to-work-correctly.patch +++ b/target/linux/ipq806x/patches-4.4/713-spi-qup-Fix-block-mode-to-work-correctly.patch @@ -14,13 +14,11 @@ Change-Id: I4b4f4d25be57e6e8148f6f0d24bed376eb287ecf drivers/spi/spi-qup.c | 181 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 141 insertions(+), 40 deletions(-) -diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c -index 089c5e8..e487416 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -83,6 +83,8 @@ #define QUP_IO_M_MODE_BAM 3 - + /* QUP_OPERATIONAL fields */ +#define QUP_OP_IN_BLOCK_READ_REQ BIT(13) +#define QUP_OP_OUT_BLOCK_WRITE_REQ BIT(12) @@ -30,20 +28,20 @@ index 089c5e8..e487416 100644 @@ -156,6 +158,12 @@ struct spi_qup { struct dma_slave_config tx_conf; }; - + +static inline bool spi_qup_is_flag_set(struct spi_qup *controller, u32 flag) +{ + u32 opflag = readl_relaxed(controller->base + QUP_OPERATIONAL); + + return opflag & flag; +} - + static inline bool spi_qup_is_dma_xfer(int mode) { -@@ -217,29 +225,26 @@ static int spi_qup_set_state(struct spi_qup *controller, u32 state) +@@ -217,29 +225,26 @@ static int spi_qup_set_state(struct spi_ return 0; } - + -static void spi_qup_fifo_read(struct spi_qup *controller, - struct spi_transfer *xfer) +static void spi_qup_read_from_fifo(struct spi_qup *controller, @@ -54,18 +52,18 @@ index 089c5e8..e487416 100644 - int idx, shift, w_size; - - w_size = controller->w_size; -- -- while (controller->rx_bytes < xfer->len) { + int i, shift, num_bytes; + u32 word; - + +- while (controller->rx_bytes < xfer->len) { +- - state = readl_relaxed(controller->base + QUP_OPERATIONAL); - if (0 == (state & QUP_OP_IN_FIFO_NOT_EMPTY)) - break; + for (; num_words; num_words--) { - + word = readl_relaxed(controller->base + QUP_INPUT_FIFO); - + + num_bytes = min_t(int, xfer->len - controller->rx_bytes, + controller->w_size); + @@ -74,13 +72,13 @@ index 089c5e8..e487416 100644 + controller->rx_bytes += num_bytes; continue; } - + - for (idx = 0; idx < w_size; idx++, controller->rx_bytes++) { + for (i = 0; i < num_bytes; i++, controller->rx_bytes++) { /* * The data format depends on bytes per SPI word: * 4 bytes: 0x12345678 -@@ -247,38 +252,80 @@ static void spi_qup_fifo_read(struct spi_qup *controller, +@@ -247,38 +252,80 @@ static void spi_qup_fifo_read(struct spi * 1 byte : 0x00000012 */ shift = BITS_PER_BYTE; @@ -90,7 +88,7 @@ index 089c5e8..e487416 100644 } } } - + -static void spi_qup_fifo_write(struct spi_qup *controller, +static void spi_qup_read(struct spi_qup *controller, struct spi_transfer *xfer) @@ -117,24 +115,24 @@ index 089c5e8..e487416 100644 + if (!spi_qup_is_flag_set(controller, + QUP_OP_IN_FIFO_NOT_EMPTY)) + break; -+ + +- w_size = controller->w_size; + num_words = 1; + } - -- w_size = controller->w_size; ++ + /* read up to the maximum transfer size available */ + spi_qup_read_from_fifo(controller, xfer, num_words); - + - while (controller->tx_bytes < xfer->len) { + remainder -= num_words; - + - state = readl_relaxed(controller->base + QUP_OPERATIONAL); - if (state & QUP_OP_OUT_FIFO_FULL) + /* if block mode, check to see if next block is available */ + if (is_block_mode && !spi_qup_is_flag_set(controller, + QUP_OP_IN_BLOCK_READ_REQ)) break; - + + } while (remainder); + + /* @@ -158,7 +156,7 @@ index 089c5e8..e487416 100644 + for (; num_words; num_words--) { word = 0; - for (idx = 0; idx < w_size; idx++, controller->tx_bytes++) { - + - if (!tx_buf) { - controller->tx_bytes += w_size; - break; @@ -169,18 +167,18 @@ index 089c5e8..e487416 100644 + data = tx_buf[controller->tx_bytes + i]; + word |= data << (BITS_PER_BYTE * (3 - i)); } - + - data = tx_buf[controller->tx_bytes]; - word |= data << (BITS_PER_BYTE * (3 - idx)); - } + controller->tx_bytes += num_bytes; - + writel_relaxed(word, controller->base + QUP_OUTPUT_FIFO); } @@ -291,6 +338,44 @@ static void spi_qup_dma_done(void *data) complete(done); } - + +static void spi_qup_write(struct spi_qup *controller, + struct spi_transfer *xfer) +{ @@ -225,36 +223,36 @@ index 089c5e8..e487416 100644 @@ -348,11 +433,13 @@ unsigned long timeout) return ret; } - + - if (xfer->rx_buf) - rx_done = spi_qup_dma_done; + if (!qup->qup_v1) { + if (xfer->rx_buf) + rx_done = spi_qup_dma_done; - + - if (xfer->tx_buf) - tx_done = spi_qup_dma_done; + if (xfer->tx_buf) + tx_done = spi_qup_dma_done; + } - + if (xfer->rx_buf) { ret = spi_qup_prep_sg(master, xfer, DMA_DEV_TO_MEM, rx_done, -@@ -401,7 +488,7 @@ static int spi_qup_do_pio(struct spi_master *master, struct spi_transfer *xfer, +@@ -401,7 +488,7 @@ static int spi_qup_do_pio(struct spi_mas } - + if (qup->mode == QUP_IO_M_MODE_FIFO) - spi_qup_fifo_write(qup, xfer); + spi_qup_write(qup, xfer); - + ret = spi_qup_set_state(qup, QUP_STATE_RUN); if (ret) { -@@ -434,10 +521,11 @@ static irqreturn_t spi_qup_qup_irq(int irq, void *dev_id) - +@@ -434,10 +521,11 @@ static irqreturn_t spi_qup_qup_irq(int i + writel_relaxed(qup_err, controller->base + QUP_ERROR_FLAGS); writel_relaxed(spi_err, controller->base + SPI_ERROR_FLAGS); - writel_relaxed(opflags, controller->base + QUP_OPERATIONAL); - + if (!xfer) { - dev_err_ratelimited(controller->dev, "unexpected irq %08x %08x %08x\n", + writel_relaxed(opflags, controller->base + QUP_OPERATIONAL); @@ -263,10 +261,10 @@ index 089c5e8..e487416 100644 qup_err, spi_err, opflags); return IRQ_HANDLED; } -@@ -463,12 +551,20 @@ static irqreturn_t spi_qup_qup_irq(int irq, void *dev_id) +@@ -463,12 +551,20 @@ static irqreturn_t spi_qup_qup_irq(int i error = -EIO; } - + - if (!spi_qup_is_dma_xfer(controller->mode)) { + if (spi_qup_is_dma_xfer(controller->mode)) { + writel_relaxed(opflags, controller->base + QUP_OPERATIONAL); @@ -280,24 +278,24 @@ index 089c5e8..e487416 100644 if (opflags & QUP_OP_IN_SERVICE_FLAG) - spi_qup_fifo_read(controller, xfer); + spi_qup_read(controller, xfer); - + if (opflags & QUP_OP_OUT_SERVICE_FLAG) - spi_qup_fifo_write(controller, xfer); + spi_qup_write(controller, xfer); } - + spin_lock_irqsave(&controller->lock, flags); -@@ -476,6 +572,9 @@ static irqreturn_t spi_qup_qup_irq(int irq, void *dev_id) +@@ -476,6 +572,9 @@ static irqreturn_t spi_qup_qup_irq(int i controller->xfer = xfer; spin_unlock_irqrestore(&controller->lock, flags); - + + /* re-read opflags as flags may have changed due to actions above */ + opflags = readl_relaxed(controller->base + QUP_OPERATIONAL); + if ((controller->rx_bytes == xfer->len && (opflags & QUP_OP_MAX_INPUT_DONE_FLAG)) || error) complete(&controller->done); -@@ -519,11 +618,13 @@ static int spi_qup_io_config(struct spi_device *spi, struct spi_transfer *xfer) +@@ -519,11 +618,13 @@ static int spi_qup_io_config(struct spi_ /* must be zero for FIFO */ writel_relaxed(0, controller->base + QUP_MX_INPUT_CNT); writel_relaxed(0, controller->base + QUP_MX_OUTPUT_CNT); @@ -311,7 +309,4 @@ index 089c5e8..e487416 100644 + /* must be zero for BLOCK and BAM */ writel_relaxed(0, controller->base + QUP_MX_READ_CNT); writel_relaxed(0, controller->base + QUP_MX_WRITE_CNT); - --- -2.7.2 - + diff --git a/target/linux/ipq806x/patches-4.4/714-spi-qup-properly-detect-extra-interrupts.patch b/target/linux/ipq806x/patches-4.4/714-spi-qup-properly-detect-extra-interrupts.patch index d8a9b31462..0039962481 100644 --- a/target/linux/ipq806x/patches-4.4/714-spi-qup-properly-detect-extra-interrupts.patch +++ b/target/linux/ipq806x/patches-4.4/714-spi-qup-properly-detect-extra-interrupts.patch @@ -17,22 +17,20 @@ Signed-off-by: Matthew McClintock drivers/spi/spi-qup.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) -diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c -index e487416..45e30c7 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c -@@ -509,6 +509,7 @@ static irqreturn_t spi_qup_qup_irq(int irq, void *dev_id) +@@ -509,6 +509,7 @@ static irqreturn_t spi_qup_qup_irq(int i u32 opflags, qup_err, spi_err; unsigned long flags; int error = 0; + bool done = 0; - + spin_lock_irqsave(&controller->lock, flags); xfer = controller->xfer; -@@ -567,16 +568,19 @@ static irqreturn_t spi_qup_qup_irq(int irq, void *dev_id) +@@ -567,16 +568,19 @@ static irqreturn_t spi_qup_qup_irq(int i spi_qup_write(controller, xfer); } - + - spin_lock_irqsave(&controller->lock, flags); - controller->error = error; - controller->xfer = xfer; @@ -40,7 +38,7 @@ index e487416..45e30c7 100644 - /* re-read opflags as flags may have changed due to actions above */ opflags = readl_relaxed(controller->base + QUP_OPERATIONAL); - + if ((controller->rx_bytes == xfer->len && (opflags & QUP_OP_MAX_INPUT_DONE_FLAG)) || error) + done = true; @@ -52,9 +50,9 @@ index e487416..45e30c7 100644 + + if (done) complete(&controller->done); - + return IRQ_HANDLED; -@@ -769,7 +773,6 @@ static int spi_qup_transfer_one(struct spi_master *master, +@@ -769,7 +773,6 @@ static int spi_qup_transfer_one(struct s exit: spi_qup_set_state(controller, QUP_STATE_RESET); spin_lock_irqsave(&controller->lock, flags); @@ -62,6 +60,3 @@ index e487416..45e30c7 100644 if (!ret) ret = controller->error; spin_unlock_irqrestore(&controller->lock, flags); --- -2.7.2 - diff --git a/target/linux/ipq806x/patches-4.4/715-spi-qup-don-t-re-read-opflags-to-see-if-transaction-.patch b/target/linux/ipq806x/patches-4.4/715-spi-qup-don-t-re-read-opflags-to-see-if-transaction-.patch index 54711a1d05..a08b442d50 100644 --- a/target/linux/ipq806x/patches-4.4/715-spi-qup-don-t-re-read-opflags-to-see-if-transaction-.patch +++ b/target/linux/ipq806x/patches-4.4/715-spi-qup-don-t-re-read-opflags-to-see-if-transaction-.patch @@ -13,20 +13,15 @@ Signed-off-by: Matthew McClintock drivers/spi/spi-qup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c -index 45e30c7..59bc37c 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c -@@ -569,7 +569,8 @@ static irqreturn_t spi_qup_qup_irq(int irq, void *dev_id) +@@ -569,7 +569,8 @@ static irqreturn_t spi_qup_qup_irq(int i } - + /* re-read opflags as flags may have changed due to actions above */ - opflags = readl_relaxed(controller->base + QUP_OPERATIONAL); + if (opflags & QUP_OP_OUT_SERVICE_FLAG) + opflags = readl_relaxed(controller->base + QUP_OPERATIONAL); - + if ((controller->rx_bytes == xfer->len && (opflags & QUP_OP_MAX_INPUT_DONE_FLAG)) || error) --- -2.7.2 - diff --git a/target/linux/ipq806x/patches-4.4/801-override-compiler-flags.patch b/target/linux/ipq806x/patches-4.4/801-override-compiler-flags.patch index 164d9ee4fb..5b419a75d8 100644 --- a/target/linux/ipq806x/patches-4.4/801-override-compiler-flags.patch +++ b/target/linux/ipq806x/patches-4.4/801-override-compiler-flags.patch @@ -1,8 +1,6 @@ -diff --git a/arch/arm/Makefile b/arch/arm/Makefile -index 2c2b28e..64c037d 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile -@@ -67,7 +67,7 @@ KBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra) +@@ -72,7 +72,7 @@ KBUILD_CFLAGS += $(call cc-option,-fno-i # macro, but instead defines a whole series of macros which makes # testing for a specific architecture or later rather impossible. arch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m -Wa,-march=armv7-m diff --git a/target/linux/mediatek/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch b/target/linux/mediatek/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch index 7e7a5de1c8..8ad59dfb33 100644 --- a/target/linux/mediatek/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch +++ b/target/linux/mediatek/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch @@ -4296,7 +4296,7 @@ Signed-off-by: John Crispin } /* -@@ -715,9 +848,9 @@ static const struct flash_info spi_nor_i +@@ -716,9 +849,9 @@ static const struct flash_info spi_nor_i { "mx25l4005a", INFO(0xc22013, 0, 64 * 1024, 8, SECT_4K) }, { "mx25l8005", INFO(0xc22014, 0, 64 * 1024, 16, 0) }, { "mx25l1606e", INFO(0xc22015, 0, 64 * 1024, 32, SECT_4K) }, @@ -4308,7 +4308,7 @@ Signed-off-by: John Crispin { "mx25u6435f", INFO(0xc22537, 0, 64 * 1024, 128, SECT_4K) }, { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, -@@ -732,8 +865,8 @@ static const struct flash_info spi_nor_i +@@ -733,8 +866,8 @@ static const struct flash_info spi_nor_i { "n25q032a", INFO(0x20bb16, 0, 64 * 1024, 64, SPI_NOR_QUAD_READ) }, { "n25q064", INFO(0x20ba17, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_QUAD_READ) }, { "n25q064a", INFO(0x20bb17, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_QUAD_READ) }, @@ -4319,7 +4319,7 @@ Signed-off-by: John Crispin { "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_QUAD_READ) }, { "n25q512a", INFO(0x20bb20, 0, 64 * 1024, 1024, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ) }, { "n25q512ax3", INFO(0x20ba20, 0, 64 * 1024, 1024, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ) }, -@@ -767,6 +900,7 @@ static const struct flash_info spi_nor_i +@@ -768,6 +901,7 @@ static const struct flash_info spi_nor_i { "s25fl008k", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "s25fl016k", INFO(0xef4015, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "s25fl064k", INFO(0xef4017, 0, 64 * 1024, 128, SECT_4K) }, @@ -4327,7 +4327,7 @@ Signed-off-by: John Crispin { "s25fl132k", INFO(0x014016, 0, 64 * 1024, 64, SECT_4K) }, { "s25fl164k", INFO(0x014017, 0, 64 * 1024, 128, SECT_4K) }, { "s25fl204k", INFO(0x014013, 0, 64 * 1024, 8, SECT_4K | SPI_NOR_DUAL_READ) }, -@@ -830,11 +964,23 @@ static const struct flash_info spi_nor_i +@@ -831,11 +965,23 @@ static const struct flash_info spi_nor_i { "w25x16", INFO(0xef3015, 0, 64 * 1024, 32, SECT_4K) }, { "w25x32", INFO(0xef3016, 0, 64 * 1024, 64, SECT_4K) }, { "w25q32", INFO(0xef4016, 0, 64 * 1024, 64, SECT_4K) }, @@ -4354,7 +4354,7 @@ Signed-off-by: John Crispin { "w25q80", INFO(0xef5014, 0, 64 * 1024, 16, SECT_4K) }, { "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K) }, { "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) }, -@@ -857,7 +1003,7 @@ static const struct flash_info *spi_nor_ +@@ -858,7 +1004,7 @@ static const struct flash_info *spi_nor_ tmp = nor->read_reg(nor, SPINOR_OP_RDID, id, SPI_NOR_MAX_ID_LEN); if (tmp < 0) { @@ -4363,7 +4363,7 @@ Signed-off-by: John Crispin return ERR_PTR(tmp); } -@@ -868,7 +1014,7 @@ static const struct flash_info *spi_nor_ +@@ -869,7 +1015,7 @@ static const struct flash_info *spi_nor_ return &spi_nor_ids[tmp]; } } @@ -4372,7 +4372,7 @@ Signed-off-by: John Crispin id[0], id[1], id[2]); return ERR_PTR(-ENODEV); } -@@ -1014,6 +1160,8 @@ static int macronix_quad_enable(struct s +@@ -1015,6 +1161,8 @@ static int macronix_quad_enable(struct s int ret, val; val = read_sr(nor); @@ -4381,7 +4381,7 @@ Signed-off-by: John Crispin write_enable(nor); write_sr(nor, val | SR_QUAD_EN_MX); -@@ -1095,7 +1243,7 @@ static int set_quad_mode(struct spi_nor +@@ -1096,7 +1244,7 @@ static int set_quad_mode(struct spi_nor static int spi_nor_check(struct spi_nor *nor) { if (!nor->dev || !nor->read || !nor->write || @@ -4390,7 +4390,7 @@ Signed-off-by: John Crispin pr_err("spi-nor: please fill all the necessary fields!\n"); return -EINVAL; } -@@ -1108,7 +1256,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1109,7 +1257,7 @@ int spi_nor_scan(struct spi_nor *nor, co const struct flash_info *info = NULL; struct device *dev = nor->dev; struct mtd_info *mtd = &nor->mtd; @@ -4399,7 +4399,7 @@ Signed-off-by: John Crispin int ret; int i; -@@ -1158,9 +1306,11 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1159,9 +1307,11 @@ int spi_nor_scan(struct spi_nor *nor, co if (JEDEC_MFR(info) == SNOR_MFR_ATMEL || JEDEC_MFR(info) == SNOR_MFR_INTEL || JEDEC_MFR(info) == SNOR_MFR_MACRONIX || @@ -4412,7 +4412,7 @@ Signed-off-by: John Crispin } if (!mtd->name) -@@ -1174,7 +1324,8 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1175,7 +1325,8 @@ int spi_nor_scan(struct spi_nor *nor, co mtd->_read = spi_nor_read; /* NOR protection support for STmicro/Micron chips and similar */ @@ -4422,7 +4422,7 @@ Signed-off-by: John Crispin nor->flash_lock = stm_lock; nor->flash_unlock = stm_unlock; nor->flash_is_locked = stm_is_locked; -@@ -1194,6 +1345,8 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1195,6 +1346,8 @@ int spi_nor_scan(struct spi_nor *nor, co if (info->flags & USE_FSR) nor->flags |= SNOR_F_USE_FSR; @@ -4431,7 +4431,7 @@ Signed-off-by: John Crispin #ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS /* prefer "small sector" erase if possible */ -@@ -1296,6 +1449,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1297,6 +1450,12 @@ int spi_nor_scan(struct spi_nor *nor, co nor->addr_width = 3; } diff --git a/target/linux/mvebu/patches-4.4/024-mvebu-make-device-IO-strongly-ordered.patch b/target/linux/mvebu/patches-4.4/024-mvebu-make-device-IO-strongly-ordered.patch deleted file mode 100644 index dc669978ff..0000000000 --- a/target/linux/mvebu/patches-4.4/024-mvebu-make-device-IO-strongly-ordered.patch +++ /dev/null @@ -1,47 +0,0 @@ -On Cortex-A9 based Marvell SoCs, when HW I/O coherency is enabled, all -non-RAM space needs to be mapped strongly ordered. -In upstream this was added for PCIe I/O only, this change expands it -to cover all device memory. Fixes issues with CESA. -Based on patch from Thomas Petazzoni. - -Signed-off-by: Felix Fietkau - ---- a/arch/arm/mach-mvebu/coherency.c -+++ b/arch/arm/mach-mvebu/coherency.c -@@ -162,22 +162,16 @@ exit: - } - - /* -- * This ioremap hook is used on Armada 375/38x to ensure that PCIe -+ * This ioremap hook is used on Armada 375/38x to ensure that all non-RAM - * memory areas are mapped as MT_UNCACHED instead of MT_DEVICE. This -- * is needed as a workaround for a deadlock issue between the PCIe -+ * is needed as a workaround for a deadlock issue between the bus - * interface and the cache controller. - */ - static void __iomem * --armada_pcie_wa_ioremap_caller(phys_addr_t phys_addr, size_t size, -- unsigned int mtype, void *caller) -+armada_wa_ioremap_caller(phys_addr_t phys_addr, size_t size, -+ unsigned int mtype, void *caller) - { -- struct resource pcie_mem; -- -- mvebu_mbus_get_pcie_mem_aperture(&pcie_mem); -- -- if (pcie_mem.start <= phys_addr && (phys_addr + size) <= pcie_mem.end) -- mtype = MT_UNCACHED; -- -+ mtype = MT_UNCACHED; - return __arm_ioremap_caller(phys_addr, size, mtype, caller); - } - -@@ -186,7 +180,7 @@ static void __init armada_375_380_cohere - struct device_node *cache_dn; - - coherency_cpu_base = of_iomap(np, 0); -- arch_ioremap_caller = armada_pcie_wa_ioremap_caller; -+ arch_ioremap_caller = armada_wa_ioremap_caller; - - /* - * We should switch the PL310 to I/O coherency mode only if diff --git a/target/linux/mvebu/patches-4.4/105-linksys_armada_385_fix_crypto_sram.patch b/target/linux/mvebu/patches-4.4/105-linksys_armada_385_fix_crypto_sram.patch deleted file mode 100644 index 3963c352f7..0000000000 --- a/target/linux/mvebu/patches-4.4/105-linksys_armada_385_fix_crypto_sram.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/arch/arm/boot/dts/armada-385-linksys.dtsi -+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi -@@ -58,8 +58,8 @@ - soc { - ranges = ; -+ MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 -+ MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>; - - internal-regs { - diff --git a/target/linux/omap/patches-4.4/001-omap4_pandaboard-wlan_fix.patch b/target/linux/omap/patches-4.4/001-omap4_pandaboard-wlan_fix.patch index cc8b7f4a78..5a6f76fd15 100644 --- a/target/linux/omap/patches-4.4/001-omap4_pandaboard-wlan_fix.patch +++ b/target/linux/omap/patches-4.4/001-omap4_pandaboard-wlan_fix.patch @@ -2,8 +2,9 @@ +++ b/arch/arm/mach-omap2/twl-common.c @@ -368,6 +368,7 @@ static struct regulator_init_data omap4_ static struct regulator_init_data omap4_clk32kg_idata = { - .constraints = { - .valid_ops_mask = REGULATOR_CHANGE_STATUS, + .constraints = { + .valid_ops_mask = REGULATOR_CHANGE_STATUS, + .always_on = true, - }, + }, }; + diff --git a/target/linux/oxnas/patches-4.4/999-libata-hacks.patch b/target/linux/oxnas/patches-4.4/999-libata-hacks.patch index e9208aea4c..1f4799dd88 100644 --- a/target/linux/oxnas/patches-4.4/999-libata-hacks.patch +++ b/target/linux/oxnas/patches-4.4/999-libata-hacks.patch @@ -15,7 +15,7 @@ /* initialize internal qc */ /* XXX: Tag 0 is used for drivers with legacy EH as some -@@ -4781,6 +4789,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -4787,6 +4795,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (unlikely(ap->pflags & ATA_PFLAG_FROZEN)) return NULL; @@ -25,7 +25,7 @@ /* libsas case */ if (ap->flags & ATA_FLAG_SAS_HOST) { tag = ata_sas_allocate_tag(ap); -@@ -4826,6 +4837,8 @@ void ata_qc_free(struct ata_queued_cmd * +@@ -4832,6 +4843,8 @@ void ata_qc_free(struct ata_queued_cmd * qc->tag = ATA_TAG_POISON; if (ap->flags & ATA_FLAG_SAS_HOST) ata_sas_free_tag(tag, ap); diff --git a/target/linux/ramips/patches-4.4/0054-mtd-add-chunked-read-io-to-m25p80.patch b/target/linux/ramips/patches-4.4/0054-mtd-add-chunked-read-io-to-m25p80.patch index 281dd5eaa4..f5a4b072cb 100644 --- a/target/linux/ramips/patches-4.4/0054-mtd-add-chunked-read-io-to-m25p80.patch +++ b/target/linux/ramips/patches-4.4/0054-mtd-add-chunked-read-io-to-m25p80.patch @@ -1,6 +1,6 @@ --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1009,6 +1009,66 @@ write_err: +@@ -1010,6 +1010,66 @@ write_err: return ret; } @@ -67,7 +67,7 @@ static int macronix_quad_enable(struct spi_nor *nor) { int ret, val; -@@ -1187,10 +1247,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1188,10 +1248,12 @@ int spi_nor_scan(struct spi_nor *nor, co } /* sst nor chips use AAI word program */ @@ -82,7 +82,7 @@ if (info->flags & USE_FSR) nor->flags |= SNOR_F_USE_FSR; -@@ -1218,11 +1280,20 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1219,11 +1281,20 @@ int spi_nor_scan(struct spi_nor *nor, co mtd->writebufsize = nor->page_size; if (np) { -- 2.30.2