From: Stijn Segers Date: Tue, 5 Jun 2018 21:29:31 +0000 (+0200) Subject: kernel: bump 4.14 to 4.14.48 for 18.06 X-Git-Tag: v18.06.0-rc1~87 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1199a91095269969ba5256702359fba97c6ada08;p=oweals%2Fopenwrt.git kernel: bump 4.14 to 4.14.48 for 18.06 Refreshed patches. The following patches were upstreamed and have been deleted: * target/linux/lantiq/patches-4.14/0025-MIPS-lantiq-gphy-Remove-reboot-remove-reset-asserts.patch * target/linux/generic/pending-4.14/101-clocksource-mips-gic-timer-fix-clocksource-counter-w.patch * target/linux/generic/pending-4.14/103-MIPS-c-r4k-fix-data-corruption-related-to-cache-coherence.patch * target/linux/generic/pending-4.14/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch Compile-tested: ramips/mt7621, x86/64 Run-tested: ramips/mt7621 Signed-off-by: Stijn Segers --- diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 52bc1ee69d..6c220f3f2a 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -5,12 +5,12 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .71 LINUX_VERSION-4.4 = .121 LINUX_VERSION-4.9 = .106 -LINUX_VERSION-4.14 = .43 +LINUX_VERSION-4.14 = .48 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729 LINUX_KERNEL_HASH-4.9.106 = 2d409bb29588ea9a61bae006255ee97a675ded364c87a9ff43f687c5271bbe3c -LINUX_KERNEL_HASH-4.14.43 = 133fc0f8f9ea04006c255a052704e8eb95a021fc799dd27f98fcfcace59e714a +LINUX_KERNEL_HASH-4.14.48 = 80a0608f611fe7a5c54556402cdc2880a21301e1c4e1b19d4c1db82ad2bf22b9 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch index efaf61a5f3..e8154253a3 100644 --- a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch +++ b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch @@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter #include "xhci.h" #include "xhci-trace.h" -@@ -244,6 +246,458 @@ static void xhci_pme_acpi_rtd3_enable(st +@@ -255,6 +257,458 @@ static void xhci_pme_acpi_rtd3_enable(st static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } #endif /* CONFIG_ACPI */ @@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter /* called during probe() after chip reset completes */ static int xhci_pci_setup(struct usb_hcd *hcd) { -@@ -279,6 +733,22 @@ static int xhci_pci_probe(struct pci_dev +@@ -290,6 +744,22 @@ static int xhci_pci_probe(struct pci_dev struct hc_driver *driver; struct usb_hcd *hcd; @@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter driver = (struct hc_driver *)id->driver_data; /* For some HW implementation, a XHCI reset is just not enough... */ -@@ -343,6 +813,16 @@ static void xhci_pci_remove(struct pci_d +@@ -354,6 +824,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; diff --git a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch index b78a7881c1..3545b99aab 100644 --- a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -202,7 +202,7 @@ static void xhci_pci_quirks(struct devic +@@ -213,7 +213,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_TRUST_TX_LENGTH; if (pdev->vendor == PCI_VENDOR_ID_RENESAS && pdev->device == 0x0015) diff --git a/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index 9f58370a18..3bee392f4f 100644 --- a/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -129,7 +129,7 @@ it on BCM4708 family. +++ b/drivers/usb/host/xhci.h @@ -1831,6 +1831,7 @@ struct xhci_hcd { #define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26) - /* Reserved. It was XHCI_U2_DISABLE_WAKE */ + #define XHCI_U2_DISABLE_WAKE (1 << 27) #define XHCI_ASMEDIA_MODIFY_FLOWCONTROL (1 << 28) +#define XHCI_FAKE_DOORBELL (1 << 29) #define XHCI_SUSPEND_DELAY (1 << 30) diff --git a/target/linux/generic/backport-4.14/011-kbuild-export-SUBARCH.patch b/target/linux/generic/backport-4.14/011-kbuild-export-SUBARCH.patch index 0ce7429591..3df01c34b1 100644 --- a/target/linux/generic/backport-4.14/011-kbuild-export-SUBARCH.patch +++ b/target/linux/generic/backport-4.14/011-kbuild-export-SUBARCH.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -433,8 +433,8 @@ KBUILD_CFLAGS_MODULE := -DMODULE +@@ -428,8 +428,8 @@ KBUILD_CFLAGS_MODULE := -DMODULE KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds GCC_PLUGINS_CFLAGS := diff --git a/target/linux/generic/backport-4.14/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch b/target/linux/generic/backport-4.14/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch index 784c548c81..45039ce133 100644 --- a/target/linux/generic/backport-4.14/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch +++ b/target/linux/generic/backport-4.14/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch @@ -26,7 +26,7 @@ Signed-off-by: Hauke Mehrtens /* * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble -@@ -149,11 +150,13 @@ +@@ -150,11 +151,13 @@ * This is an Ethernet frame header. */ diff --git a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch index d4b99a5dc1..431098fa09 100644 --- a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch +++ b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch @@ -11,7 +11,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c -@@ -829,6 +829,7 @@ static void clusterip_net_exit(struct ne +@@ -834,6 +834,7 @@ static void clusterip_net_exit(struct ne cn->procdir = NULL; #endif nf_unregister_net_hook(net, &cip_arp_ops); diff --git a/target/linux/generic/hack-4.14/202-reduce_module_size.patch b/target/linux/generic/hack-4.14/202-reduce_module_size.patch index 7d67e847c6..2cbb6add9a 100644 --- a/target/linux/generic/hack-4.14/202-reduce_module_size.patch +++ b/target/linux/generic/hack-4.14/202-reduce_module_size.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -430,7 +430,7 @@ KBUILD_AFLAGS_KERNEL := +@@ -425,7 +425,7 @@ KBUILD_AFLAGS_KERNEL := KBUILD_CFLAGS_KERNEL := KBUILD_AFLAGS_MODULE := -DMODULE KBUILD_CFLAGS_MODULE := -DMODULE diff --git a/target/linux/generic/hack-4.14/207-disable-modorder.patch b/target/linux/generic/hack-4.14/207-disable-modorder.patch index 8f99cde617..5fb956c98d 100644 --- a/target/linux/generic/hack-4.14/207-disable-modorder.patch +++ b/target/linux/generic/hack-4.14/207-disable-modorder.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -1233,7 +1233,6 @@ all: modules +@@ -1227,7 +1227,6 @@ all: modules PHONY += modules modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau @$(kecho) ' Building modules, stage 2.'; $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost -@@ -1262,7 +1261,6 @@ _modinst_: +@@ -1256,7 +1255,6 @@ _modinst_: rm -f $(MODLIB)/build ; \ ln -s $(CURDIR) $(MODLIB)/build ; \ fi diff --git a/target/linux/generic/hack-4.14/220-gc_sections.patch b/target/linux/generic/hack-4.14/220-gc_sections.patch index ef7cd6f897..7fd493d2ff 100644 --- a/target/linux/generic/hack-4.14/220-gc_sections.patch +++ b/target/linux/generic/hack-4.14/220-gc_sections.patch @@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos # Read KERNELRELEASE from include/config/kernel.release (if it exists) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) -@@ -787,11 +792,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH +@@ -781,11 +786,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once) endif diff --git a/target/linux/generic/hack-4.14/773-bgmac-add-srab-switch.patch b/target/linux/generic/hack-4.14/773-bgmac-add-srab-switch.patch index a6ba81fb09..33a18a8352 100644 --- a/target/linux/generic/hack-4.14/773-bgmac-add-srab-switch.patch +++ b/target/linux/generic/hack-4.14/773-bgmac-add-srab-switch.patch @@ -32,7 +32,7 @@ Signed-off-by: Hauke Mehrtens #include #include #include -@@ -1409,6 +1410,17 @@ static const struct ethtool_ops bgmac_et +@@ -1410,6 +1411,17 @@ static const struct ethtool_ops bgmac_et .set_link_ksettings = phy_ethtool_set_link_ksettings, }; @@ -50,7 +50,7 @@ Signed-off-by: Hauke Mehrtens /************************************************** * MII **************************************************/ -@@ -1538,6 +1550,14 @@ int bgmac_enet_probe(struct bgmac *bgmac +@@ -1539,6 +1551,14 @@ int bgmac_enet_probe(struct bgmac *bgmac net_dev->hw_features = net_dev->features; net_dev->vlan_features = net_dev->features; @@ -65,7 +65,7 @@ Signed-off-by: Hauke Mehrtens err = register_netdev(bgmac->net_dev); if (err) { dev_err(bgmac->dev, "Cannot register net device\n"); -@@ -1560,6 +1580,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe); +@@ -1561,6 +1581,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe); void bgmac_enet_remove(struct bgmac *bgmac) { diff --git a/target/linux/generic/hack-4.14/901-debloat_sock_diag.patch b/target/linux/generic/hack-4.14/901-debloat_sock_diag.patch index 29071d63c9..d250843a6a 100644 --- a/target/linux/generic/hack-4.14/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-4.14/901-debloat_sock_diag.patch @@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau static void __sk_free(struct sock *sk) { +#ifdef CONFIG_SOCK_DIAG - if (unlikely(sock_diag_has_destroy_listeners(sk) && sk->sk_net_refcnt)) + if (unlikely(sk->sk_net_refcnt && sock_diag_has_destroy_listeners(sk))) sock_diag_broadcast_destroy(sk); else +#endif diff --git a/target/linux/generic/hack-4.14/902-debloat_proc.patch b/target/linux/generic/hack-4.14/902-debloat_proc.patch index 4f5fb7022c..3f47d22355 100644 --- a/target/linux/generic/hack-4.14/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch @@ -243,7 +243,7 @@ Signed-off-by: Felix Fietkau } --- a/mm/vmstat.c +++ b/mm/vmstat.c -@@ -1944,10 +1944,12 @@ void __init init_mm_internals(void) +@@ -1946,10 +1946,12 @@ void __init init_mm_internals(void) start_shepherd_timer(); #endif #ifdef CONFIG_PROC_FS diff --git a/target/linux/generic/pending-4.14/101-clocksource-mips-gic-timer-fix-clocksource-counter-w.patch b/target/linux/generic/pending-4.14/101-clocksource-mips-gic-timer-fix-clocksource-counter-w.patch deleted file mode 100644 index a554aa1125..0000000000 --- a/target/linux/generic/pending-4.14/101-clocksource-mips-gic-timer-fix-clocksource-counter-w.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Felix Fietkau -Date: Wed, 21 Feb 2018 13:40:12 +0100 -Subject: [PATCH] clocksource: mips-gic-timer: fix clocksource counter width - -This code needs to use ffs instead of fls on the mask to determine the -shift for reading the GIC_CONFIG_COUNTBITS field. - -Fixes: e07127a077c7 ("clocksource: mips-gic-timer: Use new GIC accessor functions") -Cc: Paul Burton -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/clocksource/mips-gic-timer.c -+++ b/drivers/clocksource/mips-gic-timer.c -@@ -164,7 +164,7 @@ static int __init __gic_clocksource_init - - /* Set clocksource mask. */ - count_width = read_gic_config() & GIC_CONFIG_COUNTBITS; -- count_width >>= __fls(GIC_CONFIG_COUNTBITS); -+ count_width >>= __ffs(GIC_CONFIG_COUNTBITS); - count_width *= 4; - count_width += 32; - gic_clocksource.mask = CLOCKSOURCE_MASK(count_width); diff --git a/target/linux/generic/pending-4.14/103-MIPS-c-r4k-fix-data-corruption-related-to-cache-coherence.patch b/target/linux/generic/pending-4.14/103-MIPS-c-r4k-fix-data-corruption-related-to-cache-coherence.patch deleted file mode 100644 index 69d926bd5b..0000000000 --- a/target/linux/generic/pending-4.14/103-MIPS-c-r4k-fix-data-corruption-related-to-cache-coherence.patch +++ /dev/null @@ -1,90 +0,0 @@ -From patchwork Thu Apr 26 23:28:34 2018 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [v2] MIPS: c-r4k: fix data corruption related to cache coherence. -X-Patchwork-Submitter: NeilBrown -X-Patchwork-Id: 19259 -Message-Id: <87vacdlf8d.fsf@notabene.neil.brown.name> -To: James Hogan -Cc: Ralf Baechle , - Paul Burton , linux-mips@linux-mips.org, - linux-kernel@vger.kernel.org -Date: Fri, 27 Apr 2018 09:28:34 +1000 -From: NeilBrown -List-Id: linux-mips - -When DMA will be performed to a MIPS32 1004K CPS, the -L1-cache for the range needs to be flushed and invalidated -first. -The code currently takes one of two approaches. -1/ If the range is less than the size of the dcache, then - HIT type requests flush/invalidate cache lines for the - particular addresses. HIT-type requests a globalised - by the CPS so this is safe on SMP. - -2/ If the range is larger than the size of dcache, then - INDEX type requests flush/invalidate the whole cache. - INDEX type requests affect the local cache only. CPS - does not propagate them in any way. So this invalidation - is not safe on SMP CPS systems. - -Data corruption due to '2' can quite easily be demonstrated by -repeatedly "echo 3 > /proc/sys/vm/drop_caches" and then sha1sum -a file that is several times the size of available memory. -Dropping caches means that large contiguous extents (large than -dcache) are more likely. - -This was not a problem before Linux-4.8 because option 2 was -never used if CONFIG_MIPS_CPS was defined. The commit -which removed that apparently didn't appreciate the full -consequence of the change. - -We could, in theory, globalize the INDEX based flush by sending an IPI -to other cores. These cache invalidation routines can be called with -interrupts disabled and synchronous IPI require interrupts to be -enabled. Asynchronous IPI may not trigger writeback soon enough. -So we cannot use IPI in practice. - -We can already test is IPI would be needed for an INDEX operation -with r4k_op_needs_ipi(R4K_INDEX). If this is True then we mustn't try -the INDEX approach as we cannot use IPI. If this is False (e.g. when -there is only one core and hence one L1 cache) then it is safe to -use the INDEX approach without IPI. - -This patch avoids options 2 if r4k_op_needs_ipi(R4K_INDEX), and so -eliminates the corruption. - -Fixes: c00ab4896ed5 ("MIPS: Remove cpu_has_safe_index_cacheops") -Cc: stable@vger.kernel.org # v4.8+ -Signed-off-by: NeilBrown ---- - arch/mips/mm/c-r4k.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - ---- a/arch/mips/mm/c-r4k.c -+++ b/arch/mips/mm/c-r4k.c -@@ -851,9 +851,12 @@ static void r4k_dma_cache_wback_inv(unsi - /* - * Either no secondary cache or the available caches don't have the - * subset property so we have to flush the primary caches -- * explicitly -+ * explicitly. -+ * If we would need IPI to perform an INDEX-type operation, then -+ * we have to use the HIT-type alternative as IPI cannot be used -+ * here due to interrupts possibly being disabled. - */ -- if (size >= dcache_size) { -+ if (!r4k_op_needs_ipi(R4K_INDEX) && size >= dcache_size) { - r4k_blast_dcache(); - } else { - R4600_HIT_CACHEOP_WAR_IMPL; -@@ -890,7 +893,7 @@ static void r4k_dma_cache_inv(unsigned l - return; - } - -- if (size >= dcache_size) { -+ if (!r4k_op_needs_ipi(R4K_INDEX) && size >= dcache_size) { - r4k_blast_dcache(); - } else { - R4600_HIT_CACHEOP_WAR_IMPL; diff --git a/target/linux/generic/pending-4.14/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch b/target/linux/generic/pending-4.14/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch index b9bb3f71f1..c97e93250b 100644 --- a/target/linux/generic/pending-4.14/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch +++ b/target/linux/generic/pending-4.14/140-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch @@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau --- a/fs/jffs2/dir.c +++ b/fs/jffs2/dir.c -@@ -756,6 +756,24 @@ static int jffs2_mknod (struct inode *di +@@ -752,6 +752,24 @@ static int jffs2_mknod (struct inode *di return ret; } @@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry, struct inode *new_dir_i, struct dentry *new_dentry, unsigned int flags) -@@ -766,7 +784,7 @@ static int jffs2_rename (struct inode *o +@@ -762,7 +780,7 @@ static int jffs2_rename (struct inode *o uint8_t type; uint32_t now; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau return -EINVAL; /* The VFS will check for us and prevent trying to rename a -@@ -832,9 +850,14 @@ static int jffs2_rename (struct inode *o +@@ -828,9 +846,14 @@ static int jffs2_rename (struct inode *o if (d_is_dir(old_dentry) && !victim_f) inc_nlink(new_dir_i); diff --git a/target/linux/generic/pending-4.14/141-jffs2-add-RENAME_EXCHANGE-support.patch b/target/linux/generic/pending-4.14/141-jffs2-add-RENAME_EXCHANGE-support.patch index 4b30bc7cd0..093a73ab66 100644 --- a/target/linux/generic/pending-4.14/141-jffs2-add-RENAME_EXCHANGE-support.patch +++ b/target/linux/generic/pending-4.14/141-jffs2-add-RENAME_EXCHANGE-support.patch @@ -6,7 +6,7 @@ Signed-off-by: Felix Fietkau --- a/fs/jffs2/dir.c +++ b/fs/jffs2/dir.c -@@ -781,18 +781,31 @@ static int jffs2_rename (struct inode *o +@@ -777,18 +777,31 @@ static int jffs2_rename (struct inode *o int ret; struct jffs2_sb_info *c = JFFS2_SB_INFO(old_dir_i->i_sb); struct jffs2_inode_info *victim_f = NULL; @@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau victim_f = JFFS2_INODE_INFO(d_inode(new_dentry)); if (d_is_dir(new_dentry)) { struct jffs2_full_dirent *fd; -@@ -827,7 +840,7 @@ static int jffs2_rename (struct inode *o +@@ -823,7 +836,7 @@ static int jffs2_rename (struct inode *o if (ret) return ret; @@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau /* There was a victim. Kill it off nicely */ if (d_is_dir(new_dentry)) clear_nlink(d_inode(new_dentry)); -@@ -853,6 +866,12 @@ static int jffs2_rename (struct inode *o +@@ -849,6 +862,12 @@ static int jffs2_rename (struct inode *o if (flags & RENAME_WHITEOUT) /* Replace with whiteout */ ret = jffs2_whiteout(old_dir_i, old_dentry); @@ -62,7 +62,7 @@ Signed-off-by: Felix Fietkau else /* Unlink the original */ ret = jffs2_do_unlink(c, JFFS2_INODE_INFO(old_dir_i), -@@ -884,7 +903,7 @@ static int jffs2_rename (struct inode *o +@@ -880,7 +899,7 @@ static int jffs2_rename (struct inode *o return ret; } diff --git a/target/linux/generic/pending-4.14/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch b/target/linux/generic/pending-4.14/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch deleted file mode 100644 index d3362fdfe4..0000000000 --- a/target/linux/generic/pending-4.14/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch +++ /dev/null @@ -1,61 +0,0 @@ -From d4c4bc11353f3bea6754f7d21e3612c9f32d1d64 Mon Sep 17 00:00:00 2001 -From: Giuseppe Lippolis -Date: Mon, 26 Mar 2018 16:34:39 +0200 -Subject: [PATCH] net-usb: add qmi_wwan if on lte modem wistron neweb d18q1 - -This modem is embedded on dlink dwr-921 router. - The oem configuration states: - - T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 - D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 - P: Vendor=1435 ProdID=0918 Rev= 2.32 - S: Manufacturer=Android - S: Product=Android - S: SerialNumber=0123456789ABCDEF - C:* #Ifs= 7 Cfg#= 1 Atr=80 MxPwr=500mA - I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option - E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms - E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms - I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) - E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms - E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms - I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option - E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=32ms - E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms - E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms - I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan - E: Ad=86(I) Atr=03(Int.) MxPS= 64 Ivl=32ms - E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms - E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms - I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan - E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=32ms - E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms - E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms - I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan - E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=32ms - E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms - E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms - I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) - E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms - E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=125us - -Tested on openwrt distribution - -Signed-off-by: Giuseppe Lippolis -Signed-off-by: David S. Miller ---- - drivers/net/usb/qmi_wwan.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/drivers/net/usb/qmi_wwan.c -+++ b/drivers/net/usb/qmi_wwan.c -@@ -1105,6 +1105,9 @@ static const struct usb_device_id produc - {QMI_FIXED_INTF(0x0846, 0x68a2, 8)}, - {QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */ - {QMI_FIXED_INTF(0x12d1, 0x14ac, 1)}, /* Huawei E1820 */ -+ {QMI_FIXED_INTF(0x1435, 0xd181, 3)}, /* Wistron NeWeb D18Q1 */ -+ {QMI_FIXED_INTF(0x1435, 0xd181, 4)}, /* Wistron NeWeb D18Q1 */ -+ {QMI_FIXED_INTF(0x1435, 0xd181, 5)}, /* Wistron NeWeb D18Q1 */ - {QMI_FIXED_INTF(0x16d8, 0x6003, 0)}, /* CMOTech 6003 */ - {QMI_FIXED_INTF(0x16d8, 0x6007, 0)}, /* CMOTech CHE-628S */ - {QMI_FIXED_INTF(0x16d8, 0x6008, 0)}, /* CMOTech CMU-301 */ diff --git a/target/linux/generic/pending-4.14/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch b/target/linux/generic/pending-4.14/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch deleted file mode 100644 index 8ed0bde021..0000000000 --- a/target/linux/generic/pending-4.14/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 743989254ea9f132517806d8893ca9b6cf9dc86b Mon Sep 17 00:00:00 2001 -From: Pawel Dembicki -Date: Sat, 24 Mar 2018 22:08:14 +0100 -Subject: [PATCH] net: qmi_wwan: add BroadMobi BM806U 2020:2033 - -BroadMobi BM806U is an Qualcomm MDM9225 based 3G/4G modem. -Tested hardware BM806U is mounted on D-Link DWR-921-C3 router. -The USB id is added to qmi_wwan.c to allow QMI communication with -the BM806U. - -Tested on 4.14 kernel and OpenWRT. - -Signed-off-by: Pawel Dembicki -Signed-off-by: David S. Miller ---- - drivers/net/usb/qmi_wwan.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/net/usb/qmi_wwan.c -+++ b/drivers/net/usb/qmi_wwan.c -@@ -1184,6 +1184,7 @@ static const struct usb_device_id produc - {QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */ - {QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */ - {QMI_FIXED_INTF(0x2001, 0x7e35, 4)}, /* D-Link DWM-222 */ -+ {QMI_FIXED_INTF(0x2020, 0x2033, 4)}, /* BroadMobi BM806U */ - {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */ - {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */ - {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */ diff --git a/target/linux/generic/pending-4.14/201-extra_optimization.patch b/target/linux/generic/pending-4.14/201-extra_optimization.patch index 3c3353c7d1..445c0bd87d 100644 --- a/target/linux/generic/pending-4.14/201-extra_optimization.patch +++ b/target/linux/generic/pending-4.14/201-extra_optimization.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -650,12 +650,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni +@@ -645,12 +645,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS += $(call cc-option,-Oz,-Os) diff --git a/target/linux/generic/pending-4.14/630-packet_socket_type.patch b/target/linux/generic/pending-4.14/630-packet_socket_type.patch index 82e2c51afd..e1736214f5 100644 --- a/target/linux/generic/pending-4.14/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.14/630-packet_socket_type.patch @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net +@@ -3262,6 +3264,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3875,6 +3878,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock +@@ -3927,6 +3940,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 11f12bb6dd..09dfd1b906 100644 --- a/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -413,7 +413,7 @@ Signed-off-by: Steven Barth } static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[], -@@ -2060,6 +2271,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2064,6 +2275,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -426,7 +426,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2089,6 +2306,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2093,6 +2310,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(0) + /* IFLA_IPTUN_FWMARK */ nla_total_size(4) + @@ -451,7 +451,7 @@ Signed-off-by: Steven Barth 0; } -@@ -2096,6 +2331,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2100,6 +2335,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -461,7 +461,7 @@ Signed-off-by: Steven Barth if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || -@@ -2105,9 +2343,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2109,9 +2347,27 @@ static int ip6_tnl_fill_info(struct sk_b nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) || @@ -490,7 +490,7 @@ Signed-off-by: Steven Barth if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || -@@ -2147,6 +2403,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2151,6 +2407,7 @@ static const struct nla_policy ip6_tnl_p [IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG }, [IFLA_IPTUN_FWMARK] = { .type = NLA_U32 }, diff --git a/target/linux/generic/pending-4.14/811-pci_disable_usb_common_quirks.patch b/target/linux/generic/pending-4.14/811-pci_disable_usb_common_quirks.patch index 410a267597..6be2098ca8 100644 --- a/target/linux/generic/pending-4.14/811-pci_disable_usb_common_quirks.patch +++ b/target/linux/generic/pending-4.14/811-pci_disable_usb_common_quirks.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c -@@ -107,6 +107,8 @@ struct amd_chipset_type { +@@ -124,6 +124,8 @@ struct amd_chipset_type { u8 rev; }; @@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau static struct amd_chipset_info { struct pci_dev *nb_dev; struct pci_dev *smbus_dev; -@@ -511,6 +513,10 @@ void usb_amd_dev_put(void) +@@ -528,6 +530,10 @@ void usb_amd_dev_put(void) } EXPORT_SYMBOL_GPL(usb_amd_dev_put); @@ -28,9 +28,9 @@ Signed-off-by: Felix Fietkau +#if IS_ENABLED(CONFIG_USB_UHCI_HCD) + /* - * Make sure the controller is completely inactive, unable to - * generate interrupts or do DMA. -@@ -590,8 +596,17 @@ reset_needed: + * Check if port is disabled in BIOS on AMD Promontory host. + * BIOS Disabled ports may wake on connect/disconnect and need +@@ -699,8 +705,17 @@ reset_needed: uhci_reset_hc(pdev, base); return 1; } @@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask) { u16 cmd; -@@ -1178,3 +1193,4 @@ bool usb_xhci_needs_pci_reset(struct pci +@@ -1287,3 +1302,4 @@ bool usb_xhci_needs_pci_reset(struct pci return false; } EXPORT_SYMBOL_GPL(usb_xhci_needs_pci_reset); @@ -65,8 +65,8 @@ Signed-off-by: Felix Fietkau int usb_amd_find_chipset_info(void); int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev); bool usb_amd_hang_symptom_quirk(void); -@@ -19,12 +22,29 @@ void sb800_prefetch(struct device *dev, - bool usb_xhci_needs_pci_reset(struct pci_dev *pdev); +@@ -20,12 +23,29 @@ bool usb_xhci_needs_pci_reset(struct pci + bool usb_amd_pt_check_port(struct device *device, int port); #else struct pci_dev; +static inline int usb_amd_find_chipset_info(void) @@ -92,9 +92,9 @@ Signed-off-by: Felix Fietkau +{ + return false; +} - #endif /* CONFIG_USB_PCI */ - - #endif /* __LINUX_USB_PCI_QUIRKS_H */ + static inline bool usb_amd_pt_check_port(struct device *device, int port) + { + return false; --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -465,7 +465,14 @@ extern int usb_hcd_pci_probe(struct pci_ diff --git a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch index 608bad00cc..9ecefc9135 100644 --- a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -5114,6 +5127,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5120,6 +5133,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = tag; -@@ -6015,6 +6031,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -6021,6 +6037,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -6036,6 +6055,12 @@ static void ata_host_release(struct devi +@@ -6042,6 +6061,12 @@ static void ata_host_release(struct devi kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6482,7 +6507,23 @@ int ata_host_register(struct ata_host *h +@@ -6488,7 +6513,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/ipq40xx/patches-4.14/040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch b/target/linux/ipq40xx/patches-4.14/040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch index dca516e878..881d08c7e5 100644 --- a/target/linux/ipq40xx/patches-4.14/040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch +++ b/target/linux/ipq40xx/patches-4.14/040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch @@ -114,7 +114,7 @@ Signed-off-by: Vinod Koul struct list_head node; }; -@@ -539,7 +544,7 @@ static void bam_free_chan(struct dma_cha +@@ -540,7 +545,7 @@ static void bam_free_chan(struct dma_cha vchan_free_chan_resources(to_virt_chan(chan)); @@ -123,7 +123,7 @@ Signed-off-by: Vinod Koul dev_err(bchan->bdev->dev, "Cannot free busy channel\n"); goto err; } -@@ -632,8 +637,6 @@ static struct dma_async_tx_descriptor *b +@@ -633,8 +638,6 @@ static struct dma_async_tx_descriptor *b if (flags & DMA_PREP_INTERRUPT) async_desc->flags |= DESC_FLAG_EOT; @@ -132,7 +132,7 @@ Signed-off-by: Vinod Koul async_desc->num_desc = num_alloc; async_desc->curr_desc = async_desc->desc; -@@ -684,14 +687,16 @@ err_out: +@@ -685,14 +688,16 @@ err_out: static int bam_dma_terminate_all(struct dma_chan *chan) { struct bam_chan *bchan = to_bam_chan(chan); @@ -152,7 +152,7 @@ Signed-off-by: Vinod Koul } vchan_get_all_descriptors(&bchan->vc, &head); -@@ -763,9 +768,9 @@ static int bam_resume(struct dma_chan *c +@@ -764,9 +769,9 @@ static int bam_resume(struct dma_chan *c */ static u32 process_channel_irqs(struct bam_device *bdev) { @@ -164,7 +164,7 @@ Signed-off-by: Vinod Koul srcs = readl_relaxed(bam_addr(bdev, 0, BAM_IRQ_SRCS_EE)); -@@ -785,27 +790,40 @@ static u32 process_channel_irqs(struct b +@@ -786,27 +791,40 @@ static u32 process_channel_irqs(struct b writel_relaxed(pipe_stts, bam_addr(bdev, i, BAM_P_IRQ_CLR)); spin_lock_irqsave(&bchan->vc.lock, flags); @@ -214,7 +214,7 @@ Signed-off-by: Vinod Koul } spin_unlock_irqrestore(&bchan->vc.lock, flags); -@@ -867,6 +885,7 @@ static enum dma_status bam_tx_status(str +@@ -868,6 +886,7 @@ static enum dma_status bam_tx_status(str struct dma_tx_state *txstate) { struct bam_chan *bchan = to_bam_chan(chan); @@ -222,7 +222,7 @@ Signed-off-by: Vinod Koul struct virt_dma_desc *vd; int ret; size_t residue = 0; -@@ -882,11 +901,17 @@ static enum dma_status bam_tx_status(str +@@ -883,11 +902,17 @@ static enum dma_status bam_tx_status(str spin_lock_irqsave(&bchan->vc.lock, flags); vd = vchan_find_desc(&bchan->vc, cookie); @@ -244,7 +244,7 @@ Signed-off-by: Vinod Koul spin_unlock_irqrestore(&bchan->vc.lock, flags); -@@ -927,63 +952,86 @@ static void bam_start_dma(struct bam_cha +@@ -928,63 +953,86 @@ static void bam_start_dma(struct bam_cha { struct virt_dma_desc *vd = vchan_next_desc(&bchan->vc); struct bam_device *bdev = bchan->bdev; @@ -367,7 +367,7 @@ Signed-off-by: Vinod Koul /* ensure descriptor writes and dma start not reordered */ wmb(); -@@ -1012,7 +1060,7 @@ static void dma_tasklet(unsigned long da +@@ -1013,7 +1061,7 @@ static void dma_tasklet(unsigned long da bchan = &bdev->channels[i]; spin_lock_irqsave(&bchan->vc.lock, flags); @@ -376,7 +376,7 @@ Signed-off-by: Vinod Koul bam_start_dma(bchan); spin_unlock_irqrestore(&bchan->vc.lock, flags); } -@@ -1033,7 +1081,7 @@ static void bam_issue_pending(struct dma +@@ -1034,7 +1082,7 @@ static void bam_issue_pending(struct dma spin_lock_irqsave(&bchan->vc.lock, flags); /* if work pending and idle, start a transaction */ @@ -385,7 +385,7 @@ Signed-off-by: Vinod Koul bam_start_dma(bchan); spin_unlock_irqrestore(&bchan->vc.lock, flags); -@@ -1133,6 +1181,7 @@ static void bam_channel_init(struct bam_ +@@ -1138,6 +1186,7 @@ static void bam_channel_init(struct bam_ vchan_init(&bchan->vc, &bdev->common); bchan->vc.desc_free = bam_dma_free_desc; diff --git a/target/linux/ipq806x/patches-4.14/0001-dtbindings-qcom_adm-Fix-channel-specifiers.patch b/target/linux/ipq806x/patches-4.14/0001-dtbindings-qcom_adm-Fix-channel-specifiers.patch index da962c7130..83d7bbc6f4 100644 --- a/target/linux/ipq806x/patches-4.14/0001-dtbindings-qcom_adm-Fix-channel-specifiers.patch +++ b/target/linux/ipq806x/patches-4.14/0001-dtbindings-qcom_adm-Fix-channel-specifiers.patch @@ -33,22 +33,22 @@ Signed-off-by: Thomas Pedersen - clock-names: Must contain "core" for the core clock and "iface" for the interface clock. @@ -22,7 +21,7 @@ Example: - compatible = "qcom,adm"; - reg = <0x18300000 0x100000>; - interrupts = <0 170 0>; + compatible = "qcom,adm"; + reg = <0x18300000 0x100000>; + interrupts = <0 170 0>; - #dma-cells = <2>; + #dma-cells = <1>; - - clocks = <&gcc ADM0_CLK>, <&gcc ADM0_PBUS_CLK>; - clock-names = "core", "iface"; + + clocks = <&gcc ADM0_CLK>, <&gcc ADM0_PBUS_CLK>; + clock-names = "core", "iface"; @@ -35,15 +34,12 @@ Example: - qcom,ee = <0>; - }; - + qcom,ee = <0>; + }; + -DMA clients must use the format descripted in the dma.txt file, using a three +DMA clients must use the format descripted in the dma.txt file, using a two cell specifier for each channel. - + -Each dmas request consists of 3 cells: +Each dmas request consists of two cells: 1. phandle pointing to the DMA controller @@ -56,16 +56,16 @@ Signed-off-by: Thomas Pedersen - 3. CRCI assignment, if applicable. If no CRCI flow control is required, use 0. - The CRCI is used for flow control. It identifies the peripheral device that - is the source/destination for the transferred data. - + Example: - + @@ -55,7 +51,7 @@ Example: - - cs-gpios = <&qcom_pinmux 20 0>; - + + cs-gpios = <&qcom_pinmux 20 0>; + - dmas = <&adm_dma 6 9>, - <&adm_dma 5 10>; + dmas = <&adm_dma 6>, + <&adm_dma 5>; - dma-names = "rx", "tx"; - }; + dma-names = "rx", "tx"; + }; diff --git a/target/linux/ipq806x/patches-4.14/0002-dmaengine-Add-ADM-driver.patch b/target/linux/ipq806x/patches-4.14/0002-dmaengine-Add-ADM-driver.patch index 3381ae1911..fedb8ed798 100644 --- a/target/linux/ipq806x/patches-4.14/0002-dmaengine-Add-ADM-driver.patch +++ b/target/linux/ipq806x/patches-4.14/0002-dmaengine-Add-ADM-driver.patch @@ -27,9 +27,9 @@ Signed-off-by: Thomas Pedersen --- a/drivers/dma/qcom/Kconfig +++ b/drivers/dma/qcom/Kconfig @@ -27,3 +27,13 @@ config QCOM_HIDMA - (user to kernel, kernel to kernel, etc.). It only supports - memcpy interface. The core is not intended for general - purpose slave DMA. + (user to kernel, kernel to kernel, etc.). It only supports + memcpy interface. The core is not intended for general + purpose slave DMA. + +config QCOM_ADM + tristate "Qualcomm ADM support" diff --git a/target/linux/ipq806x/patches-4.14/0030-clk-Disable-i2c-device-on-gsbi4.patch b/target/linux/ipq806x/patches-4.14/0030-clk-Disable-i2c-device-on-gsbi4.patch index 52b60e1341..b2a6afe0dd 100644 --- a/target/linux/ipq806x/patches-4.14/0030-clk-Disable-i2c-device-on-gsbi4.patch +++ b/target/linux/ipq806x/patches-4.14/0030-clk-Disable-i2c-device-on-gsbi4.patch @@ -13,28 +13,28 @@ Signed-off-by: John Crispin --- a/drivers/clk/qcom/gcc-ipq806x.c +++ b/drivers/clk/qcom/gcc-ipq806x.c @@ -294,7 +294,7 @@ static struct clk_rcg gsbi1_uart_src = { - .parent_names = gcc_pxo_pll8, - .num_parents = 2, - .ops = &clk_rcg_ops, + .parent_names = gcc_pxo_pll8, + .num_parents = 2, + .ops = &clk_rcg_ops, - .flags = CLK_SET_PARENT_GATE, + .flags = CLK_SET_PARENT_GATE | CLK_IGNORE_UNUSED, - }, - }, + }, + }, }; @@ -312,7 +312,7 @@ static struct clk_branch gsbi1_uart_clk - }, - .num_parents = 1, - .ops = &clk_branch_ops, + }, + .num_parents = 1, + .ops = &clk_branch_ops, - .flags = CLK_SET_RATE_PARENT, + .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, - }, - }, + }, + }, }; @@ -890,6 +890,7 @@ static struct clk_branch gsbi1_h_clk = { - .hw.init = &(struct clk_init_data){ - .name = "gsbi1_h_clk", - .ops = &clk_branch_ops, + .hw.init = &(struct clk_init_data){ + .name = "gsbi1_h_clk", + .ops = &clk_branch_ops, + .flags = CLK_IGNORE_UNUSED, - }, - }, + }, + }, }; diff --git a/target/linux/ipq806x/patches-4.14/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch b/target/linux/ipq806x/patches-4.14/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch index a80326906d..a7cfac5447 100644 --- a/target/linux/ipq806x/patches-4.14/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch +++ b/target/linux/ipq806x/patches-4.14/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch @@ -19,9 +19,9 @@ Signed-off-by: Ram Chandra Jangir --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -194,6 +194,13 @@ config MTD_MYLOADER_PARTS - You will still need the parsing functions to be called by the driver - for your particular device. It won't happen automatically. - + You will still need the parsing functions to be called by the driver + for your particular device. It won't happen automatically. + +config MTD_QCOM_SMEM_PARTS + tristate "QCOM SMEM partitioning support" + depends on QCOM_SMEM @@ -30,7 +30,7 @@ Signed-off-by: Ram Chandra Jangir + such as IPQ806x. + comment "User Modules And Translation Layers" - + # --- /dev/null +++ b/drivers/mtd/qcom_smem_part.c @@ -278,5 +278,5 @@ Signed-off-by: Ram Chandra Jangir obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o +obj-$(CONFIG_MTD_QCOM_SMEM_PARTS) += qcom_smem_part.o obj-y += parsers/ - + # 'Users' - code which presents functionality to userspace. diff --git a/target/linux/ipq806x/patches-4.14/0032-phy-add-qcom-dwc3-phy.patch b/target/linux/ipq806x/patches-4.14/0032-phy-add-qcom-dwc3-phy.patch index f392a71abb..e430329acd 100644 --- a/target/linux/ipq806x/patches-4.14/0032-phy-add-qcom-dwc3-phy.patch +++ b/target/linux/ipq806x/patches-4.14/0032-phy-add-qcom-dwc3-phy.patch @@ -13,10 +13,10 @@ Signed-off-by: Andy Gross --- a/drivers/phy/qualcomm/Kconfig +++ b/drivers/phy/qualcomm/Kconfig -@@ -56,3 +56,15 @@ - select GENERIC_PHY - help - Support for the USB HSIC ULPI compliant PHY on QCOM chipsets. +@@ -56,3 +56,15 @@ config PHY_QCOM_USB_HSIC + select GENERIC_PHY + help + Support for the USB HSIC ULPI compliant PHY on QCOM chipsets. + +config PHY_QCOM_DWC3 + tristate "QCOM DWC3 USB PHY support" @@ -31,7 +31,7 @@ Signed-off-by: Andy Gross + --- a/drivers/phy/qualcomm/Makefile +++ b/drivers/phy/qualcomm/Makefile -@@ -8,3 +8,4 @@ +@@ -8,3 +8,4 @@ obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom- obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom-ufs-qmp-20nm.o obj-$(CONFIG_PHY_QCOM_USB_HS) += phy-qcom-usb-hs.o obj-$(CONFIG_PHY_QCOM_USB_HSIC) += phy-qcom-usb-hsic.o diff --git a/target/linux/ipq806x/patches-4.14/0033-ARM-qcom-automatically-select-PCI_DOMAINS-if-PCI-is-.patch b/target/linux/ipq806x/patches-4.14/0033-ARM-qcom-automatically-select-PCI_DOMAINS-if-PCI-is-.patch index 1948152b14..a6c7953aaa 100644 --- a/target/linux/ipq806x/patches-4.14/0033-ARM-qcom-automatically-select-PCI_DOMAINS-if-PCI-is-.patch +++ b/target/linux/ipq806x/patches-4.14/0033-ARM-qcom-automatically-select-PCI_DOMAINS-if-PCI-is-.patch @@ -20,9 +20,10 @@ Signed-off-by: Mathieu Olivari --- a/arch/arm/mach-qcom/Kconfig +++ b/arch/arm/mach-qcom/Kconfig @@ -6,6 +6,7 @@ menuconfig ARCH_QCOM - select ARM_AMBA - select PINCTRL - select QCOM_SCM if SMP + select ARM_AMBA + select PINCTRL + select QCOM_SCM if SMP + select PCI_DOMAINS if PCI - help - Support for Qualcomm's devicetree based systems. + help + Support for Qualcomm's devicetree based systems. + diff --git a/target/linux/ipq806x/patches-4.14/0034-ARM-Add-Krait-L2-register-accessor-functions.patch b/target/linux/ipq806x/patches-4.14/0034-ARM-Add-Krait-L2-register-accessor-functions.patch index 3f820fa4f6..5380f2c7f9 100644 --- a/target/linux/ipq806x/patches-4.14/0034-ARM-Add-Krait-L2-register-accessor-functions.patch +++ b/target/linux/ipq806x/patches-4.14/0034-ARM-Add-Krait-L2-register-accessor-functions.patch @@ -42,19 +42,19 @@ Signed-off-by: Stephen Boyd --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig @@ -7,6 +7,9 @@ config DMABOUNCE - bool - select ZONE_DMA - + bool + select ZONE_DMA + +config KRAIT_L2_ACCESSORS + bool + config SHARP_LOCOMO - bool - + bool + --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile @@ -7,6 +7,7 @@ obj-y += firmware.o - + obj-$(CONFIG_SA1111) += sa1111.o obj-$(CONFIG_DMABOUNCE) += dmabounce.o +obj-$(CONFIG_KRAIT_L2_ACCESSORS) += krait-l2-accessors.o diff --git a/target/linux/ipq806x/patches-4.14/0035-clk-mux-Split-out-register-accessors-for-reuse.patch b/target/linux/ipq806x/patches-4.14/0035-clk-mux-Split-out-register-accessors-for-reuse.patch index 43b25a3c51..0d919ee668 100644 --- a/target/linux/ipq806x/patches-4.14/0035-clk-mux-Split-out-register-accessors-for-reuse.patch +++ b/target/linux/ipq806x/patches-4.14/0035-clk-mux-Split-out-register-accessors-for-reuse.patch @@ -34,13 +34,13 @@ Signed-off-by: Stephen Boyd @@ -26,35 +26,24 @@ * parent - parent is adjustable through clk_set_parent */ - + -static u8 clk_mux_get_parent(struct clk_hw *hw) +unsigned int clk_mux_get_parent(struct clk_hw *hw, unsigned int val, + unsigned int *table, unsigned long flags) { - struct clk_mux *mux = to_clk_mux(hw); - int num_parents = clk_hw_get_num_parents(hw); + int num_parents = clk_hw_get_num_parents(hw); - u32 val; - - /* @@ -52,40 +52,40 @@ Signed-off-by: Stephen Boyd - */ - val = clk_readl(mux->reg) >> mux->shift; - val &= mux->mask; - + - if (mux->table) { + if (table) { - int i; - - for (i = 0; i < num_parents; i++) + int i; + + for (i = 0; i < num_parents; i++) - if (mux->table[i] == val) + if (table[i] == val) - return i; - return -EINVAL; - } - + return i; + return -EINVAL; + } + - if (val && (mux->flags & CLK_MUX_INDEX_BIT)) + if (val && (flags & CLK_MUX_INDEX_BIT)) - val = ffs(val) - 1; - + val = ffs(val) - 1; + - if (val && (mux->flags & CLK_MUX_INDEX_ONE)) + if (val && (flags & CLK_MUX_INDEX_ONE)) - val--; - - if (val >= num_parents) + val--; + + if (val >= num_parents) @@ -62,23 +51,53 @@ static u8 clk_mux_get_parent(struct clk_ - - return val; + + return val; } +EXPORT_SYMBOL_GPL(clk_mux_get_parent); - + -static int clk_mux_set_parent(struct clk_hw *hw, u8 index) +static u8 _clk_mux_get_parent(struct clk_hw *hw) { - struct clk_mux *mux = to_clk_mux(hw); - u32 val; + struct clk_mux *mux = to_clk_mux(hw); + u32 val; - unsigned long flags = 0; - + - if (mux->table) { - index = mux->table[index]; + /* @@ -108,18 +108,18 @@ Signed-off-by: Stephen Boyd + + if (table) { + val = table[val]; - } else { + } else { - if (mux->flags & CLK_MUX_INDEX_BIT) - index = 1 << index; + if (flags & CLK_MUX_INDEX_BIT) + val = 1 << index; - + - if (mux->flags & CLK_MUX_INDEX_ONE) - index++; + if (flags & CLK_MUX_INDEX_ONE) + val++; - } - + } + + return val; +} +EXPORT_SYMBOL_GPL(clk_mux_reindex); @@ -132,64 +132,64 @@ Signed-off-by: Stephen Boyd + + index = clk_mux_reindex(index, mux->table, mux->flags); + - if (mux->lock) - spin_lock_irqsave(mux->lock, flags); - else + if (mux->lock) + spin_lock_irqsave(mux->lock, flags); + else @@ -102,14 +121,14 @@ static int clk_mux_set_parent(struct clk } - + const struct clk_ops clk_mux_ops = { - .get_parent = clk_mux_get_parent, + .get_parent = _clk_mux_get_parent, - .set_parent = clk_mux_set_parent, - .determine_rate = __clk_mux_determine_rate, + .set_parent = clk_mux_set_parent, + .determine_rate = __clk_mux_determine_rate, }; EXPORT_SYMBOL_GPL(clk_mux_ops); - + const struct clk_ops clk_mux_ro_ops = { - .get_parent = clk_mux_get_parent, + .get_parent = _clk_mux_get_parent, }; EXPORT_SYMBOL_GPL(clk_mux_ro_ops); - + @@ -117,7 +136,7 @@ struct clk_hw *clk_hw_register_mux_table - const char * const *parent_names, u8 num_parents, - unsigned long flags, - void __iomem *reg, u8 shift, u32 mask, + const char * const *parent_names, u8 num_parents, + unsigned long flags, + void __iomem *reg, u8 shift, u32 mask, - u8 clk_mux_flags, u32 *table, spinlock_t *lock) + u8 clk_mux_flags, unsigned int *table, spinlock_t *lock) { - struct clk_mux *mux; - struct clk_hw *hw; + struct clk_mux *mux; + struct clk_hw *hw; --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -468,7 +468,7 @@ void clk_hw_unregister_divider(struct cl struct clk_mux { - struct clk_hw hw; - void __iomem *reg; + struct clk_hw hw; + void __iomem *reg; - u32 *table; + unsigned int *table; - u32 mask; - u8 shift; - u8 flags; + u32 mask; + u8 shift; + u8 flags; @@ -486,6 +486,11 @@ struct clk_mux { extern const struct clk_ops clk_mux_ops; extern const struct clk_ops clk_mux_ro_ops; - + +unsigned int clk_mux_get_parent(struct clk_hw *hw, unsigned int val, + unsigned int *table, unsigned long flags); +unsigned int clk_mux_reindex(u8 index, unsigned int *table, + unsigned long flags); + struct clk *clk_register_mux(struct device *dev, const char *name, - const char * const *parent_names, u8 num_parents, - unsigned long flags, + const char * const *parent_names, u8 num_parents, + unsigned long flags, @@ -506,7 +511,7 @@ struct clk_hw *clk_hw_register_mux_table - const char * const *parent_names, u8 num_parents, - unsigned long flags, - void __iomem *reg, u8 shift, u32 mask, + const char * const *parent_names, u8 num_parents, + unsigned long flags, + void __iomem *reg, u8 shift, u32 mask, - u8 clk_mux_flags, u32 *table, spinlock_t *lock); + u8 clk_mux_flags, unsigned int *table, spinlock_t *lock); - + void clk_unregister_mux(struct clk *clk); void clk_hw_unregister_mux(struct clk_hw *hw); diff --git a/target/linux/ipq806x/patches-4.14/0038-clk-qcom-Add-support-for-High-Frequency-PLLs-HFPLLs.patch b/target/linux/ipq806x/patches-4.14/0038-clk-qcom-Add-support-for-High-Frequency-PLLs-HFPLLs.patch index f09197caa8..45314e70d5 100644 --- a/target/linux/ipq806x/patches-4.14/0038-clk-qcom-Add-support-for-High-Frequency-PLLs-HFPLLs.patch +++ b/target/linux/ipq806x/patches-4.14/0038-clk-qcom-Add-support-for-High-Frequency-PLLs-HFPLLs.patch @@ -36,7 +36,7 @@ Signed-off-by: Stephen Boyd +clk-qcom-y += clk-hfpll.o clk-qcom-y += reset.o clk-qcom-$(CONFIG_QCOM_GDSC) += gdsc.o - + --- /dev/null +++ b/drivers/clk/qcom/clk-hfpll.c @@ -0,0 +1,253 @@ diff --git a/target/linux/ipq806x/patches-4.14/0039-clk-qcom-Add-HFPLL-driver.patch b/target/linux/ipq806x/patches-4.14/0039-clk-qcom-Add-HFPLL-driver.patch index 8f5024074d..884d564ae7 100644 --- a/target/linux/ipq806x/patches-4.14/0039-clk-qcom-Add-HFPLL-driver.patch +++ b/target/linux/ipq806x/patches-4.14/0039-clk-qcom-Add-HFPLL-driver.patch @@ -77,9 +77,9 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -196,3 +196,11 @@ config MSM_MMCC_8996 - Support for the multimedia clock controller on msm8996 devices. - Say Y if you want to support multimedia devices such as display, - graphics, video encode/decode, camera, etc. + Support for the multimedia clock controller on msm8996 devices. + Say Y if you want to support multimedia devices such as display, + graphics, video encode/decode, camera, etc. + +config QCOM_HFPLL + tristate "High-Frequency PLL (HFPLL) Clock Controller" diff --git a/target/linux/ipq806x/patches-4.14/0040-clk-qcom-Add-IPQ806X-s-HFPLLs.patch b/target/linux/ipq806x/patches-4.14/0040-clk-qcom-Add-IPQ806X-s-HFPLLs.patch index f17e96d0c1..c3af0fa55c 100644 --- a/target/linux/ipq806x/patches-4.14/0040-clk-qcom-Add-IPQ806X-s-HFPLLs.patch +++ b/target/linux/ipq806x/patches-4.14/0040-clk-qcom-Add-IPQ806X-s-HFPLLs.patch @@ -30,12 +30,12 @@ Signed-off-by: Stephen Boyd #include "clk-branch.h" +#include "clk-hfpll.h" #include "reset.h" - + static struct clk_pll pll0 = { @@ -113,6 +114,84 @@ static struct clk_regmap pll8_vote = { - }, + }, }; - + +static struct hfpll_data hfpll0_data = { + .mode_reg = 0x3200, + .l_reg = 0x3208, @@ -115,15 +115,15 @@ Signed-off-by: Stephen Boyd +}; + static struct clk_pll pll14 = { - .l_reg = 0x31c4, - .m_reg = 0x31c8, + .l_reg = 0x31c4, + .m_reg = 0x31c8, @@ -2801,6 +2880,9 @@ static struct clk_regmap *gcc_ipq806x_cl - [UBI32_CORE2_CLK_SRC] = &ubi32_core2_src_clk.clkr, - [NSSTCM_CLK_SRC] = &nss_tcm_src.clkr, - [NSSTCM_CLK] = &nss_tcm_clk.clkr, + [UBI32_CORE2_CLK_SRC] = &ubi32_core2_src_clk.clkr, + [NSSTCM_CLK_SRC] = &nss_tcm_src.clkr, + [NSSTCM_CLK] = &nss_tcm_clk.clkr, + [PLL9] = &hfpll0.clkr, + [PLL10] = &hfpll1.clkr, + [PLL12] = &hfpll_l2.clkr, }; - + static const struct qcom_reset_map gcc_ipq806x_resets[] = { diff --git a/target/linux/ipq806x/patches-4.14/0041-clk-qcom-Add-support-for-Krait-clocks.patch b/target/linux/ipq806x/patches-4.14/0041-clk-qcom-Add-support-for-Krait-clocks.patch index 2a55dde68a..5896ab3a26 100644 --- a/target/linux/ipq806x/patches-4.14/0041-clk-qcom-Add-support-for-Krait-clocks.patch +++ b/target/linux/ipq806x/patches-4.14/0041-clk-qcom-Add-support-for-Krait-clocks.patch @@ -34,9 +34,9 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -204,3 +204,7 @@ config QCOM_HFPLL - Support for the high-frequency PLLs present on Qualcomm devices. - Say Y if you want to support CPU frequency scaling on devices - such as MSM8974, APQ8084, etc. + Support for the high-frequency PLLs present on Qualcomm devices. + Say Y if you want to support CPU frequency scaling on devices + such as MSM8974, APQ8084, etc. + +config KRAIT_CLOCKS + bool diff --git a/target/linux/ipq806x/patches-4.14/0042-clk-qcom-Add-KPSS-ACC-GCC-driver.patch b/target/linux/ipq806x/patches-4.14/0042-clk-qcom-Add-KPSS-ACC-GCC-driver.patch index 8846dba1a3..93c86ebb69 100644 --- a/target/linux/ipq806x/patches-4.14/0042-clk-qcom-Add-KPSS-ACC-GCC-driver.patch +++ b/target/linux/ipq806x/patches-4.14/0042-clk-qcom-Add-KPSS-ACC-GCC-driver.patch @@ -35,9 +35,9 @@ Signed-off-by: Stephen Boyd --- a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt +++ b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt @@ -21,10 +21,17 @@ PROPERTIES - the register region. An optional second element specifies - the base address and size of the alias register region. - + the register region. An optional second element specifies + the base address and size of the alias register region. + +- clock-output-names: + Usage: optional + Value type: @@ -45,13 +45,13 @@ Signed-off-by: Stephen Boyd + CPU number starting at 0. + Example: - - clock-controller@2088000 { - compatible = "qcom,kpss-acc-v2"; - reg = <0x02088000 0x1000>, - <0x02008000 0x1000>; + + clock-controller@2088000 { + compatible = "qcom,kpss-acc-v2"; + reg = <0x02088000 0x1000>, + <0x02008000 0x1000>; + clock-output-names = "acpu0_aux"; - }; + }; --- /dev/null +++ b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt @@ -0,0 +1,28 @@ @@ -86,9 +86,9 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -205,6 +205,14 @@ config QCOM_HFPLL - Say Y if you want to support CPU frequency scaling on devices - such as MSM8974, APQ8084, etc. - + Say Y if you want to support CPU frequency scaling on devices + such as MSM8974, APQ8084, etc. + +config KPSS_XCC + tristate "KPSS Clock Controller" + depends on COMMON_CLK_QCOM @@ -98,8 +98,8 @@ Signed-off-by: Stephen Boyd + as MSM8960, APQ8064, etc. + config KRAIT_CLOCKS - bool - select KRAIT_L2_ACCESSORS + bool + select KRAIT_L2_ACCESSORS --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -36,4 +36,5 @@ obj-$(CONFIG_MSM_MMCC_8974) += mmcc-msm8 diff --git a/target/linux/ipq806x/patches-4.14/0043-clk-qcom-Add-Krait-clock-controller-driver.patch b/target/linux/ipq806x/patches-4.14/0043-clk-qcom-Add-Krait-clock-controller-driver.patch index 00bdcec456..dcc10ec79c 100644 --- a/target/linux/ipq806x/patches-4.14/0043-clk-qcom-Add-Krait-clock-controller-driver.patch +++ b/target/linux/ipq806x/patches-4.14/0043-clk-qcom-Add-Krait-clock-controller-driver.patch @@ -60,9 +60,9 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -213,6 +213,14 @@ config KPSS_XCC - if you want to support CPU frequency scaling on devices such - as MSM8960, APQ8064, etc. - + if you want to support CPU frequency scaling on devices such + as MSM8960, APQ8064, etc. + +config KRAITCC + tristate "Krait Clock Controller" + depends on COMMON_CLK_QCOM && ARM @@ -72,8 +72,8 @@ Signed-off-by: Stephen Boyd + Say Y if you want to support CPU frequency scaling. + config KRAIT_CLOCKS - bool - select KRAIT_L2_ACCESSORS + bool + select KRAIT_L2_ACCESSORS --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -38,3 +38,4 @@ obj-$(CONFIG_QCOM_CLK_RPM) += clk-rpm.o diff --git a/target/linux/ipq806x/patches-4.14/0044-clk-Add-safe-switch-hook.patch b/target/linux/ipq806x/patches-4.14/0044-clk-Add-safe-switch-hook.patch index b2468a9609..d0eddc64c2 100644 --- a/target/linux/ipq806x/patches-4.14/0044-clk-Add-safe-switch-hook.patch +++ b/target/linux/ipq806x/patches-4.14/0044-clk-Add-safe-switch-hook.patch @@ -31,32 +31,32 @@ Signed-off-by: Sricharan R --- a/drivers/clk/qcom/clk-krait.c +++ b/drivers/clk/qcom/clk-krait.c @@ -60,6 +60,8 @@ static int krait_mux_set_parent(struct c - if (__clk_is_enabled(hw->clk)) - __krait_mux_set_sel(mux, sel); - + if (__clk_is_enabled(hw->clk)) + __krait_mux_set_sel(mux, sel); + + mux->reparent = true; + - return 0; + return 0; } - + --- a/drivers/clk/qcom/clk-krait.h +++ b/drivers/clk/qcom/clk-krait.h @@ -23,6 +23,9 @@ struct krait_mux_clk { - u32 shift; - u32 en_mask; - bool lpl; + u32 shift; + u32 en_mask; + bool lpl; + u8 safe_sel; + u8 old_index; + bool reparent; - - struct clk_hw hw; - struct notifier_block clk_nb; + + struct clk_hw hw; + struct notifier_block clk_nb; --- a/drivers/clk/qcom/krait-cc.c +++ b/drivers/clk/qcom/krait-cc.c @@ -35,6 +35,49 @@ static unsigned int pri_mux_map[] = { - 0, + 0, }; - + +/* + * Notifier function for switching the muxes to safe parent + * while the hfpll is getting reprogrammed. @@ -105,56 +105,56 @@ Signed-off-by: Sricharan R { @@ -79,6 +122,7 @@ static int krait_add_sec_mux(struct device *dev, int id, const char *s, - unsigned int offset, bool unique_aux) + unsigned int offset, bool unique_aux) { + int ret; - struct krait_mux_clk *mux; - static const char *sec_mux_list[] = { - "acpu_aux", + struct krait_mux_clk *mux; + static const char *sec_mux_list[] = { + "acpu_aux", @@ -102,6 +146,7 @@ krait_add_sec_mux(struct device *dev, in - mux->shift = 2; - mux->parent_map = sec_mux_map; - mux->hw.init = &init; + mux->shift = 2; + mux->parent_map = sec_mux_map; + mux->hw.init = &init; + mux->safe_sel = 0; - - init.name = kasprintf(GFP_KERNEL, "krait%s_sec_mux", s); - if (!init.name) + + init.name = kasprintf(GFP_KERNEL, "krait%s_sec_mux", s); + if (!init.name) @@ -117,6 +162,11 @@ krait_add_sec_mux(struct device *dev, in - - clk = devm_clk_register(dev, &mux->hw); - + + clk = devm_clk_register(dev, &mux->hw); + + ret = krait_notifier_register(dev, clk, mux); + if (ret) + goto unique_aux; + +unique_aux: - if (unique_aux) - kfree(sec_mux_list[0]); + if (unique_aux) + kfree(sec_mux_list[0]); err_aux: @@ -128,6 +178,7 @@ static struct clk * krait_add_pri_mux(struct device *dev, int id, const char *s, - unsigned int offset) + unsigned int offset) { + int ret; - struct krait_mux_clk *mux; - const char *p_names[3]; - struct clk_init_data init = { + struct krait_mux_clk *mux; + const char *p_names[3]; + struct clk_init_data init = { @@ -148,6 +199,7 @@ krait_add_pri_mux(struct device *dev, in - mux->lpl = id >= 0; - mux->parent_map = pri_mux_map; - mux->hw.init = &init; + mux->lpl = id >= 0; + mux->parent_map = pri_mux_map; + mux->hw.init = &init; + mux->safe_sel = 2; - - init.name = kasprintf(GFP_KERNEL, "krait%s_pri_mux", s); - if (!init.name) + + init.name = kasprintf(GFP_KERNEL, "krait%s_pri_mux", s); + if (!init.name) @@ -173,6 +225,10 @@ krait_add_pri_mux(struct device *dev, in - - clk = devm_clk_register(dev, &mux->hw); - + + clk = devm_clk_register(dev, &mux->hw); + + ret = krait_notifier_register(dev, clk, mux); + if (ret) + goto err_p3; +err_p3: - kfree(p_names[2]); + kfree(p_names[2]); err_p2: - kfree(p_names[1]); + kfree(p_names[1]); diff --git a/target/linux/ipq806x/patches-4.14/0045-cpufreq-Add-module-to-register-cpufreq-on-Krait-CPUs.patch b/target/linux/ipq806x/patches-4.14/0045-cpufreq-Add-module-to-register-cpufreq-on-Krait-CPUs.patch index b894173d5e..86cb4b9a3e 100644 --- a/target/linux/ipq806x/patches-4.14/0045-cpufreq-Add-module-to-register-cpufreq-on-Krait-CPUs.patch +++ b/target/linux/ipq806x/patches-4.14/0045-cpufreq-Add-module-to-register-cpufreq-on-Krait-CPUs.patch @@ -73,9 +73,9 @@ Signed-off-by: Stephen Boyd --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -100,6 +100,15 @@ config ARM_OMAP2PLUS_CPUFREQ - depends on ARCH_OMAP2PLUS - default ARCH_OMAP2PLUS - + depends on ARCH_OMAP2PLUS + default ARCH_OMAP2PLUS + +config ARM_QCOM_CPUFREQ + tristate "Qualcomm based" + depends on ARCH_QCOM @@ -86,11 +86,11 @@ Signed-off-by: Stephen Boyd + If in doubt, say N. + config ARM_S3C_CPUFREQ - bool - help + bool + help --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile -@@ -62,6 +62,7 @@ obj-$(CONFIG_ARM_MT8173_CPUFREQ) += mt81 +@@ -62,6 +62,7 @@ obj-$(CONFIG_ARM_MEDIATEK_CPUFREQ) += me obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) += omap-cpufreq.o obj-$(CONFIG_ARM_PXA2xx_CPUFREQ) += pxa2xx-cpufreq.o obj-$(CONFIG_PXA3xx) += pxa3xx-cpufreq.o diff --git a/target/linux/ipq806x/patches-4.14/0046-cpufreq-qcom-independent-core-clocks.patch b/target/linux/ipq806x/patches-4.14/0046-cpufreq-qcom-independent-core-clocks.patch index d7211e1559..1d2fbf9db5 100644 --- a/target/linux/ipq806x/patches-4.14/0046-cpufreq-qcom-independent-core-clocks.patch +++ b/target/linux/ipq806x/patches-4.14/0046-cpufreq-qcom-independent-core-clocks.patch @@ -29,31 +29,31 @@ Signed-off-by: Sricharan R --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -220,7 +220,10 @@ static int cpufreq_init(struct cpufreq_p - } - - if (fallback) { + } + + if (fallback) { - cpumask_setall(policy->cpus); + struct cpufreq_dt_platform_data *pd = cpufreq_get_driver_data(); + + if (!pd || !pd->independent_clocks) + cpumask_setall(policy->cpus); - - /* - * OPP tables are initialized only for policy->cpu, do it for + + /* + * OPP tables are initialized only for policy->cpu, do it for @@ -372,6 +375,8 @@ static int dt_cpufreq_probe(struct platf - if (data && data->have_governor_per_policy) - dt_cpufreq_driver.flags |= CPUFREQ_HAVE_GOVERNOR_PER_POLICY; - + if (data && data->have_governor_per_policy) + dt_cpufreq_driver.flags |= CPUFREQ_HAVE_GOVERNOR_PER_POLICY; + + dt_cpufreq_driver.driver_data = data; + - ret = cpufreq_register_driver(&dt_cpufreq_driver); - if (ret) - dev_err(&pdev->dev, "failed register driver: %d\n", ret); + ret = cpufreq_register_driver(&dt_cpufreq_driver); + if (ret) + dev_err(&pdev->dev, "failed register driver: %d\n", ret); --- a/drivers/cpufreq/cpufreq-dt.h +++ b/drivers/cpufreq/cpufreq-dt.h @@ -13,6 +13,12 @@ #include - + struct cpufreq_dt_platform_data { + /* + * True when each CPU has its own clock to control its @@ -61,5 +61,6 @@ Signed-off-by: Sricharan R + * clock. + */ + bool independent_clocks; - bool have_governor_per_policy; + bool have_governor_per_policy; }; + diff --git a/target/linux/ipq806x/patches-4.14/0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch b/target/linux/ipq806x/patches-4.14/0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch index 4c271d71fa..fe98980766 100644 --- a/target/linux/ipq806x/patches-4.14/0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch +++ b/target/linux/ipq806x/patches-4.14/0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch @@ -28,38 +28,38 @@ Signed-off-by: Archit Taneja --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -481,7 +481,11 @@ static int nand_default_block_markbad(st - } else { - ops.len = ops.ooblen = 1; - } + } else { + ops.len = ops.ooblen = 1; + } - ops.mode = MTD_OPS_PLACE_OOB; + + if (unlikely(chip->bbt_options & NAND_BBT_ACCESS_BBM_RAW)) + ops.mode = MTD_OPS_RAW; + else + ops.mode = MTD_OPS_PLACE_OOB; - - /* Write to first/last page(s) if necessary */ - if (chip->bbt_options & NAND_BBT_SCANLASTPAGE) + + /* Write to first/last page(s) if necessary */ + if (chip->bbt_options & NAND_BBT_SCANLASTPAGE) --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -420,7 +420,11 @@ static int scan_block_fast(struct mtd_in - ops.oobbuf = buf; - ops.ooboffs = 0; - ops.datbuf = NULL; + ops.oobbuf = buf; + ops.ooboffs = 0; + ops.datbuf = NULL; - ops.mode = MTD_OPS_PLACE_OOB; + + if (unlikely(bd->options & NAND_BBT_ACCESS_BBM_RAW)) + ops.mode = MTD_OPS_RAW; + else + ops.mode = MTD_OPS_PLACE_OOB; - - for (j = 0; j < numpages; j++) { - /* + + for (j = 0; j < numpages; j++) { + /* --- a/include/linux/mtd/bbm.h +++ b/include/linux/mtd/bbm.h @@ -116,6 +116,12 @@ struct nand_bbt_descr { #define NAND_BBT_NO_OOB_BBM 0x00080000 - + /* + * Force MTD_OPS_RAW mode when trying to access bad block markes from OOB. To + * be used by controllers which can access BBM only when ECC is disabled, i.e, diff --git a/target/linux/ipq806x/patches-4.14/0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch b/target/linux/ipq806x/patches-4.14/0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch index be39ad2373..4cbb4422ca 100644 --- a/target/linux/ipq806x/patches-4.14/0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch +++ b/target/linux/ipq806x/patches-4.14/0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch @@ -10,17 +10,17 @@ Signed-off-by: Georgi Djakov --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c -@@ -1277,11 +1277,13 @@ - if (!opp_table) - return ERR_PTR(-ENOMEM); - +@@ -1277,11 +1277,13 @@ struct opp_table *dev_pm_opp_set_regulat + if (!opp_table) + return ERR_PTR(-ENOMEM); + +#if 0 - /* This should be called before OPPs are initialized */ - if (WARN_ON(!list_empty(&opp_table->opp_list))) { - ret = -EBUSY; - goto err; - } + /* This should be called before OPPs are initialized */ + if (WARN_ON(!list_empty(&opp_table->opp_list))) { + ret = -EBUSY; + goto err; + } +#endif - - /* Already have regulators set */ - if (opp_table->regulators) { + + /* Already have regulators set */ + if (opp_table->regulators) { diff --git a/target/linux/ipq806x/patches-4.14/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch b/target/linux/ipq806x/patches-4.14/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch index 2ab46e176e..abcccb277c 100644 --- a/target/linux/ipq806x/patches-4.14/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch +++ b/target/linux/ipq806x/patches-4.14/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch @@ -27,9 +27,9 @@ Signed-off-by: Georgi Djakov --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c -@@ -1605,6 +1605,83 @@ unlock: +@@ -1605,6 +1605,83 @@ put_table: } - + /** + * dev_pm_opp_adjust_voltage() - helper to change the voltage of an OPP + * @dev: device for which we do this operation @@ -114,27 +114,27 @@ Signed-off-by: Georgi Djakov --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -25,6 +25,7 @@ struct opp_table; - + enum dev_pm_opp_event { - OPP_EVENT_ADD, OPP_EVENT_REMOVE, OPP_EVENT_ENABLE, OPP_EVENT_DISABLE, + OPP_EVENT_ADD, OPP_EVENT_REMOVE, OPP_EVENT_ENABLE, OPP_EVENT_DISABLE, + OPP_EVENT_ADJUST_VOLTAGE, }; - + /** @@ -108,6 +109,9 @@ int dev_pm_opp_add(struct device *dev, u - unsigned long u_volt); + unsigned long u_volt); void dev_pm_opp_remove(struct device *dev, unsigned long freq); - + +int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq, + unsigned long u_volt); + int dev_pm_opp_enable(struct device *dev, unsigned long freq); - + int dev_pm_opp_disable(struct device *dev, unsigned long freq); @@ -208,6 +212,13 @@ static inline void dev_pm_opp_remove(str { } - + +static inline int +dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq, + unsigned long u_volt) @@ -144,4 +144,4 @@ Signed-off-by: Georgi Djakov + static inline int dev_pm_opp_enable(struct device *dev, unsigned long freq) { - return 0; + return 0; diff --git a/target/linux/ipq806x/patches-4.14/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch b/target/linux/ipq806x/patches-4.14/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch index f0705badb2..22ae309801 100644 --- a/target/linux/ipq806x/patches-4.14/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch +++ b/target/linux/ipq806x/patches-4.14/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch @@ -15,7 +15,7 @@ Signed-off-by: Georgi Djakov @@ -126,6 +126,27 @@ unsigned long dev_pm_opp_get_freq(struct } EXPORT_SYMBOL_GPL(dev_pm_opp_get_freq); - + +struct regulator *dev_pm_opp_get_regulator(struct device *dev) +{ + struct opp_table *opp_table; @@ -42,10 +42,11 @@ Signed-off-by: Georgi Djakov * @opp: opp for which turbo mode is being verified --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h -@@ -85,6 +85,7 @@ enum dev_pm_opp_event { +@@ -85,6 +85,7 @@ void dev_pm_opp_put_opp_table(struct opp unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp); - + unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp); +struct regulator *dev_pm_opp_get_regulator(struct device *dev); - + bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp); + diff --git a/target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch b/target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch index 711e14c6cd..6299fcf257 100644 --- a/target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch +++ b/target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch @@ -18,21 +18,21 @@ Signed-off-by: Georgi Djakov --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c @@ -1649,6 +1649,7 @@ int dev_pm_opp_adjust_voltage(struct dev - struct opp_table *opp_table; - struct dev_pm_opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV); - int r = 0; + struct opp_table *opp_table; + struct dev_pm_opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV); + int r = 0; + unsigned long tol; - - /* keep the node allocated */ - new_opp = kmalloc(sizeof(*new_opp), GFP_KERNEL); + + /* keep the node allocated */ + new_opp = kmalloc(sizeof(*new_opp), GFP_KERNEL); @@ -1685,6 +1686,10 @@ int dev_pm_opp_adjust_voltage(struct dev - - /* plug in new node */ - new_opp->supplies[0].u_volt = u_volt; + + /* plug in new node */ + new_opp->supplies[0].u_volt = u_volt; + tol = u_volt * opp_table->voltage_tolerance_v1 / 100; + new_opp->supplies[0].u_volt = u_volt; + new_opp->supplies[0].u_volt_min = u_volt - tol; + new_opp->supplies[0].u_volt_max = u_volt + tol; - - list_replace(&opp->node, &new_opp->node); - mutex_unlock(&opp_table_lock); + + list_replace(&opp->node, &new_opp->node); + mutex_unlock(&opp_table_lock); diff --git a/target/linux/ipq806x/patches-4.14/0053-regulator-add-smb208-support.patch b/target/linux/ipq806x/patches-4.14/0053-regulator-add-smb208-support.patch index dd4abb15e9..0d2862c609 100644 --- a/target/linux/ipq806x/patches-4.14/0053-regulator-add-smb208-support.patch +++ b/target/linux/ipq806x/patches-4.14/0053-regulator-add-smb208-support.patch @@ -12,29 +12,29 @@ Signed-off-by: Adrian Panella --- a/Documentation/devicetree/bindings/mfd/qcom-rpm.txt +++ b/Documentation/devicetree/bindings/mfd/qcom-rpm.txt @@ -61,6 +61,7 @@ Regulator nodes are identified by their - "qcom,rpm-pm8901-regulators" - "qcom,rpm-pm8921-regulators" - "qcom,rpm-pm8018-regulators" + "qcom,rpm-pm8901-regulators" + "qcom,rpm-pm8921-regulators" + "qcom,rpm-pm8018-regulators" + "qcom,rpm-smb208-regulators" - + - vdd_l0_l1_lvs-supply: - vdd_l2_l11_l12-supply: @@ -171,6 +172,9 @@ pm8018: - s1, s2, s3, s4, s5, , l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, - l12, l14, lvs1 - + s1, s2, s3, s4, s5, , l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, + l12, l14, lvs1 + +smb208: + s1a, s1b, s2a, s2b + The content of each sub-node is defined by the standard binding for regulators - see regulator.txt - with additional custom properties described below: - + --- a/drivers/regulator/qcom_rpm-regulator.c +++ b/drivers/regulator/qcom_rpm-regulator.c @@ -933,12 +933,21 @@ static const struct rpm_regulator_data r - { } + { } }; - + +static const struct rpm_regulator_data rpm_smb208_regulators[] = { + { "s1a", QCOM_RPM_SMB208_S1a, &smb208_smps, "vin_s1a" }, + { "s1b", QCOM_RPM_SMB208_S1b, &smb208_smps, "vin_s1b" }, @@ -44,12 +44,12 @@ Signed-off-by: Adrian Panella +}; + static const struct of_device_id rpm_of_match[] = { - { .compatible = "qcom,rpm-pm8018-regulators", - .data = &rpm_pm8018_regulators }, - { .compatible = "qcom,rpm-pm8058-regulators", .data = &rpm_pm8058_regulators }, - { .compatible = "qcom,rpm-pm8901-regulators", .data = &rpm_pm8901_regulators }, - { .compatible = "qcom,rpm-pm8921-regulators", .data = &rpm_pm8921_regulators }, + { .compatible = "qcom,rpm-pm8018-regulators", + .data = &rpm_pm8018_regulators }, + { .compatible = "qcom,rpm-pm8058-regulators", .data = &rpm_pm8058_regulators }, + { .compatible = "qcom,rpm-pm8901-regulators", .data = &rpm_pm8901_regulators }, + { .compatible = "qcom,rpm-pm8921-regulators", .data = &rpm_pm8921_regulators }, + { .compatible = "qcom,rpm-smb208-regulators", .data = &rpm_smb208_regulators }, - { } + { } }; MODULE_DEVICE_TABLE(of, rpm_of_match); diff --git a/target/linux/ipq806x/patches-4.14/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch b/target/linux/ipq806x/patches-4.14/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch index 47c64eca82..969adfe4b5 100644 --- a/target/linux/ipq806x/patches-4.14/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch +++ b/target/linux/ipq806x/patches-4.14/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch @@ -26,19 +26,19 @@ Signed-off-by: Georgi Djakov --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -32,6 +32,9 @@ struct private_data { - struct device *cpu_dev; - struct thermal_cooling_device *cdev; - const char *reg_name; + struct device *cpu_dev; + struct thermal_cooling_device *cdev; + const char *reg_name; + struct notifier_block opp_nb; + struct mutex lock; + unsigned long opp_freq; }; - + static struct freq_attr *cpufreq_dt_attr[] = { @@ -43,9 +46,16 @@ static struct freq_attr *cpufreq_dt_attr static int set_target(struct cpufreq_policy *policy, unsigned int index) { - struct private_data *priv = policy->driver_data; + struct private_data *priv = policy->driver_data; + int ret; + unsigned long target_freq = policy->freq_table[index].frequency * 1000; + @@ -47,17 +47,17 @@ Signed-off-by: Georgi Djakov + if (!ret) + priv->opp_freq = target_freq; + mutex_unlock(&priv->lock); - + - return dev_pm_opp_set_rate(priv->cpu_dev, - policy->freq_table[index].frequency * 1000); + return ret; } - + /* @@ -86,6 +96,39 @@ node_put: - return name; + return name; } - + +static int opp_notifier(struct notifier_block *nb, unsigned long event, + void *data) +{ @@ -93,39 +93,39 @@ Signed-off-by: Georgi Djakov + static int resources_available(void) { - struct device *cpu_dev; + struct device *cpu_dev; @@ -152,6 +195,7 @@ static int cpufreq_init(struct cpufreq_p - bool fallback = false; - const char *name; - int ret; + bool fallback = false; + const char *name; + int ret; + struct srcu_notifier_head *opp_srcu_head; - - cpu_dev = get_cpu_device(policy->cpu); - if (!cpu_dev) { + + cpu_dev = get_cpu_device(policy->cpu); + if (!cpu_dev) { @@ -241,13 +285,16 @@ static int cpufreq_init(struct cpufreq_p - goto out_free_opp; - } - + goto out_free_opp; + } + + mutex_init(&priv->lock); + dev_pm_opp_register_notifier(cpu_dev, &priv->opp_nb); + - priv->reg_name = name; - priv->opp_table = opp_table; - - ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table); - if (ret) { - dev_err(cpu_dev, "failed to init cpufreq table: %d\n", ret); + priv->reg_name = name; + priv->opp_table = opp_table; + + ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table); + if (ret) { + dev_err(cpu_dev, "failed to init cpufreq table: %d\n", ret); - goto out_free_priv; + goto out_unregister_nb; - } - - priv->cpu_dev = cpu_dev; -@@ -283,6 +343,8 @@ static int cpufreq_init(struct cpufreq_p - + } + + priv->cpu_dev = cpu_dev; +@@ -283,6 +330,8 @@ static int cpufreq_init(struct cpufreq_p + out_free_cpufreq_table: - dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); + dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); +out_unregister_nb: + dev_pm_opp_unregister_notifier(cpu_dev, &priv->opp_nb); out_free_priv: - kfree(priv); + kfree(priv); out_free_opp: diff --git a/target/linux/ipq806x/patches-4.14/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch b/target/linux/ipq806x/patches-4.14/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch index 166964961b..26ea9f3c14 100644 --- a/target/linux/ipq806x/patches-4.14/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch +++ b/target/linux/ipq806x/patches-4.14/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch @@ -12,15 +12,15 @@ Signed-off-by: Georgi Djakov --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -48,11 +48,41 @@ static int set_target(struct cpufreq_pol - struct private_data *priv = policy->driver_data; - int ret; - unsigned long target_freq = policy->freq_table[index].frequency * 1000; + struct private_data *priv = policy->driver_data; + int ret; + unsigned long target_freq = policy->freq_table[index].frequency * 1000; + struct clk *l2_clk = policy->l2_clk; + unsigned int l2_freq; + unsigned long new_l2_freq = 0; - - mutex_lock(&priv->lock); - ret = dev_pm_opp_set_rate(priv->cpu_dev, target_freq); + + mutex_lock(&priv->lock); + ret = dev_pm_opp_set_rate(priv->cpu_dev, target_freq); - if (!ret) + + if (!ret) { @@ -48,25 +48,25 @@ Signed-off-by: Georgi Djakov + } + } + - priv->opp_freq = target_freq; + priv->opp_freq = target_freq; + } + - mutex_unlock(&priv->lock); - - return ret; + mutex_unlock(&priv->lock); + + return ret; @@ -196,6 +226,8 @@ static int cpufreq_init(struct cpufreq_p - const char *name; - int ret; - struct srcu_notifier_head *opp_srcu_head; + const char *name; + int ret; + struct srcu_notifier_head *opp_srcu_head; + struct device_node *l2_np; + struct clk *l2_clk = NULL; - - cpu_dev = get_cpu_device(policy->cpu); - if (!cpu_dev) { + + cpu_dev = get_cpu_device(policy->cpu); + if (!cpu_dev) { @@ -303,6 +335,13 @@ static int cpufreq_init(struct cpufreq_p - - policy->suspend_freq = dev_pm_opp_get_suspend_opp_freq(cpu_dev) / 1000; - + + policy->suspend_freq = dev_pm_opp_get_suspend_opp_freq(cpu_dev) / 1000; + + l2_clk = clk_get(cpu_dev, "l2"); + if (!IS_ERR(l2_clk)) + policy->l2_clk = l2_clk; @@ -74,17 +74,17 @@ Signed-off-by: Georgi Djakov + if (l2_np) + of_property_read_u32_array(l2_np, "qcom,l2-rates", policy->l2_rate, 3); + - ret = cpufreq_table_validate_and_show(policy, freq_table); - if (ret) { - dev_err(cpu_dev, "%s: invalid frequency table: %d\n", __func__, + ret = cpufreq_table_validate_and_show(policy, freq_table); + if (ret) { + dev_err(cpu_dev, "%s: invalid frequency table: %d\n", __func__, --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -73,6 +73,8 @@ struct cpufreq_policy { - unsigned int cpu; /* cpu managing this policy, must be online */ - - struct clk *clk; + unsigned int cpu; /* cpu managing this policy, must be online */ + + struct clk *clk; + struct clk *l2_clk; /* L2 clock */ + unsigned int l2_rate[3]; /* L2 bus clock rate thresholds */ - struct cpufreq_cpuinfo cpuinfo;/* see above */ - - unsigned int min; /* in kHz */ + struct cpufreq_cpuinfo cpuinfo;/* see above */ + + unsigned int min; /* in kHz */ diff --git a/target/linux/ipq806x/patches-4.14/0056-cpufreq-dt-Add-missing-rcu-locks.patch b/target/linux/ipq806x/patches-4.14/0056-cpufreq-dt-Add-missing-rcu-locks.patch index 0aae212dfe..c0eb2eb3cd 100644 --- a/target/linux/ipq806x/patches-4.14/0056-cpufreq-dt-Add-missing-rcu-locks.patch +++ b/target/linux/ipq806x/patches-4.14/0056-cpufreq-dt-Add-missing-rcu-locks.patch @@ -11,13 +11,13 @@ Signed-off-by: Georgi Djakov --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -143,8 +143,10 @@ static int opp_notifier(struct notifier_ - ret = PTR_ERR(cpu_reg); - goto out; - } + ret = PTR_ERR(cpu_reg); + goto out; + } + rcu_read_lock(); - volt = dev_pm_opp_get_voltage(opp); - freq = dev_pm_opp_get_freq(opp); + volt = dev_pm_opp_get_voltage(opp); + freq = dev_pm_opp_get_freq(opp); + rcu_read_unlock(); - - mutex_lock(&priv->lock); - if (freq == priv->opp_freq) { + + mutex_lock(&priv->lock); + if (freq == priv->opp_freq) { diff --git a/target/linux/ipq806x/patches-4.14/0059-ARM-cpuidle-Add-cpuidle-support-for-QCOM-cpus.patch b/target/linux/ipq806x/patches-4.14/0059-ARM-cpuidle-Add-cpuidle-support-for-QCOM-cpus.patch index 0c8cb8acce..5bd58c8137 100644 --- a/target/linux/ipq806x/patches-4.14/0059-ARM-cpuidle-Add-cpuidle-support-for-QCOM-cpus.patch +++ b/target/linux/ipq806x/patches-4.14/0059-ARM-cpuidle-Add-cpuidle-support-for-QCOM-cpus.patch @@ -17,9 +17,9 @@ Signed-off-by: Lina Iyer --- a/drivers/cpuidle/Kconfig.arm +++ b/drivers/cpuidle/Kconfig.arm @@ -75,3 +75,10 @@ config ARM_MVEBU_V7_CPUIDLE - depends on ARCH_MVEBU && !ARM64 - help - Select this to enable cpuidle on Armada 370, 38x and XP processors. + depends on ARCH_MVEBU && !ARM64 + help + Select this to enable cpuidle on Armada 370, 38x and XP processors. + +config ARM_QCOM_CPUIDLE + bool "CPU Idle Driver for QCOM processors" diff --git a/target/linux/ipq806x/patches-4.14/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch b/target/linux/ipq806x/patches-4.14/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch index 23265e2eca..f810f6ac46 100644 --- a/target/linux/ipq806x/patches-4.14/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch +++ b/target/linux/ipq806x/patches-4.14/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch @@ -33,15 +33,15 @@ Signed-off-by: Mathieu Olivari --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -341,7 +341,7 @@ - depends on MMU - select ARM_HAS_SG_CHAIN - select ARM_PATCH_PHYS_VIRT +@@ -341,7 +341,7 @@ config ARCH_MULTIPLATFORM + depends on MMU + select ARM_HAS_SG_CHAIN + select ARM_PATCH_PHYS_VIRT - select AUTO_ZRELADDR + select AUTO_ZRELADDR if !ARCH_QCOM - select TIMER_OF - select COMMON_CLK - select GENERIC_CLOCKEVENTS + select TIMER_OF + select COMMON_CLK + select GENERIC_CLOCKEVENTS --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -255,9 +255,11 @@ MACHINE := arch/arm/mach-$(word 1,$(mac @@ -53,7 +53,7 @@ Signed-off-by: Mathieu Olivari MACHINE := endif +endif - + machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) --- /dev/null diff --git a/target/linux/ipq806x/patches-4.14/0061-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch b/target/linux/ipq806x/patches-4.14/0061-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch index ce18093406..a4a957545b 100644 --- a/target/linux/ipq806x/patches-4.14/0061-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch +++ b/target/linux/ipq806x/patches-4.14/0061-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch @@ -11,13 +11,13 @@ Signed-off-by: John Crispin --- a/drivers/mtd/qcom_smem_part.c +++ b/drivers/mtd/qcom_smem_part.c @@ -189,6 +189,10 @@ static int parse_qcom_smem_partitions(st - m_part->size = le32_to_cpu(s_part->size) * (*smem_blksz); - m_part->offset = le32_to_cpu(s_part->start) * (*smem_blksz); - + m_part->size = le32_to_cpu(s_part->size) * (*smem_blksz); + m_part->offset = le32_to_cpu(s_part->start) * (*smem_blksz); + + /* "rootfs" conflicts with OpenWrt auto mounting */ + if (mtd_type_is_nand(master) && !strcmp(m_part->name, "rootfs")) + m_part->name = "ubi"; + - /* - * The last SMEM partition may have its size marked as - * something like 0xffffffff, which means "until the end of the + /* + * The last SMEM partition may have its size marked as + * something like 0xffffffff, which means "until the end of the diff --git a/target/linux/ipq806x/patches-4.14/0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch b/target/linux/ipq806x/patches-4.14/0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch index 004018cac2..717934315a 100644 --- a/target/linux/ipq806x/patches-4.14/0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch +++ b/target/linux/ipq806x/patches-4.14/0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch @@ -15,11 +15,11 @@ Signed-off-by: Abhishek Sahu --- a/drivers/clk/qcom/gcc-ipq806x.c +++ b/drivers/clk/qcom/gcc-ipq806x.c @@ -1233,6 +1233,8 @@ static struct clk_rcg prng_src = { - .parent_map = gcc_pxo_pll8_map, - }, - .clkr = { + .parent_map = gcc_pxo_pll8_map, + }, + .clkr = { + .enable_reg = 0x2e80, + .enable_mask = BIT(11), - .hw.init = &(struct clk_init_data){ - .name = "prng_src", - .parent_names = gcc_pxo_pll8, + .hw.init = &(struct clk_init_data){ + .name = "prng_src", + .parent_names = gcc_pxo_pll8, diff --git a/target/linux/ipq806x/patches-4.14/0063-1-ipq806x-tsens-driver.patch b/target/linux/ipq806x/patches-4.14/0063-1-ipq806x-tsens-driver.patch index b427550cd8..685b0c3ce1 100644 --- a/target/linux/ipq806x/patches-4.14/0063-1-ipq806x-tsens-driver.patch +++ b/target/linux/ipq806x/patches-4.14/0063-1-ipq806x-tsens-driver.patch @@ -39,7 +39,7 @@ Signed-off-by: Rajith Cherian - "qcom,msm8974-tsens" : For 8974 Family of SoCs - "qcom,msm8996-tsens" : For 8996 Family of SoCs + - "qcom,ipq8064-tsens" : For IPQ8064 - + - reg: Address range of the thermal registers - #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description. --- a/drivers/thermal/qcom/Makefile @@ -606,22 +606,22 @@ Signed-off-by: Rajith Cherian --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -72,6 +72,9 @@ static const struct of_device_id tsens_t - }, { - .compatible = "qcom,msm8996-tsens", - .data = &data_8996, + }, { + .compatible = "qcom,msm8996-tsens", + .data = &data_8996, + }, { + .compatible = "qcom,ipq8064-tsens", + .data = &data_ipq8064, - }, - {} + }, + {} }; --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -89,6 +89,6 @@ void compute_intercept_slope(struct tsen int init_common(struct tsens_device *); int get_temp_common(struct tsens_device *, int, int *); - + -extern const struct tsens_data data_8916, data_8974, data_8960, data_8996; +extern const struct tsens_data data_8916, data_8974, data_8960, data_8996, data_ipq8064; - + #endif /* __QCOM_TSENS_H__ */ diff --git a/target/linux/ipq806x/patches-4.14/0063-2-tsens-support-configurable-interrupts.patch b/target/linux/ipq806x/patches-4.14/0063-2-tsens-support-configurable-interrupts.patch index ef270dd3b4..4469896ae2 100644 --- a/target/linux/ipq806x/patches-4.14/0063-2-tsens-support-configurable-interrupts.patch +++ b/target/linux/ipq806x/patches-4.14/0063-2-tsens-support-configurable-interrupts.patch @@ -26,84 +26,84 @@ Signed-off-by: Rajith Cherian @@ -12,11 +12,15 @@ Required properties: - Refer to Documentation/devicetree/bindings/nvmem/nvmem.txt to know how to specify nvmem cells - + +Optional properties: +- interrupts: Interrupt which gets triggered when threshold is hit + Example: tsens: thermal-sensor@900000 { - compatible = "qcom,msm8916-tsens"; - reg = <0x4a8000 0x2000>; - nvmem-cells = <&tsens_caldata>, <&tsens_calsel>; - nvmem-cell-names = "caldata", "calsel"; + compatible = "qcom,msm8916-tsens"; + reg = <0x4a8000 0x2000>; + nvmem-cells = <&tsens_caldata>, <&tsens_calsel>; + nvmem-cell-names = "caldata", "calsel"; + interrupts = <0 178 0>; - #thermal-sensor-cells = <1>; - }; + #thermal-sensor-cells = <1>; + }; --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -95,7 +95,7 @@ static int of_thermal_get_temp(struct th { - struct __thermal_zone *data = tz->devdata; - + struct __thermal_zone *data = tz->devdata; + - if (!data->ops->get_temp) + if (!data->ops->get_temp || (data->mode == THERMAL_DEVICE_DISABLED)) - return -EINVAL; - - return data->ops->get_temp(data->sensor_data, temp); + return -EINVAL; + + return data->ops->get_temp(data->sensor_data, temp); @@ -106,7 +106,8 @@ static int of_thermal_set_trips(struct t { - struct __thermal_zone *data = tz->devdata; - + struct __thermal_zone *data = tz->devdata; + - if (!data->ops || !data->ops->set_trips) + if (!data->ops || !data->ops->set_trips + || (data->mode == THERMAL_DEVICE_DISABLED)) - return -EINVAL; - - return data->ops->set_trips(data->sensor_data, low, high); + return -EINVAL; + + return data->ops->set_trips(data->sensor_data, low, high); @@ -192,6 +193,9 @@ static int of_thermal_set_emul_temp(stru { - struct __thermal_zone *data = tz->devdata; - + struct __thermal_zone *data = tz->devdata; + + if (data->mode == THERMAL_DEVICE_DISABLED) + return -EINVAL; + - return data->ops->set_emul_temp(data->sensor_data, temp); + return data->ops->set_emul_temp(data->sensor_data, temp); } - + @@ -200,7 +204,7 @@ static int of_thermal_get_trend(struct t { - struct __thermal_zone *data = tz->devdata; - + struct __thermal_zone *data = tz->devdata; + - if (!data->ops->get_trend) + if (!data->ops->get_trend || (data->mode == THERMAL_DEVICE_DISABLED)) - return -EINVAL; - - return data->ops->get_trend(data->sensor_data, trip, trend); + return -EINVAL; + + return data->ops->get_trend(data->sensor_data, trip, trend); @@ -286,7 +290,9 @@ static int of_thermal_set_mode(struct th - mutex_unlock(&tz->lock); - - data->mode = mode; + mutex_unlock(&tz->lock); + + data->mode = mode; - thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); + + if (mode == THERMAL_DEVICE_ENABLED) + thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); - - return 0; + + return 0; } @@ -296,7 +302,8 @@ static int of_thermal_get_trip_type(stru { - struct __thermal_zone *data = tz->devdata; - + struct __thermal_zone *data = tz->devdata; + - if (trip >= data->ntrips || trip < 0) + if (trip >= data->ntrips || trip < 0 + || (data->mode == THERMAL_DEVICE_DISABLED)) - return -EDOM; - - *type = data->trips[trip].type; + return -EDOM; + + *type = data->trips[trip].type; @@ -304,12 +311,39 @@ static int of_thermal_get_trip_type(stru - return 0; + return 0; } - + +static int of_thermal_activate_trip_type(struct thermal_zone_device *tz, + int trip, enum thermal_trip_activation_mode mode) +{ @@ -131,109 +131,109 @@ Signed-off-by: Rajith Cherian +} + static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip, - int *temp) + int *temp) { - struct __thermal_zone *data = tz->devdata; - + struct __thermal_zone *data = tz->devdata; + - if (trip >= data->ntrips || trip < 0) + if (trip >= data->ntrips || trip < 0 + || (data->mode == THERMAL_DEVICE_DISABLED)) - return -EDOM; - - *temp = data->trips[trip].temperature; + return -EDOM; + + *temp = data->trips[trip].temperature; @@ -322,7 +356,8 @@ static int of_thermal_set_trip_temp(stru { - struct __thermal_zone *data = tz->devdata; - + struct __thermal_zone *data = tz->devdata; + - if (trip >= data->ntrips || trip < 0) + if (trip >= data->ntrips || trip < 0 + || (data->mode == THERMAL_DEVICE_DISABLED)) - return -EDOM; - - if (data->ops->set_trip_temp) { + return -EDOM; + + if (data->ops->set_trip_temp) { @@ -344,7 +379,8 @@ static int of_thermal_get_trip_hyst(stru { - struct __thermal_zone *data = tz->devdata; - + struct __thermal_zone *data = tz->devdata; + - if (trip >= data->ntrips || trip < 0) + if (trip >= data->ntrips || trip < 0 + || (data->mode == THERMAL_DEVICE_DISABLED)) - return -EDOM; - - *hyst = data->trips[trip].hysteresis; + return -EDOM; + + *hyst = data->trips[trip].hysteresis; @@ -357,7 +393,8 @@ static int of_thermal_set_trip_hyst(stru { - struct __thermal_zone *data = tz->devdata; - + struct __thermal_zone *data = tz->devdata; + - if (trip >= data->ntrips || trip < 0) + if (trip >= data->ntrips || trip < 0 + || (data->mode == THERMAL_DEVICE_DISABLED)) - return -EDOM; - - /* thermal framework should take care of data->mask & (1 << trip) */ + return -EDOM; + + /* thermal framework should take care of data->mask & (1 << trip) */ @@ -432,6 +469,9 @@ thermal_zone_of_add_sensor(struct device - if (ops->set_emul_temp) - tzd->ops->set_emul_temp = of_thermal_set_emul_temp; - + if (ops->set_emul_temp) + tzd->ops->set_emul_temp = of_thermal_set_emul_temp; + + if (ops->set_trip_activate) + tzd->ops->set_trip_activate = of_thermal_activate_trip_type; + - mutex_unlock(&tzd->lock); - - return tzd; + mutex_unlock(&tzd->lock); + + return tzd; @@ -726,7 +766,10 @@ static const char * const trip_types[] = - [THERMAL_TRIP_ACTIVE] = "active", - [THERMAL_TRIP_PASSIVE] = "passive", - [THERMAL_TRIP_HOT] = "hot", + [THERMAL_TRIP_ACTIVE] = "active", + [THERMAL_TRIP_PASSIVE] = "passive", + [THERMAL_TRIP_HOT] = "hot", - [THERMAL_TRIP_CRITICAL] = "critical", + [THERMAL_TRIP_CRITICAL] = "critical_high", + [THERMAL_TRIP_CONFIGURABLE_HI] = "configurable_hi", + [THERMAL_TRIP_CONFIGURABLE_LOW] = "configurable_lo", + [THERMAL_TRIP_CRITICAL_LOW] = "critical_low", }; - + /** --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -31,7 +31,7 @@ static int tsens_get_temp(void *data, in - + static int tsens_get_trend(void *p, int trip, enum thermal_trend *trend) { - const struct tsens_sensor *s = p; + struct tsens_sensor *s = p; - struct tsens_device *tmdev = s->tmdev; - - if (tmdev->ops->get_trend) + struct tsens_device *tmdev = s->tmdev; + + if (tmdev->ops->get_trend) @@ -40,9 +40,10 @@ static int tsens_get_trend(void *p, int - return -ENOTSUPP; + return -ENOTSUPP; } - + -static int __maybe_unused tsens_suspend(struct device *dev) +static int __maybe_unused tsens_suspend(void *data) { - struct tsens_device *tmdev = dev_get_drvdata(dev); + struct tsens_sensor *s = data; + struct tsens_device *tmdev = s->tmdev; - - if (tmdev->ops && tmdev->ops->suspend) - return tmdev->ops->suspend(tmdev); + + if (tmdev->ops && tmdev->ops->suspend) + return tmdev->ops->suspend(tmdev); @@ -50,9 +51,10 @@ static int __maybe_unused tsens_suspend - return 0; + return 0; } - + -static int __maybe_unused tsens_resume(struct device *dev) +static int __maybe_unused tsens_resume(void *data) { - struct tsens_device *tmdev = dev_get_drvdata(dev); + struct tsens_sensor *s = data; + struct tsens_device *tmdev = s->tmdev; - - if (tmdev->ops && tmdev->ops->resume) - return tmdev->ops->resume(tmdev); + + if (tmdev->ops && tmdev->ops->resume) + return tmdev->ops->resume(tmdev); @@ -60,6 +62,30 @@ static int __maybe_unused tsens_resume(s - return 0; + return 0; } - + +static int __maybe_unused tsens_set_trip_temp(void *data, int trip, int temp) +{ + struct tsens_sensor *s = data; @@ -259,50 +259,50 @@ Signed-off-by: Rajith Cherian + + static SIMPLE_DEV_PM_OPS(tsens_pm_ops, tsens_suspend, tsens_resume); - + static const struct of_device_id tsens_table[] = { @@ -83,6 +109,8 @@ MODULE_DEVICE_TABLE(of, tsens_table); static const struct thermal_zone_of_device_ops tsens_of_ops = { - .get_temp = tsens_get_temp, - .get_trend = tsens_get_trend, + .get_temp = tsens_get_temp, + .get_trend = tsens_get_trend, + .set_trip_temp = tsens_set_trip_temp, + .set_trip_activate = tsens_activate_trip_type, }; - + static int tsens_register(struct tsens_device *tmdev) @@ -131,7 +159,7 @@ static int tsens_probe(struct platform_d - if (id) - data = id->data; - else + if (id) + data = id->data; + else - data = &data_8960; + return -EINVAL; - - if (data->num_sensors <= 0) { - dev_err(dev, "invalid number of sensors\n"); + + if (data->num_sensors <= 0) { + dev_err(dev, "invalid number of sensors\n"); @@ -146,6 +174,9 @@ static int tsens_probe(struct platform_d - tmdev->dev = dev; - tmdev->num_sensors = data->num_sensors; - tmdev->ops = data->ops; + tmdev->dev = dev; + tmdev->num_sensors = data->num_sensors; + tmdev->ops = data->ops; + + tmdev->tsens_irq = platform_get_irq(pdev, 0); + - for (i = 0; i < tmdev->num_sensors; i++) { - if (data->hw_ids) - tmdev->sensor[i].hw_id = data->hw_ids[i]; + for (i = 0; i < tmdev->num_sensors; i++) { + if (data->hw_ids) + tmdev->sensor[i].hw_id = data->hw_ids[i]; --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -24,9 +24,12 @@ struct tsens_device; struct tsens_sensor { - struct tsens_device *tmdev; - struct thermal_zone_device *tzd; + struct tsens_device *tmdev; + struct thermal_zone_device *tzd; + struct work_struct notify_work; - int offset; - int id; - int hw_id; + int offset; + int id; + int hw_id; + int calib_data; + int calib_data_backup; - int slope; - u32 status; + int slope; + u32 status; }; @@ -41,6 +44,9 @@ struct tsens_sensor { * @suspend: Function to suspend the tsens device @@ -313,48 +313,48 @@ Signed-off-by: Rajith Cherian + * @set_trip_activate: Function to activate trip points */ struct tsens_ops { - /* mandatory callbacks */ + /* mandatory callbacks */ @@ -53,6 +59,9 @@ struct tsens_ops { - int (*suspend)(struct tsens_device *); - int (*resume)(struct tsens_device *); - int (*get_trend)(struct tsens_device *, int, enum thermal_trend *); + int (*suspend)(struct tsens_device *); + int (*resume)(struct tsens_device *); + int (*get_trend)(struct tsens_device *, int, enum thermal_trend *); + int (*set_trip_temp)(void *, int, int); + int (*set_trip_activate)(void *, int, + enum thermal_trip_activation_mode); }; - + /** @@ -76,11 +85,13 @@ struct tsens_context { struct tsens_device { - struct device *dev; - u32 num_sensors; + struct device *dev; + u32 num_sensors; + u32 tsens_irq; - struct regmap *map; - struct regmap_field *status_field; - struct tsens_context ctx; - bool trdy; - const struct tsens_ops *ops; + struct regmap *map; + struct regmap_field *status_field; + struct tsens_context ctx; + bool trdy; + const struct tsens_ops *ops; + struct work_struct tsens_work; - struct tsens_sensor sensor[0]; + struct tsens_sensor sensor[0]; }; - + --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c -@@ -115,12 +115,48 @@ - return sprintf(buf, "passive\n"); - case THERMAL_TRIP_ACTIVE: - return sprintf(buf, "active\n"); +@@ -115,12 +115,48 @@ trip_point_type_show(struct device *dev, + return sprintf(buf, "passive\n"); + case THERMAL_TRIP_ACTIVE: + return sprintf(buf, "active\n"); + case THERMAL_TRIP_CONFIGURABLE_HI: + return sprintf(buf, "configurable_hi\n"); + case THERMAL_TRIP_CONFIGURABLE_LOW: + return sprintf(buf, "configurable_low\n"); + case THERMAL_TRIP_CRITICAL_LOW: + return sprintf(buf, "critical_low\n"); - default: - return sprintf(buf, "unknown\n"); - } + default: + return sprintf(buf, "unknown\n"); + } } - + static ssize_t +trip_point_type_activate(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) @@ -387,52 +387,52 @@ Signed-off-by: Rajith Cherian + +static ssize_t trip_point_temp_store(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) + const char *buf, size_t count) { -@@ -562,6 +598,12 @@ - tz->trip_type_attrs[indx].attr.show = trip_point_type_show; - attrs[indx] = &tz->trip_type_attrs[indx].attr.attr; - +@@ -562,6 +598,12 @@ static int create_trip_attrs(struct ther + tz->trip_type_attrs[indx].attr.show = trip_point_type_show; + attrs[indx] = &tz->trip_type_attrs[indx].attr.attr; + + if (IS_ENABLED(CONFIG_THERMAL_WRITABLE_TRIPS)) { + tz->trip_type_attrs[indx].attr.store + = trip_point_type_activate; + tz->trip_type_attrs[indx].attr.attr.mode |= S_IWUSR; + } + - /* create trip temp attribute */ - snprintf(tz->trip_temp_attrs[indx].name, THERMAL_NAME_LENGTH, - "trip_point_%d_temp", indx); + /* create trip temp attribute */ + snprintf(tz->trip_temp_attrs[indx].name, THERMAL_NAME_LENGTH, + "trip_point_%d_temp", indx); --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -78,11 +78,19 @@ enum thermal_device_mode { - THERMAL_DEVICE_ENABLED, + THERMAL_DEVICE_ENABLED, }; - + +enum thermal_trip_activation_mode { + THERMAL_TRIP_ACTIVATION_DISABLED = 0, + THERMAL_TRIP_ACTIVATION_ENABLED, +}; + enum thermal_trip_type { - THERMAL_TRIP_ACTIVE = 0, - THERMAL_TRIP_PASSIVE, - THERMAL_TRIP_HOT, - THERMAL_TRIP_CRITICAL, + THERMAL_TRIP_ACTIVE = 0, + THERMAL_TRIP_PASSIVE, + THERMAL_TRIP_HOT, + THERMAL_TRIP_CRITICAL, + THERMAL_TRIP_CONFIGURABLE_HI, + THERMAL_TRIP_CONFIGURABLE_LOW, + THERMAL_TRIP_CRITICAL_LOW, }; - + enum thermal_trend { @@ -120,6 +128,8 @@ struct thermal_zone_device_ops { - enum thermal_trip_type *); - int (*get_trip_temp) (struct thermal_zone_device *, int, int *); - int (*set_trip_temp) (struct thermal_zone_device *, int, int); + enum thermal_trip_type *); + int (*get_trip_temp) (struct thermal_zone_device *, int, int *); + int (*set_trip_temp) (struct thermal_zone_device *, int, int); + int (*set_trip_activate) (struct thermal_zone_device *, int, + enum thermal_trip_activation_mode); - int (*get_trip_hyst) (struct thermal_zone_device *, int, int *); - int (*set_trip_hyst) (struct thermal_zone_device *, int, int); - int (*get_crit_temp) (struct thermal_zone_device *, int *); + int (*get_trip_hyst) (struct thermal_zone_device *, int, int *); + int (*set_trip_hyst) (struct thermal_zone_device *, int, int); + int (*get_crit_temp) (struct thermal_zone_device *, int *); @@ -363,6 +373,8 @@ struct thermal_genl_event { * temperature. * @set_trip_temp: a pointer to a function that sets the trip temperature on @@ -441,13 +441,13 @@ Signed-off-by: Rajith Cherian + * temperature interrupts */ struct thermal_zone_of_device_ops { - int (*get_temp)(void *, int *); + int (*get_temp)(void *, int *); @@ -370,6 +382,8 @@ struct thermal_zone_of_device_ops { - int (*set_trips)(void *, int, int); - int (*set_emul_temp)(void *, int); - int (*set_trip_temp)(void *, int, int); + int (*set_trips)(void *, int, int); + int (*set_emul_temp)(void *, int); + int (*set_trip_temp)(void *, int, int); + int (*set_trip_activate)(void *, int, + enum thermal_trip_activation_mode); }; - + /** diff --git a/target/linux/ipq806x/patches-4.14/0064-clk-clk-rpm-fixes.patch b/target/linux/ipq806x/patches-4.14/0064-clk-clk-rpm-fixes.patch index 8a6bc1aca9..167278a701 100644 --- a/target/linux/ipq806x/patches-4.14/0064-clk-clk-rpm-fixes.patch +++ b/target/linux/ipq806x/patches-4.14/0064-clk-clk-rpm-fixes.patch @@ -13,19 +13,19 @@ Signed-off-by: John Crispin --- a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt +++ b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt @@ -13,6 +13,7 @@ Required properties : - "qcom,rpmcc-msm8916", "qcom,rpmcc" - "qcom,rpmcc-msm8974", "qcom,rpmcc" - "qcom,rpmcc-apq8064", "qcom,rpmcc" + "qcom,rpmcc-msm8916", "qcom,rpmcc" + "qcom,rpmcc-msm8974", "qcom,rpmcc" + "qcom,rpmcc-apq8064", "qcom,rpmcc" + "qcom,rpmcc-ipq806x", "qcom,rpmcc" - + - #clock-cells : shall contain 1 - + --- a/drivers/clk/qcom/clk-rpm.c +++ b/drivers/clk/qcom/clk-rpm.c @@ -359,6 +359,16 @@ DEFINE_CLK_RPM(apq8064, sfab_clk, sfab_a DEFINE_CLK_RPM(apq8064, sfpb_clk, sfpb_a_clk, QCOM_RPM_SFPB_CLK); DEFINE_CLK_RPM(apq8064, qdss_clk, qdss_a_clk, QCOM_RPM_QDSS_CLK); - + +/* ipq806x */ +DEFINE_CLK_RPM(ipq806x, afab_clk, afab_a_clk, QCOM_RPM_APPS_FABRIC_CLK); +DEFINE_CLK_RPM(ipq806x, cfpb_clk, cfpb_a_clk, QCOM_RPM_CFPB_CLK); @@ -37,12 +37,12 @@ Signed-off-by: John Crispin +DEFINE_CLK_RPM(ipq806x, nss_fabric_1_clk, nss_fabric_1_a_clk, QCOM_RPM_NSS_FABRIC_1_CLK); + static struct clk_rpm *apq8064_clks[] = { - [RPM_APPS_FABRIC_CLK] = &apq8064_afab_clk, - [RPM_APPS_FABRIC_A_CLK] = &apq8064_afab_a_clk, + [RPM_APPS_FABRIC_CLK] = &apq8064_afab_clk, + [RPM_APPS_FABRIC_A_CLK] = &apq8064_afab_a_clk, @@ -380,13 +390,38 @@ static struct clk_rpm *apq8064_clks[] = - [RPM_QDSS_A_CLK] = &apq8064_qdss_a_clk, + [RPM_QDSS_A_CLK] = &apq8064_qdss_a_clk, }; - + +static struct clk_rpm *ipq806x_clks[] = { + [RPM_APPS_FABRIC_CLK] = &ipq806x_afab_clk, + [RPM_APPS_FABRIC_A_CLK] = &ipq806x_afab_a_clk, @@ -63,19 +63,19 @@ Signed-off-by: John Crispin +}; + static const struct rpm_clk_desc rpm_clk_apq8064 = { - .clks = apq8064_clks, - .num_clks = ARRAY_SIZE(apq8064_clks), + .clks = apq8064_clks, + .num_clks = ARRAY_SIZE(apq8064_clks), }; - + +static const struct rpm_clk_desc rpm_clk_ipq806x = { + .clks = ipq806x_clks, + .num_clks = ARRAY_SIZE(ipq806x_clks), +}; + static const struct of_device_id rpm_clk_match_table[] = { - { .compatible = "qcom,rpmcc-apq8064", .data = &rpm_clk_apq8064 }, + { .compatible = "qcom,rpmcc-apq8064", .data = &rpm_clk_apq8064 }, + { .compatible = "qcom,rpmcc-ipq806x", .data = &rpm_clk_ipq806x }, - { } + { } }; MODULE_DEVICE_TABLE(of, rpm_clk_match_table); --- a/include/dt-bindings/clock/qcom,rpmcc.h @@ -88,6 +88,6 @@ Signed-off-by: John Crispin +#define RPM_NSS_FABRIC_0_A_CLK 23 +#define RPM_NSS_FABRIC_1_CLK 24 +#define RPM_NSS_FABRIC_1_A_CLK 25 - + /* SMD RPM clocks */ #define RPM_SMD_XO_CLK_SRC 0 diff --git a/target/linux/ipq806x/patches-4.14/0066-GPIO-add-named-gpio-exports.patch b/target/linux/ipq806x/patches-4.14/0066-GPIO-add-named-gpio-exports.patch index 992c240d62..026816d2e8 100644 --- a/target/linux/ipq806x/patches-4.14/0066-GPIO-add-named-gpio-exports.patch +++ b/target/linux/ipq806x/patches-4.14/0066-GPIO-add-named-gpio-exports.patch @@ -19,12 +19,12 @@ Signed-off-by: John Crispin #include +#include +#include - + #include "gpiolib.h" - + @@ -506,3 +508,69 @@ void of_gpiochip_remove(struct gpio_chip - gpiochip_remove_pin_ranges(chip); - of_node_put(chip->of_node); + gpiochip_remove_pin_ranges(chip); + of_node_put(chip->of_node); } + +static struct of_device_id gpio_export_ids[] = { @@ -101,20 +101,20 @@ Signed-off-by: John Crispin -int gpiod_export(struct gpio_desc *desc, bool direction_may_change) +int __gpiod_export(struct gpio_desc *desc, bool direction_may_change, const char *name) { - struct gpio_chip *chip; - struct gpio_device *gdev; + struct gpio_chip *chip; + struct gpio_device *gdev; @@ -615,6 +615,8 @@ int gpiod_export(struct gpio_desc *desc, - offset = gpio_chip_hwgpio(desc); - if (chip->names && chip->names[offset]) - ioname = chip->names[offset]; + offset = gpio_chip_hwgpio(desc); + if (chip->names && chip->names[offset]) + ioname = chip->names[offset]; + if (name) + ioname = name; - - dev = device_create_with_groups(&gpio_class, &gdev->dev, - MKDEV(0, 0), data, gpio_groups, + + dev = device_create_with_groups(&gpio_class, &gdev->dev, + MKDEV(0, 0), data, gpio_groups, @@ -636,6 +638,12 @@ err_unlock: - gpiod_dbg(desc, "%s: status %d\n", __func__, status); - return status; + gpiod_dbg(desc, "%s: status %d\n", __func__, status); + return status; } +EXPORT_SYMBOL_GPL(__gpiod_export); + @@ -123,14 +123,14 @@ Signed-off-by: John Crispin + return __gpiod_export(desc, direction_may_change, NULL); +} EXPORT_SYMBOL_GPL(gpiod_export); - + static int match_export(struct device *dev, const void *desc) --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -127,6 +127,12 @@ static inline int gpio_export(unsigned g - return gpiod_export(gpio_to_desc(gpio), direction_may_change); + return gpiod_export(gpio_to_desc(gpio), direction_may_change); } - + +int __gpiod_export(struct gpio_desc *desc, bool direction_may_change, const char *name); +static inline int gpio_export_with_name(unsigned gpio, bool direction_may_change, const char *name) +{ @@ -138,22 +138,22 @@ Signed-off-by: John Crispin +} + static inline int gpio_export_link(struct device *dev, const char *name, - unsigned gpio) + unsigned gpio) { --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h -@@ -451,6 +451,7 @@ static inline struct gpio_desc *devm_get - +@@ -451,6 +451,7 @@ struct gpio_desc *devm_fwnode_get_gpiod_ + #if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS) - + +int _gpiod_export(struct gpio_desc *desc, bool direction_may_change, const char *name); int gpiod_export(struct gpio_desc *desc, bool direction_may_change); int gpiod_export_link(struct device *dev, const char *name, - struct gpio_desc *desc); + struct gpio_desc *desc); @@ -458,6 +459,13 @@ void gpiod_unexport(struct gpio_desc *de - + #else /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */ - + +static inline int _gpiod_export(struct gpio_desc *desc, + bool direction_may_change, + const char *name) @@ -162,5 +162,5 @@ Signed-off-by: John Crispin +} + static inline int gpiod_export(struct gpio_desc *desc, - bool direction_may_change) + bool direction_may_change) { diff --git a/target/linux/ipq806x/patches-4.14/0067-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/ipq806x/patches-4.14/0067-generic-Mangle-bootloader-s-kernel-arguments.patch index 98c2ba1faa..c7123eac52 100644 --- a/target/linux/ipq806x/patches-4.14/0067-generic-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/ipq806x/patches-4.14/0067-generic-Mangle-bootloader-s-kernel-arguments.patch @@ -23,9 +23,9 @@ Signed-off-by: Adrian Panella --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1938,6 +1938,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN - The command-line arguments provided by the boot loader will be - appended to the the device tree bootargs property. - + The command-line arguments provided by the boot loader will be + appended to the the device tree bootargs property. + +config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE + bool "Append rootblock parsing bootloader's kernel arguments" + help @@ -38,12 +38,12 @@ Signed-off-by: Adrian Panella + sent by bootloader will be ignored. + endchoice - + config CMDLINE --- a/arch/arm/boot/compressed/atags_to_fdt.c +++ b/arch/arm/boot/compressed/atags_to_fdt.c @@ -4,6 +4,8 @@ - + #if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND) #define do_extend_cmdline 1 +#elif defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) @@ -52,9 +52,9 @@ Signed-off-by: Adrian Panella #define do_extend_cmdline 0 #endif @@ -67,6 +69,59 @@ static uint32_t get_cell_size(const void - return cell_size; + return cell_size; } - + +#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) + +static char *append_rootblock(char *dest, const char *str, int len, void *fdt) @@ -110,11 +110,11 @@ Signed-off-by: Adrian Panella + static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline) { - char cmdline[COMMAND_LINE_SIZE]; + char cmdline[COMMAND_LINE_SIZE]; @@ -86,12 +141,21 @@ static void merge_fdt_bootargs(void *fdt - - /* and append the ATAG_CMDLINE */ - if (fdt_cmdline) { + + /* and append the ATAG_CMDLINE */ + if (fdt_cmdline) { + +#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) + //save original bootloader args @@ -123,55 +123,55 @@ Signed-off-by: Adrian Panella + ptr = append_rootblock(ptr, fdt_cmdline, len, fdt); + +#else - len = strlen(fdt_cmdline); - if (ptr - cmdline + len + 2 < COMMAND_LINE_SIZE) { - *ptr++ = ' '; - memcpy(ptr, fdt_cmdline, len); - ptr += len; - } + len = strlen(fdt_cmdline); + if (ptr - cmdline + len + 2 < COMMAND_LINE_SIZE) { + *ptr++ = ' '; + memcpy(ptr, fdt_cmdline, len); + ptr += len; + } +#endif - } - *ptr = '\0'; - + } + *ptr = '\0'; + @@ -148,7 +212,9 @@ int atags_to_fdt(void *atag_list, void * - else - setprop_string(fdt, "/chosen", "bootargs", - atag->u.cmdline.cmdline); + else + setprop_string(fdt, "/chosen", "bootargs", + atag->u.cmdline.cmdline); - } else if (atag->hdr.tag == ATAG_MEM) { + } +#ifndef CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE + else if (atag->hdr.tag == ATAG_MEM) { - if (memcount >= sizeof(mem_reg_property)/4) - continue; - if (!atag->u.mem.size) + if (memcount >= sizeof(mem_reg_property)/4) + continue; + if (!atag->u.mem.size) @@ -187,6 +253,10 @@ int atags_to_fdt(void *atag_list, void * - setprop(fdt, "/memory", "reg", mem_reg_property, - 4 * memcount * memsize); - } + setprop(fdt, "/memory", "reg", mem_reg_property, + 4 * memcount * memsize); + } +#else + + } +#endif - - return fdt_pack(fdt); + + return fdt_pack(fdt); } --- a/init/main.c +++ b/init/main.c @@ -95,6 +95,10 @@ #include #include - + +#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) +#include +#endif + static int kernel_init(void *); - + extern void init_IRQ(void); @@ -574,6 +578,18 @@ asmlinkage __visible void __init start_k - page_alloc_init(); - - pr_notice("Kernel command line: %s\n", boot_command_line); + page_alloc_init(); + + pr_notice("Kernel command line: %s\n", boot_command_line); + +#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) + //Show bootloader's original command line for reference @@ -184,6 +184,6 @@ Signed-off-by: Adrian Panella + } +#endif + - parse_early_param(); - after_dashes = parse_args("Booting kernel", - static_command_line, __start___param, + parse_early_param(); + after_dashes = parse_args("Booting kernel", + static_command_line, __start___param, diff --git a/target/linux/ipq806x/patches-4.14/0069-arm-boot-add-dts-files.patch b/target/linux/ipq806x/patches-4.14/0069-arm-boot-add-dts-files.patch index d9cd2bb7d2..fead994c00 100644 --- a/target/linux/ipq806x/patches-4.14/0069-arm-boot-add-dts-files.patch +++ b/target/linux/ipq806x/patches-4.14/0069-arm-boot-add-dts-files.patch @@ -11,9 +11,9 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -699,6 +699,15 @@ dtb-$(CONFIG_ARCH_QCOM) += \ - qcom-apq8084-mtp.dtb \ - qcom-ipq4019-ap.dk01.1-c1.dtb \ - qcom-ipq8064-ap148.dtb \ + qcom-apq8084-mtp.dtb \ + qcom-ipq4019-ap.dk01.1-c1.dtb \ + qcom-ipq8064-ap148.dtb \ + qcom-ipq8064-c2600.dtb \ + qcom-ipq8064-d7800.dtb \ + qcom-ipq8064-db149.dtb \ @@ -23,6 +23,6 @@ Signed-off-by: John Crispin + qcom-ipq8064-wpq864.dtb \ + qcom-ipq8065-nbg6817.dtb \ + qcom-ipq8065-r7800.dtb \ - qcom-msm8660-surf.dtb \ - qcom-msm8960-cdp.dtb \ - qcom-msm8974-lge-nexus5-hammerhead.dtb \ + qcom-msm8660-surf.dtb \ + qcom-msm8960-cdp.dtb \ + qcom-msm8974-lge-nexus5-hammerhead.dtb \ diff --git a/target/linux/ipq806x/patches-4.14/0070-qcom-spm-fix-probe-order.patch b/target/linux/ipq806x/patches-4.14/0070-qcom-spm-fix-probe-order.patch index 78bc5fc3e3..b7e375dfb2 100644 --- a/target/linux/ipq806x/patches-4.14/0070-qcom-spm-fix-probe-order.patch +++ b/target/linux/ipq806x/patches-4.14/0070-qcom-spm-fix-probe-order.patch @@ -5,12 +5,12 @@ Signed-off-by: Felix Fietkau --- a/drivers/soc/qcom/spm.c +++ b/drivers/soc/qcom/spm.c @@ -219,6 +219,9 @@ static int __init qcom_cpuidle_init(stru - cpumask_t mask; - bool use_scm_power_down = false; - + cpumask_t mask; + bool use_scm_power_down = false; + + if (!qcom_scm_is_available()) + return -EPROBE_DEFER; + - for (i = 0; ; i++) { - state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i); - if (!state_node) + for (i = 0; ; i++) { + state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i); + if (!state_node) diff --git a/target/linux/ipq806x/patches-4.14/0071-1-PCI-qcom-Fixed-IPQ806x-specific-clocks.patch b/target/linux/ipq806x/patches-4.14/0071-1-PCI-qcom-Fixed-IPQ806x-specific-clocks.patch index 550c92e27c..b9f6e33be6 100644 --- a/target/linux/ipq806x/patches-4.14/0071-1-PCI-qcom-Fixed-IPQ806x-specific-clocks.patch +++ b/target/linux/ipq806x/patches-4.14/0071-1-PCI-qcom-Fixed-IPQ806x-specific-clocks.patch @@ -11,19 +11,19 @@ Signed-off-by: Sham Muthayyan --- a/drivers/pci/dwc/pcie-qcom.c +++ b/drivers/pci/dwc/pcie-qcom.c -@@ -91,6 +91,8 @@ - struct clk *iface_clk; - struct clk *core_clk; - struct clk *phy_clk; +@@ -91,6 +91,8 @@ struct qcom_pcie_resources_2_1_0 { + struct clk *iface_clk; + struct clk *core_clk; + struct clk *phy_clk; + struct clk *aux_clk; + struct clk *ref_clk; - struct reset_control *pci_reset; - struct reset_control *axi_reset; - struct reset_control *ahb_reset; -@@ -249,6 +251,14 @@ - if (IS_ERR(res->phy_clk)) - return PTR_ERR(res->phy_clk); - + struct reset_control *pci_reset; + struct reset_control *axi_reset; + struct reset_control *ahb_reset; +@@ -249,6 +251,14 @@ static int qcom_pcie_get_resources_2_1_0 + if (IS_ERR(res->phy_clk)) + return PTR_ERR(res->phy_clk); + + res->aux_clk = devm_clk_get(dev, "aux"); + if (IS_ERR(res->aux_clk)) + return PTR_ERR(res->aux_clk); @@ -32,37 +32,37 @@ Signed-off-by: Sham Muthayyan + if (IS_ERR(res->ref_clk)) + return PTR_ERR(res->ref_clk); + - res->pci_reset = devm_reset_control_get_exclusive(dev, "pci"); - if (IS_ERR(res->pci_reset)) - return PTR_ERR(res->pci_reset); -@@ -281,6 +291,8 @@ - clk_disable_unprepare(res->iface_clk); - clk_disable_unprepare(res->core_clk); - clk_disable_unprepare(res->phy_clk); + res->pci_reset = devm_reset_control_get_exclusive(dev, "pci"); + if (IS_ERR(res->pci_reset)) + return PTR_ERR(res->pci_reset); +@@ -281,6 +291,8 @@ static void qcom_pcie_deinit_2_1_0(struc + clk_disable_unprepare(res->iface_clk); + clk_disable_unprepare(res->core_clk); + clk_disable_unprepare(res->phy_clk); + clk_disable_unprepare(res->aux_clk); + clk_disable_unprepare(res->ref_clk); - regulator_disable(res->vdda); - regulator_disable(res->vdda_phy); - regulator_disable(res->vdda_refclk); -@@ -324,16 +336,28 @@ - goto err_assert_ahb; - } - + regulator_disable(res->vdda); + regulator_disable(res->vdda_phy); + regulator_disable(res->vdda_refclk); +@@ -324,16 +336,28 @@ static int qcom_pcie_init_2_1_0(struct q + goto err_assert_ahb; + } + + ret = clk_prepare_enable(res->core_clk); + if (ret) { + dev_err(dev, "cannot prepare/enable core clock\n"); + goto err_clk_core; + } + - ret = clk_prepare_enable(res->phy_clk); - if (ret) { - dev_err(dev, "cannot prepare/enable phy clock\n"); - goto err_clk_phy; - } - + ret = clk_prepare_enable(res->phy_clk); + if (ret) { + dev_err(dev, "cannot prepare/enable phy clock\n"); + goto err_clk_phy; + } + - ret = clk_prepare_enable(res->core_clk); + ret = clk_prepare_enable(res->aux_clk); - if (ret) { + if (ret) { - dev_err(dev, "cannot prepare/enable core clock\n"); - goto err_clk_core; + dev_err(dev, "cannot prepare/enable aux clock\n"); @@ -73,12 +73,12 @@ Signed-off-by: Sham Muthayyan + if (ret) { + dev_err(dev, "cannot prepare/enable ref clock\n"); + goto err_clk_ref; - } - - ret = reset_control_deassert(res->ahb_reset); -@@ -389,10 +413,14 @@ - return 0; - + } + + ret = reset_control_deassert(res->ahb_reset); +@@ -389,10 +413,14 @@ static int qcom_pcie_init_2_1_0(struct q + return 0; + err_deassert_ahb: - clk_disable_unprepare(res->core_clk); -err_clk_core: @@ -86,10 +86,10 @@ Signed-off-by: Sham Muthayyan +err_clk_ref: + clk_disable_unprepare(res->aux_clk); +err_clk_aux: - clk_disable_unprepare(res->phy_clk); + clk_disable_unprepare(res->phy_clk); err_clk_phy: + clk_disable_unprepare(res->core_clk); +err_clk_core: - clk_disable_unprepare(res->iface_clk); + clk_disable_unprepare(res->iface_clk); err_assert_ahb: - regulator_disable(res->vdda_phy); + regulator_disable(res->vdda_phy); diff --git a/target/linux/ipq806x/patches-4.14/0071-2-PCI-qcom-Fixed-IPQ806x-PCIE-reset-changes.patch b/target/linux/ipq806x/patches-4.14/0071-2-PCI-qcom-Fixed-IPQ806x-PCIE-reset-changes.patch index a2ae1e064b..8b9e5ff5d1 100644 --- a/target/linux/ipq806x/patches-4.14/0071-2-PCI-qcom-Fixed-IPQ806x-PCIE-reset-changes.patch +++ b/target/linux/ipq806x/patches-4.14/0071-2-PCI-qcom-Fixed-IPQ806x-PCIE-reset-changes.patch @@ -11,7 +11,7 @@ Signed-off-by: Sham Muthayyan --- a/drivers/pci/dwc/pcie-qcom.c +++ b/drivers/pci/dwc/pcie-qcom.c -@@ -98,6 +98,7 @@ +@@ -98,6 +98,7 @@ struct qcom_pcie_resources_2_1_0 { struct reset_control *ahb_reset; struct reset_control *por_reset; struct reset_control *phy_reset; @@ -19,10 +19,10 @@ Signed-off-by: Sham Muthayyan struct regulator *vdda; struct regulator *vdda_phy; struct regulator *vdda_refclk; -@@ -275,6 +276,10 @@ +@@ -275,6 +276,10 @@ static int qcom_pcie_get_resources_2_1_0 if (IS_ERR(res->por_reset)) return PTR_ERR(res->por_reset); - + + res->ext_reset = devm_reset_control_get(dev, "ext"); + if (IS_ERR(res->ext_reset)) + return PTR_ERR(res->ext_reset); @@ -30,7 +30,7 @@ Signed-off-by: Sham Muthayyan res->phy_reset = devm_reset_control_get_exclusive(dev, "phy"); return PTR_ERR_OR_ZERO(res->phy_reset); } -@@ -288,6 +293,7 @@ +@@ -288,6 +293,7 @@ static void qcom_pcie_deinit_2_1_0(struc reset_control_assert(res->ahb_reset); reset_control_assert(res->por_reset); reset_control_assert(res->pci_reset); @@ -38,10 +38,10 @@ Signed-off-by: Sham Muthayyan clk_disable_unprepare(res->iface_clk); clk_disable_unprepare(res->core_clk); clk_disable_unprepare(res->phy_clk); -@@ -306,6 +312,12 @@ +@@ -306,6 +312,12 @@ static int qcom_pcie_init_2_1_0(struct q u32 val; int ret; - + + ret = reset_control_assert(res->ahb_reset); + if (ret) { + dev_err(dev, "cannot assert ahb reset\n"); @@ -51,10 +51,10 @@ Signed-off-by: Sham Muthayyan ret = regulator_enable(res->vdda); if (ret) { dev_err(dev, "cannot enable vdda regulator\n"); -@@ -324,16 +336,16 @@ +@@ -324,16 +336,16 @@ static int qcom_pcie_init_2_1_0(struct q goto err_vdda_phy; } - + - ret = reset_control_assert(res->ahb_reset); + ret = reset_control_deassert(res->ext_reset); if (ret) { @@ -63,16 +63,16 @@ Signed-off-by: Sham Muthayyan + dev_err(dev, "cannot assert ext reset\n"); + goto err_reset_ext; } - + ret = clk_prepare_enable(res->iface_clk); if (ret) { dev_err(dev, "cannot prepare/enable iface clock\n"); - goto err_assert_ahb; + goto err_iface; } - + ret = clk_prepare_enable(res->core_clk); -@@ -422,7 +434,9 @@ +@@ -422,7 +434,9 @@ err_clk_phy: clk_disable_unprepare(res->core_clk); err_clk_core: clk_disable_unprepare(res->iface_clk); diff --git a/target/linux/ipq806x/patches-4.14/0071-3-PCI-qcom-Fixed-IPQ806x-PCIE-init-changes.patch b/target/linux/ipq806x/patches-4.14/0071-3-PCI-qcom-Fixed-IPQ806x-PCIE-init-changes.patch index 0c2910f3af..57ee082c83 100644 --- a/target/linux/ipq806x/patches-4.14/0071-3-PCI-qcom-Fixed-IPQ806x-PCIE-init-changes.patch +++ b/target/linux/ipq806x/patches-4.14/0071-3-PCI-qcom-Fixed-IPQ806x-PCIE-init-changes.patch @@ -13,7 +13,7 @@ Signed-off-by: Sham Muthayyan +++ b/drivers/pci/dwc/pcie-qcom.c @@ -52,7 +52,13 @@ #define PCIE_CAP_CPL_TIMEOUT_DISABLE 0x10 - + #define PCIE20_PARF_PHY_CTRL 0x40 +#define PHY_CTRL_PHY_TX0_TERM_OFFSET_MASK (0x1f << 16) +#define PHY_CTRL_PHY_TX0_TERM_OFFSET(x) (x << 16) @@ -27,7 +27,7 @@ Signed-off-by: Sham Muthayyan #define PCIE20_PARF_MHI_CLOCK_RESET_CTRL 0x174 @@ -83,6 +89,18 @@ #define DBI_RO_WR_EN 1 - + #define PERST_DELAY_US 1000 +/* PARF registers */ +#define PCIE20_PARF_PCS_DEEMPH 0x34 @@ -41,21 +41,21 @@ Signed-off-by: Sham Muthayyan + +#define PCIE20_PARF_CONFIG_BITS 0x50 +#define PHY_RX0_EQ(x) (x << 24) - + #define PCIE20_v3_PARF_SLV_ADDR_SPACE_SIZE 0x358 #define SLV_ADDR_SPACE_SZ 0x10000000 -@@ -102,6 +120,7 @@ +@@ -102,6 +120,7 @@ struct qcom_pcie_resources_2_1_0 { struct regulator *vdda; struct regulator *vdda_phy; struct regulator *vdda_refclk; + uint8_t phy_tx0_term_offset; }; - + struct qcom_pcie_resources_1_0_0 { -@@ -179,6 +198,16 @@ - +@@ -179,6 +198,16 @@ struct qcom_pcie { + #define to_qcom_pcie(x) dev_get_drvdata((x)->dev) - + +static inline void +writel_masked(void __iomem *addr, u32 clear_mask, u32 set_mask) +{ @@ -69,10 +69,10 @@ Signed-off-by: Sham Muthayyan static void qcom_ep_reset_assert(struct qcom_pcie *pcie) { gpiod_set_value_cansleep(pcie->reset, 1); -@@ -280,6 +309,10 @@ +@@ -280,6 +309,10 @@ static int qcom_pcie_get_resources_2_1_0 if (IS_ERR(res->ext_reset)) return PTR_ERR(res->ext_reset); - + + if (of_property_read_u8(dev->of_node, "phy-tx0-term-offset", + &res->phy_tx0_term_offset)) + res->phy_tx0_term_offset = 0; @@ -80,18 +80,18 @@ Signed-off-by: Sham Muthayyan res->phy_reset = devm_reset_control_get_exclusive(dev, "phy"); return PTR_ERR_OR_ZERO(res->phy_reset); } -@@ -309,7 +342,6 @@ +@@ -309,7 +342,6 @@ static int qcom_pcie_init_2_1_0(struct q struct qcom_pcie_resources_2_1_0 *res = &pcie->res.v2_1_0; struct dw_pcie *pci = pcie->pci; struct device *dev = pci->dev; - u32 val; int ret; - + ret = reset_control_assert(res->ahb_reset); -@@ -378,15 +410,26 @@ +@@ -378,15 +410,26 @@ static int qcom_pcie_init_2_1_0(struct q goto err_deassert_ahb; } - + - /* enable PCIe clocks and resets */ - val = readl(pcie->parf + PCIE20_PARF_PHY_CTRL); - val &= ~BIT(0); @@ -121,6 +121,6 @@ Signed-off-by: Sham Muthayyan + /* Enable reference clock */ + writel_masked(pcie->parf + PCIE20_PARF_PHY_REFCLK, + REF_USE_PAD, REF_SSP_EN); - + ret = reset_control_deassert(res->phy_reset); if (ret) { diff --git a/target/linux/ipq806x/patches-4.14/0071-5-PCI-qcom-Programming-the-PCIE-iATU-for-IPQ806x.patch b/target/linux/ipq806x/patches-4.14/0071-5-PCI-qcom-Programming-the-PCIE-iATU-for-IPQ806x.patch index 1b19d6fcc2..92100481c8 100644 --- a/target/linux/ipq806x/patches-4.14/0071-5-PCI-qcom-Programming-the-PCIE-iATU-for-IPQ806x.patch +++ b/target/linux/ipq806x/patches-4.14/0071-5-PCI-qcom-Programming-the-PCIE-iATU-for-IPQ806x.patch @@ -16,7 +16,7 @@ Signed-off-by: Sham Muthayyan @@ -83,6 +83,30 @@ #define PCIE20_CAP_LINK_1 (PCIE20_CAP + 0x14) #define PCIE_CAP_LINK1_VAL 0x2FD7F - + +#define PCIE20_CAP_LINKCTRLSTATUS (PCIE20_CAP + 0x10) + +#define PCIE20_AXI_MSTR_RESP_COMP_CTRL0 0x818 @@ -42,12 +42,12 @@ Signed-off-by: Sham Muthayyan +#define MSM_PCIE_DEV_CFG_ADDR 0x01000000 + #define PCIE20_PARF_Q2A_FLUSH 0x1AC - + #define PCIE20_MISC_CONTROL_1_REG 0x8BC -@@ -251,6 +275,57 @@ - writel(val, pcie->elbi + PCIE20_ELBI_SYS_CTRL); +@@ -251,6 +275,57 @@ static void qcom_pcie_2_1_0_ltssm_enable + writel(val, pcie->elbi + PCIE20_ELBI_SYS_CTRL); } - + +static void qcom_pcie_prog_viewport_cfg0(struct qcom_pcie *pcie, u32 busdev) +{ + struct pcie_port *pp = &pcie->pci->pp; @@ -101,14 +101,14 @@ Signed-off-by: Sham Muthayyan + static int qcom_pcie_get_resources_2_1_0(struct qcom_pcie *pcie) { - struct qcom_pcie_resources_2_1_0 *res = &pcie->res.v2_1_0; -@@ -465,6 +538,9 @@ - writel(CFG_BRIDGE_SB_INIT, - pci->dbi_base + PCIE20_AXI_MSTR_RESP_COMP_CTRL1); - + struct qcom_pcie_resources_2_1_0 *res = &pcie->res.v2_1_0; +@@ -465,6 +540,9 @@ static int qcom_pcie_init_2_1_0(struct q + writel(CFG_BRIDGE_SB_INIT, + pci->dbi_base + PCIE20_AXI_MSTR_RESP_COMP_CTRL1); + + qcom_pcie_prog_viewport_cfg0(pcie, MSM_PCIE_DEV_CFG_ADDR); + qcom_pcie_prog_viewport_mem2_outbound(pcie); + - return 0; - + return 0; + err_deassert_ahb: diff --git a/target/linux/ipq806x/patches-4.14/0071-6-PCI-qcom-Force-GEN1-support.patch b/target/linux/ipq806x/patches-4.14/0071-6-PCI-qcom-Force-GEN1-support.patch index f623532bdb..5dea084bfa 100644 --- a/target/linux/ipq806x/patches-4.14/0071-6-PCI-qcom-Force-GEN1-support.patch +++ b/target/linux/ipq806x/patches-4.14/0071-6-PCI-qcom-Force-GEN1-support.patch @@ -14,48 +14,48 @@ Signed-off-by: Sham Muthayyan @@ -129,6 +129,8 @@ #define PCIE20_v3_PARF_SLV_ADDR_SPACE_SIZE 0x358 #define SLV_ADDR_SPACE_SZ 0x10000000 - + +#define PCIE20_LNK_CONTROL2_LINK_STATUS2 0xA0 + struct qcom_pcie_resources_2_1_0 { - struct clk *iface_clk; - struct clk *core_clk; -@@ -218,6 +220,7 @@ - struct phy *phy; - struct gpio_desc *reset; - struct qcom_pcie_ops *ops; + struct clk *iface_clk; + struct clk *core_clk; +@@ -218,6 +220,7 @@ struct qcom_pcie { + struct phy *phy; + struct gpio_desc *reset; + struct qcom_pcie_ops *ops; + uint32_t force_gen1; }; - + #define to_qcom_pcie(x) dev_get_drvdata((x)->dev) -@@ -532,6 +535,11 @@ - - /* wait for clock acquisition */ - usleep_range(1000, 1500); +@@ -532,6 +535,11 @@ static int qcom_pcie_init_2_1_0(struct q + + /* wait for clock acquisition */ + usleep_range(1000, 1500); + if (pcie->force_gen1) { + writel_relaxed((readl_relaxed( + pcie->pci->dbi_base + PCIE20_LNK_CONTROL2_LINK_STATUS2) | 1), + pcie->pci->dbi_base + PCIE20_LNK_CONTROL2_LINK_STATUS2); + } - - - /* Set the Max TLP size to 2K, instead of using default of 4K */ -@@ -1382,6 +1390,8 @@ - struct dw_pcie *pci; - struct qcom_pcie *pcie; - int ret; + + + /* Set the Max TLP size to 2K, instead of using default of 4K */ +@@ -1382,6 +1390,8 @@ static int qcom_pcie_probe(struct platfo + struct dw_pcie *pci; + struct qcom_pcie *pcie; + int ret; + uint32_t force_gen1 = 0; + struct device_node *np = pdev->dev.of_node; - - pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); - if (!pcie) -@@ -1403,6 +1413,9 @@ - if (IS_ERR(pcie->reset)) - return PTR_ERR(pcie->reset); - + + pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); + if (!pcie) +@@ -1403,6 +1413,9 @@ static int qcom_pcie_probe(struct platfo + if (IS_ERR(pcie->reset)) + return PTR_ERR(pcie->reset); + + of_property_read_u32(np, "force_gen1", &force_gen1); + pcie->force_gen1 = force_gen1; + - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "parf"); - pcie->parf = devm_ioremap_resource(dev, res); - if (IS_ERR(pcie->parf)) + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "parf"); + pcie->parf = devm_ioremap_resource(dev, res); + if (IS_ERR(pcie->parf)) diff --git a/target/linux/ipq806x/patches-4.14/0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch b/target/linux/ipq806x/patches-4.14/0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch index c70cd0bf86..c7dfd53cb1 100644 --- a/target/linux/ipq806x/patches-4.14/0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch +++ b/target/linux/ipq806x/patches-4.14/0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch @@ -17,9 +17,9 @@ Signed-off-by: Gokul Sriram Palanisamy --- a/drivers/pci/dwc/pcie-qcom.c +++ b/drivers/pci/dwc/pcie-qcom.c @@ -131,6 +131,14 @@ - + #define PCIE20_LNK_CONTROL2_LINK_STATUS2 0xA0 - + +#define __set(v, a, b) (((v) << (b)) & GENMASK(a, b)) +#define __mask(a, b) (((1 << ((a) + 1)) - 1) & ~((1 << (b)) - 1)) +#define PCIE20_DEV_CAS 0x78 @@ -29,12 +29,12 @@ Signed-off-by: Gokul Sriram Palanisamy +#define PCIE20_MPS(x) __set(x, 7, 5) + struct qcom_pcie_resources_2_1_0 { - struct clk *iface_clk; - struct clk *core_clk; -@@ -1472,6 +1480,35 @@ - return 0; + struct clk *iface_clk; + struct clk *core_clk; +@@ -1472,6 +1480,35 @@ static int qcom_pcie_probe(struct platfo + return 0; } - + +static void qcom_pcie_fixup_final(struct pci_dev *dev) +{ + int cap, err; @@ -65,5 +65,5 @@ Signed-off-by: Gokul Sriram Palanisamy +DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, qcom_pcie_fixup_final); + static const struct of_device_id qcom_pcie_match[] = { - { .compatible = "qcom,pcie-apq8084", .data = &ops_1_0_0 }, - { .compatible = "qcom,pcie-ipq8064", .data = &ops_2_1_0 }, + { .compatible = "qcom,pcie-apq8084", .data = &ops_1_0_0 }, + { .compatible = "qcom,pcie-ipq8064", .data = &ops_2_1_0 }, diff --git a/target/linux/ipq806x/patches-4.14/0071-8-pcie-qcom-Fixed-pcie_phy_clk-branch-issue.patch b/target/linux/ipq806x/patches-4.14/0071-8-pcie-qcom-Fixed-pcie_phy_clk-branch-issue.patch index 74f666dd5d..88bd7730c1 100644 --- a/target/linux/ipq806x/patches-4.14/0071-8-pcie-qcom-Fixed-pcie_phy_clk-branch-issue.patch +++ b/target/linux/ipq806x/patches-4.14/0071-8-pcie-qcom-Fixed-pcie_phy_clk-branch-issue.patch @@ -38,54 +38,54 @@ Signed-off-by: Abhishek Sahu --- a/drivers/pci/dwc/pcie-qcom.c +++ b/drivers/pci/dwc/pcie-qcom.c -@@ -407,6 +407,7 @@ +@@ -407,6 +407,7 @@ static void qcom_pcie_deinit_2_1_0(struc { - struct qcom_pcie_resources_2_1_0 *res = &pcie->res.v2_1_0; - + struct qcom_pcie_resources_2_1_0 *res = &pcie->res.v2_1_0; + + clk_disable_unprepare(res->phy_clk); - reset_control_assert(res->pci_reset); - reset_control_assert(res->axi_reset); - reset_control_assert(res->ahb_reset); -@@ -415,7 +415,6 @@ - reset_control_assert(res->ext_reset); - clk_disable_unprepare(res->iface_clk); - clk_disable_unprepare(res->core_clk); + reset_control_assert(res->pci_reset); + reset_control_assert(res->axi_reset); + reset_control_assert(res->ahb_reset); +@@ -415,7 +416,6 @@ static void qcom_pcie_deinit_2_1_0(struc + reset_control_assert(res->ext_reset); + clk_disable_unprepare(res->iface_clk); + clk_disable_unprepare(res->core_clk); - clk_disable_unprepare(res->phy_clk); - clk_disable_unprepare(res->aux_clk); - clk_disable_unprepare(res->ref_clk); - regulator_disable(res->vdda); -@@ -472,12 +472,6 @@ - goto err_clk_core; - } - + clk_disable_unprepare(res->aux_clk); + clk_disable_unprepare(res->ref_clk); + regulator_disable(res->vdda); +@@ -472,12 +472,6 @@ static int qcom_pcie_init_2_1_0(struct q + goto err_clk_core; + } + - ret = clk_prepare_enable(res->phy_clk); - if (ret) { - dev_err(dev, "cannot prepare/enable phy clock\n"); - goto err_clk_phy; - } - - ret = clk_prepare_enable(res->aux_clk); - if (ret) { - dev_err(dev, "cannot prepare/enable aux clock\n"); -@@ -541,6 +535,12 @@ - return ret; - } - + ret = clk_prepare_enable(res->aux_clk); + if (ret) { + dev_err(dev, "cannot prepare/enable aux clock\n"); +@@ -541,6 +535,12 @@ static int qcom_pcie_init_2_1_0(struct q + return ret; + } + + ret = clk_prepare_enable(res->phy_clk); + if (ret) { + dev_err(dev, "cannot prepare/enable phy clock\n"); + goto err_deassert_ahb; + } + - /* wait for clock acquisition */ - usleep_range(1000, 1500); - if (pcie->force_gen1) { -@@ -566,8 +566,6 @@ + /* wait for clock acquisition */ + usleep_range(1000, 1500); + if (pcie->force_gen1) { +@@ -566,8 +566,6 @@ err_deassert_ahb: err_clk_ref: - clk_disable_unprepare(res->aux_clk); + clk_disable_unprepare(res->aux_clk); err_clk_aux: - clk_disable_unprepare(res->phy_clk); -err_clk_phy: - clk_disable_unprepare(res->core_clk); + clk_disable_unprepare(res->core_clk); err_clk_core: - clk_disable_unprepare(res->iface_clk); + clk_disable_unprepare(res->iface_clk); diff --git a/target/linux/ipq806x/patches-4.14/0071-9-pcie-qcom-change-duplicate-pci-reset-to-phy-reset.patch b/target/linux/ipq806x/patches-4.14/0071-9-pcie-qcom-change-duplicate-pci-reset-to-phy-reset.patch index 21cee46ff5..227a1b4e7a 100644 --- a/target/linux/ipq806x/patches-4.14/0071-9-pcie-qcom-change-duplicate-pci-reset-to-phy-reset.patch +++ b/target/linux/ipq806x/patches-4.14/0071-9-pcie-qcom-change-duplicate-pci-reset-to-phy-reset.patch @@ -14,12 +14,12 @@ Signed-off-by: Abhishek Sahu --- a/drivers/pci/dwc/pcie-qcom.c +++ b/drivers/pci/dwc/pcie-qcom.c -@@ -408,7 +408,7 @@ - struct qcom_pcie_resources_2_1_0 *res = &pcie->res.v2_1_0; - - clk_disable_unprepare(res->phy_clk); +@@ -408,7 +408,7 @@ static void qcom_pcie_deinit_2_1_0(struc + struct qcom_pcie_resources_2_1_0 *res = &pcie->res.v2_1_0; + + clk_disable_unprepare(res->phy_clk); - reset_control_assert(res->pci_reset); + reset_control_assert(res->phy_reset); - reset_control_assert(res->axi_reset); - reset_control_assert(res->ahb_reset); - reset_control_assert(res->por_reset); + reset_control_assert(res->axi_reset); + reset_control_assert(res->ahb_reset); + reset_control_assert(res->por_reset); diff --git a/target/linux/ipq806x/patches-4.14/0072-add-ipq806x-with-no-clocks.patch b/target/linux/ipq806x/patches-4.14/0072-add-ipq806x-with-no-clocks.patch index a29c67872a..035281f66a 100644 --- a/target/linux/ipq806x/patches-4.14/0072-add-ipq806x-with-no-clocks.patch +++ b/target/linux/ipq806x/patches-4.14/0072-add-ipq806x-with-no-clocks.patch @@ -1,12 +1,12 @@ --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c -@@ -422,6 +422,9 @@ - { .compatible = "qcom,scm-msm8996", - .data = NULL, /* no clocks */ - }, +@@ -422,6 +422,9 @@ static const struct of_device_id qcom_sc + { .compatible = "qcom,scm-msm8996", + .data = NULL, /* no clocks */ + }, + { .compatible = "qcom,scm-ipq806x", + .data = NULL, /* no clocks */ + }, - { .compatible = "qcom,scm", - .data = (void *)(SCM_HAS_CORE_CLK - | SCM_HAS_IFACE_CLK + { .compatible = "qcom,scm", + .data = (void *)(SCM_HAS_CORE_CLK + | SCM_HAS_IFACE_CLK diff --git a/target/linux/ipq806x/patches-4.14/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch b/target/linux/ipq806x/patches-4.14/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch index 89e7490d77..c92393495b 100644 --- a/target/linux/ipq806x/patches-4.14/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch +++ b/target/linux/ipq806x/patches-4.14/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch @@ -21,10 +21,10 @@ Signed-off-by: Ajay Kishore --- a/drivers/firmware/qcom_scm-32.c +++ b/drivers/firmware/qcom_scm-32.c -@@ -561,6 +561,24 @@ - return ret ? : le32_to_cpu(out); +@@ -561,6 +561,24 @@ int __qcom_scm_pas_mss_reset(struct devi + return ret ? : le32_to_cpu(out); } - + +int __qcom_scm_pinmux_read(u32 svc_id, u32 cmd_id, u32 arg1) +{ + s32 ret; @@ -45,13 +45,13 @@ Signed-off-by: Ajay Kishore + int __qcom_scm_set_remote_state(struct device *dev, u32 state, u32 id) { - struct { + struct { --- a/drivers/firmware/qcom_scm-64.c +++ b/drivers/firmware/qcom_scm-64.c -@@ -366,6 +366,16 @@ - return ret ? : res.a1; +@@ -366,6 +366,16 @@ int __qcom_scm_pas_mss_reset(struct devi + return ret ? : res.a1; } - + +int __qcom_scm_pinmux_read(u32 svc_id, u32 cmd_id, u32 arg1) +{ + return -ENOTSUPP; @@ -64,11 +64,11 @@ Signed-off-by: Ajay Kishore + int __qcom_scm_set_remote_state(struct device *dev, u32 state, u32 id) { - struct qcom_scm_desc desc = {0}; + struct qcom_scm_desc desc = {0}; --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -470,3 +470,16 @@ static int __init qcom_scm_init(void) - return platform_driver_register(&qcom_scm_driver); + return platform_driver_register(&qcom_scm_driver); } subsys_initcall(qcom_scm_init); + @@ -89,7 +89,7 @@ Signed-off-by: Ajay Kishore @@ -58,6 +58,13 @@ extern int __qcom_scm_pas_auth_and_rese extern int __qcom_scm_pas_shutdown(struct device *dev, u32 peripheral); extern int __qcom_scm_pas_mss_reset(struct device *dev, bool reset); - + +#define SCM_IO_READ 1 +#define SCM_IO_WRITE 2 +#define SCM_SVC_IO_ACCESS 0x5 @@ -112,23 +112,23 @@ Signed-off-by: Ajay Kishore #include "../core.h" #include "../pinconf.h" #include "pinctrl-msm.h" -@@ -638,6 +639,9 @@ static int msm_gpio_irq_set_type(struct - const struct msm_pingroup *g; - unsigned long flags; - u32 val; +@@ -638,6 +639,9 @@ static void msm_gpio_irq_ack(struct irq_ + const struct msm_pingroup *g; + unsigned long flags; + u32 val; + u32 addr; + int ret; + const __be32 *reg; - - g = &pctrl->soc->groups[d->hwirq]; - + + g = &pctrl->soc->groups[d->hwirq]; + @@ -676,11 +680,30 @@ static int msm_gpio_irq_set_type(struct - else - clear_bit(d->hwirq, pctrl->dual_edge_irqs); - + else + clear_bit(d->hwirq, pctrl->dual_edge_irqs); + + int ret = of_device_is_compatible(pctrl->dev->of_node, + "qcom,ipq8064-pinctrl"); - /* Route interrupts to application cpu */ + /* Route interrupts to application cpu */ - val = readl(pctrl->regs + g->intr_target_reg); - val &= ~(7 << g->intr_target_bit); - val |= g->intr_target_kpss_val << g->intr_target_bit; @@ -154,17 +154,17 @@ Signed-off-by: Ajay Kishore + pr_err("\n Routing interrupts to Apps proc failed"); + } + } - - /* Update configuration for gpio. - * RAW_STATUS_EN is left on for all gpio irqs. Due to the + + /* Update configuration for gpio. + * RAW_STATUS_EN is left on for all gpio irqs. Due to the @@ -954,4 +977,3 @@ int msm_pinctrl_remove(struct platform_d - return 0; + return 0; } EXPORT_SYMBOL(msm_pinctrl_remove); - --- a/include/linux/qcom_scm.h +++ b/include/linux/qcom_scm.h -@@ -43,6 +43,8 @@ +@@ -43,6 +43,8 @@ extern int qcom_scm_set_remote_state(u32 extern int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare); extern int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size); extern int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare); @@ -173,7 +173,7 @@ Signed-off-by: Ajay Kishore #else static inline int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus) -@@ -73,5 +75,7 @@ +@@ -73,5 +75,7 @@ qcom_scm_set_remote_state(u32 state,u32 static inline int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare) { return -ENODEV; } static inline int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size) { return -ENODEV; } static inline int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare) { return -ENODEV; } diff --git a/target/linux/ipq806x/patches-4.14/0074-ipq806x-usb-Control-USB-master-reset.patch b/target/linux/ipq806x/patches-4.14/0074-ipq806x-usb-Control-USB-master-reset.patch index fd208e4ffa..24cfd18020 100644 --- a/target/linux/ipq806x/patches-4.14/0074-ipq806x-usb-Control-USB-master-reset.patch +++ b/target/linux/ipq806x/patches-4.14/0074-ipq806x-usb-Control-USB-master-reset.patch @@ -26,19 +26,19 @@ Signed-off-by: Vasudevan Murugesan #include #include #include -@@ -33,6 +34,8 @@ - struct device *dev; - struct clk **clks; - int num_clocks; +@@ -33,6 +34,8 @@ struct dwc3_of_simple { + struct device *dev; + struct clk **clks; + int num_clocks; + struct reset_control *mstr_rst_30_0; + struct reset_control *mstr_rst_30_1; }; - + static int dwc3_of_simple_clk_init(struct dwc3_of_simple *simple, int count) -@@ -102,6 +105,20 @@ - if (ret) - return ret; - +@@ -102,6 +105,20 @@ static int dwc3_of_simple_probe(struct p + if (ret) + return ret; + + simple->mstr_rst_30_0 = devm_reset_control_get(dev, "usb30_0_mstr_rst"); + + if (!IS_ERR(simple->mstr_rst_30_0)) @@ -53,19 +53,19 @@ Signed-off-by: Vasudevan Murugesan + else + dev_dbg(simple->dev, "cannot get handle for USB PHY 1 master reset control\n"); + - ret = of_platform_populate(np, NULL, NULL, dev); - if (ret) { - for (i = 0; i < simple->num_clocks; i++) { -@@ -130,6 +147,12 @@ - clk_put(simple->clks[i]); - } - + ret = of_platform_populate(np, NULL, NULL, dev); + if (ret) { + for (i = 0; i < simple->num_clocks; i++) { +@@ -130,6 +147,12 @@ static int dwc3_of_simple_remove(struct + clk_put(simple->clks[i]); + } + + if (!IS_ERR(simple->mstr_rst_30_0)) + reset_control_assert(simple->mstr_rst_30_0); + + if (!IS_ERR(simple->mstr_rst_30_1)) + reset_control_assert(simple->mstr_rst_30_1); + - of_platform_depopulate(dev); - - pm_runtime_put_sync(dev); + of_platform_depopulate(dev); + + pm_runtime_put_sync(dev); diff --git a/target/linux/ipq806x/patches-4.14/105-mtd-nor-add-mx25l25635f.patch b/target/linux/ipq806x/patches-4.14/105-mtd-nor-add-mx25l25635f.patch index dc9b02f3a6..24a7fda223 100644 --- a/target/linux/ipq806x/patches-4.14/105-mtd-nor-add-mx25l25635f.patch +++ b/target/linux/ipq806x/patches-4.14/105-mtd-nor-add-mx25l25635f.patch @@ -11,12 +11,12 @@ the ubi volume created by the other. --- --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1023,7 +1023,7 @@ - { "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) }, +@@ -1023,7 +1023,7 @@ static const struct flash_info spi_nor_i + { "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) }, - { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "mx25l25635f", INFO(0xc22019, 0, 64 * 1024, 512, SECT_4K) }, - { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) }, - { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, - { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) }, + { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, + { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, diff --git a/target/linux/ipq806x/patches-4.14/310-msm-adhoc-bus-support.patch b/target/linux/ipq806x/patches-4.14/310-msm-adhoc-bus-support.patch index 56f114874c..cd9fd895c5 100644 --- a/target/linux/ipq806x/patches-4.14/310-msm-adhoc-bus-support.patch +++ b/target/linux/ipq806x/patches-4.14/310-msm-adhoc-bus-support.patch @@ -7,20 +7,20 @@ Subject: BUS: add MSM_BUS obj-$(CONFIG_MIPS_CDMM) += mips_cdmm.o obj-$(CONFIG_MVEBU_MBUS) += mvebu-mbus.o +obj-$(CONFIG_BUS_TOPOLOGY_ADHOC)+= msm_bus/ - + # Interconnect bus driver for OMAP SoCs. obj-$(CONFIG_OMAP_INTERCONNECT) += omap_l3_smx.o omap_l3_noc.o --- a/drivers/bus/Kconfig +++ b/drivers/bus/Kconfig @@ -93,6 +93,8 @@ config MVEBU_MBUS - Driver needed for the MBus configuration on Marvell EBU SoCs - (Kirkwood, Dove, Orion5x, MV78XX0 and Armada 370/XP). - + Driver needed for the MBus configuration on Marvell EBU SoCs + (Kirkwood, Dove, Orion5x, MV78XX0 and Armada 370/XP). + +source "drivers/bus/msm_bus/Kconfig" + config OMAP_INTERCONNECT - tristate "OMAP INTERCONNECT DRIVER" - depends on ARCH_OMAP2PLUS + tristate "OMAP INTERCONNECT DRIVER" + depends on ARCH_OMAP2PLUS --- /dev/null +++ b/include/dt-bindings/msm/msm-bus-ids.h @@ -0,0 +1,869 @@ diff --git a/target/linux/ipq806x/patches-4.14/850-soc-add-qualcomm-syscon.patch b/target/linux/ipq806x/patches-4.14/850-soc-add-qualcomm-syscon.patch index c6a9176835..59e277c349 100644 --- a/target/linux/ipq806x/patches-4.14/850-soc-add-qualcomm-syscon.patch +++ b/target/linux/ipq806x/patches-4.14/850-soc-add-qualcomm-syscon.patch @@ -10,9 +10,9 @@ Subject: SoC: add qualcomm syscon --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -78,6 +78,13 @@ config QCOM_SMSM - Say yes here to support the Qualcomm Shared Memory State Machine. - The state machine is represented by bits in shared memory. - + Say yes here to support the Qualcomm Shared Memory State Machine. + The state machine is represented by bits in shared memory. + +config QCOM_TCSR + tristate "QCOM Top Control and Status Registers" + depends on ARCH_QCOM @@ -21,8 +21,8 @@ Subject: SoC: add qualcomm syscon + functions for various peripherals. + config QCOM_WCNSS_CTRL - tristate "Qualcomm WCNSS control driver" - depends on ARCH_QCOM + tristate "Qualcomm WCNSS control driver" + depends on ARCH_QCOM --- /dev/null +++ b/drivers/soc/qcom/qcom_tcsr.c @@ -0,0 +1,98 @@ diff --git a/target/linux/lantiq/patches-4.14/0024-MIPS-lantiq-autoselect-soc-rev-matching-fw.patch b/target/linux/lantiq/patches-4.14/0024-MIPS-lantiq-autoselect-soc-rev-matching-fw.patch index 68643cc05c..7fbd97feca 100644 --- a/target/linux/lantiq/patches-4.14/0024-MIPS-lantiq-autoselect-soc-rev-matching-fw.patch +++ b/target/linux/lantiq/patches-4.14/0024-MIPS-lantiq-autoselect-soc-rev-matching-fw.patch @@ -18,7 +18,7 @@ Signed-off-by: Mathias Kresin --- a/drivers/soc/lantiq/gphy.c +++ b/drivers/soc/lantiq/gphy.c -@@ -56,6 +56,7 @@ static const struct xway_gphy_match_data +@@ -55,6 +55,7 @@ static const struct xway_gphy_match_data }; static const struct of_device_id xway_gphy_match[] = { @@ -26,7 +26,7 @@ Signed-off-by: Mathias Kresin { .compatible = "lantiq,xrx200a1x-gphy", .data = &xrx200a1x_gphy_data }, { .compatible = "lantiq,xrx200a2x-gphy", .data = &xrx200a2x_gphy_data }, { .compatible = "lantiq,xrx300-gphy", .data = &xrx300_gphy_data }, -@@ -130,6 +131,16 @@ static int xway_gphy_of_probe(struct pla +@@ -111,6 +112,16 @@ static int xway_gphy_of_probe(struct pla gphy_fw_name_cfg = of_device_get_match_data(dev); diff --git a/target/linux/lantiq/patches-4.14/0025-MIPS-lantiq-gphy-Remove-reboot-remove-reset-asserts.patch b/target/linux/lantiq/patches-4.14/0025-MIPS-lantiq-gphy-Remove-reboot-remove-reset-asserts.patch deleted file mode 100644 index 6efa6f13d9..0000000000 --- a/target/linux/lantiq/patches-4.14/0025-MIPS-lantiq-gphy-Remove-reboot-remove-reset-asserts.patch +++ /dev/null @@ -1,86 +0,0 @@ -From ae14aba7fc748b2da282b59a2f516a311ed1f6eb Mon Sep 17 00:00:00 2001 -From: Mathias Kresin -Date: Tue, 27 Mar 2018 23:15:07 +0200 -Subject: [PATCH] MIPS: lantiq: gphy: Remove reboot/remove reset asserts - -While doing a global software reset, these bits are not cleared and let -some bootloader fail to initialise the GPHYs. The bootloader don't expect -these bits to be set, as they aren't during power on. - -The asserts were a workaround for a wrong syscon-reboot mask. With a mask -set which includes the GPHY resets of the first reset register, the -resets of the second reset register arn't required any more. - -Signed-off-by: Mathias Kresin ---- - drivers/soc/lantiq/gphy.c | 34 ---------------------------------- - 1 file changed, 34 deletions(-) - ---- a/drivers/soc/lantiq/gphy.c -+++ b/drivers/soc/lantiq/gphy.c -@@ -30,7 +30,6 @@ struct xway_gphy_priv { - struct clk *gphy_clk_gate; - struct reset_control *gphy_reset; - struct reset_control *gphy_reset2; -- struct notifier_block gphy_reboot_nb; - void __iomem *membase; - char *fw_name; - }; -@@ -65,24 +64,6 @@ static const struct of_device_id xway_gp - }; - MODULE_DEVICE_TABLE(of, xway_gphy_match); - --static struct xway_gphy_priv *to_xway_gphy_priv(struct notifier_block *nb) --{ -- return container_of(nb, struct xway_gphy_priv, gphy_reboot_nb); --} -- --static int xway_gphy_reboot_notify(struct notifier_block *reboot_nb, -- unsigned long code, void *unused) --{ -- struct xway_gphy_priv *priv = to_xway_gphy_priv(reboot_nb); -- -- if (priv) { -- reset_control_assert(priv->gphy_reset); -- reset_control_assert(priv->gphy_reset2); -- } -- -- return NOTIFY_DONE; --} -- - static int xway_gphy_load(struct device *dev, struct xway_gphy_priv *priv, - dma_addr_t *dev_addr) - { -@@ -216,14 +197,6 @@ static int xway_gphy_probe(struct platfo - reset_control_deassert(priv->gphy_reset); - reset_control_deassert(priv->gphy_reset2); - -- /* assert the gphy reset because it can hang after a reboot: */ -- priv->gphy_reboot_nb.notifier_call = xway_gphy_reboot_notify; -- priv->gphy_reboot_nb.priority = -1; -- -- ret = register_reboot_notifier(&priv->gphy_reboot_nb); -- if (ret) -- dev_warn(dev, "Failed to register reboot notifier\n"); -- - platform_set_drvdata(pdev, priv); - - return ret; -@@ -235,17 +208,10 @@ static int xway_gphy_remove(struct platf - struct xway_gphy_priv *priv = platform_get_drvdata(pdev); - int ret; - -- reset_control_assert(priv->gphy_reset); -- reset_control_assert(priv->gphy_reset2); -- - iowrite32be(0, priv->membase); - - clk_disable_unprepare(priv->gphy_clk_gate); - -- ret = unregister_reboot_notifier(&priv->gphy_reboot_nb); -- if (ret) -- dev_warn(dev, "Failed to unregister reboot notifier\n"); -- - return 0; - } - diff --git a/target/linux/mediatek/patches-4.14/0045-net-dsa-mediatek-turn-into-platform-driver.patch b/target/linux/mediatek/patches-4.14/0045-net-dsa-mediatek-turn-into-platform-driver.patch index 87e3e88226..55f1015770 100644 --- a/target/linux/mediatek/patches-4.14/0045-net-dsa-mediatek-turn-into-platform-driver.patch +++ b/target/linux/mediatek/patches-4.14/0045-net-dsa-mediatek-turn-into-platform-driver.patch @@ -57,9 +57,9 @@ Signed-off-by: John Crispin } static const struct of_device_id mt7530_of_match[] = { -@@ -1135,16 +1142,16 @@ static const struct of_device_id mt7530_ - { /* sentinel */ }, +@@ -1136,16 +1143,16 @@ static const struct of_device_id mt7530_ }; + MODULE_DEVICE_TABLE(of, mt7530_of_match); -static struct mdio_driver mt7530_mdio_driver = { +static struct platform_driver mtk_mt7530_driver = { diff --git a/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch index 53275607e0..c4ffd0efea 100644 --- a/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch @@ -28,7 +28,7 @@ Signed-off-by: Michael Gray --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1948,6 +1948,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN +@@ -1938,6 +1938,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN The command-line arguments provided by the boot loader will be appended to the the device tree bootargs property. @@ -48,7 +48,7 @@ Signed-off-by: Michael Gray config CMDLINE --- a/arch/arm/boot/compressed/atags_to_fdt.c +++ b/arch/arm/boot/compressed/atags_to_fdt.c -@@ -3,6 +3,8 @@ +@@ -4,6 +4,8 @@ #if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND) #define do_extend_cmdline 1 @@ -57,7 +57,7 @@ Signed-off-by: Michael Gray #else #define do_extend_cmdline 0 #endif -@@ -66,6 +68,65 @@ static uint32_t get_cell_size(const void +@@ -67,6 +69,65 @@ static uint32_t get_cell_size(const void return cell_size; } @@ -123,7 +123,7 @@ Signed-off-by: Michael Gray static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline) { char cmdline[COMMAND_LINE_SIZE]; -@@ -85,12 +140,21 @@ static void merge_fdt_bootargs(void *fdt +@@ -86,12 +147,21 @@ static void merge_fdt_bootargs(void *fdt /* and append the ATAG_CMDLINE */ if (fdt_cmdline) { @@ -145,7 +145,7 @@ Signed-off-by: Michael Gray } *ptr = '\0'; -@@ -147,7 +211,9 @@ int atags_to_fdt(void *atag_list, void * +@@ -148,7 +218,9 @@ int atags_to_fdt(void *atag_list, void * else setprop_string(fdt, "/chosen", "bootargs", atag->u.cmdline.cmdline); @@ -156,7 +156,7 @@ Signed-off-by: Michael Gray if (memcount >= sizeof(mem_reg_property)/4) continue; if (!atag->u.mem.size) -@@ -186,6 +252,10 @@ int atags_to_fdt(void *atag_list, void * +@@ -187,6 +259,10 @@ int atags_to_fdt(void *atag_list, void * setprop(fdt, "/memory", "reg", mem_reg_property, 4 * memcount * memsize); } @@ -169,7 +169,7 @@ Signed-off-by: Michael Gray } --- a/init/main.c +++ b/init/main.c -@@ -89,6 +89,10 @@ +@@ -95,6 +95,10 @@ #include #include @@ -180,7 +180,7 @@ Signed-off-by: Michael Gray static int kernel_init(void *); extern void init_IRQ(void); -@@ -540,6 +544,18 @@ asmlinkage __visible void __init start_k +@@ -574,6 +578,18 @@ asmlinkage __visible void __init start_k page_alloc_init(); pr_notice("Kernel command line: %s\n", boot_command_line); diff --git a/target/linux/mvebu/patches-4.14/300-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-4.14/300-mvneta-tx-queue-workaround.patch index f21f8083ee..7ff586cd15 100644 --- a/target/linux/mvebu/patches-4.14/300-mvneta-tx-queue-workaround.patch +++ b/target/linux/mvebu/patches-4.14/300-mvneta-tx-queue-workaround.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3961,6 +3961,15 @@ static int mvneta_ethtool_set_wol(struct +@@ -3962,6 +3962,15 @@ static int mvneta_ethtool_set_wol(struct return ret; } @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau static const struct net_device_ops mvneta_netdev_ops = { .ndo_open = mvneta_open, .ndo_stop = mvneta_stop, -@@ -3971,6 +3980,7 @@ static const struct net_device_ops mvnet +@@ -3972,6 +3981,7 @@ static const struct net_device_ops mvnet .ndo_fix_features = mvneta_fix_features, .ndo_get_stats64 = mvneta_get_stats64, .ndo_do_ioctl = mvneta_ioctl, diff --git a/target/linux/mvebu/patches-4.14/403-net-mvneta-convert-to-phylink.patch b/target/linux/mvebu/patches-4.14/403-net-mvneta-convert-to-phylink.patch index 10f385461d..3549c8997e 100644 --- a/target/linux/mvebu/patches-4.14/403-net-mvneta-convert-to-phylink.patch +++ b/target/linux/mvebu/patches-4.14/403-net-mvneta-convert-to-phylink.patch @@ -132,7 +132,7 @@ Signed-off-by: Russell King u64 ethtool_stats[ARRAY_SIZE(mvneta_statistics)]; u32 indir[MVNETA_RSS_LU_TABLE_SIZE]; -@@ -1214,10 +1233,6 @@ static void mvneta_port_disable(struct m +@@ -1215,10 +1234,6 @@ static void mvneta_port_disable(struct m val &= ~MVNETA_GMAC0_PORT_ENABLE; mvreg_write(pp, MVNETA_GMAC_CTRL_0, val); @@ -143,7 +143,7 @@ Signed-off-by: Russell King udelay(200); } -@@ -1277,44 +1292,6 @@ static void mvneta_set_other_mcast_table +@@ -1278,44 +1293,6 @@ static void mvneta_set_other_mcast_table mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + offset, val); } @@ -188,7 +188,7 @@ Signed-off-by: Russell King static void mvneta_percpu_unmask_interrupt(void *arg) { struct mvneta_port *pp = arg; -@@ -1467,7 +1444,6 @@ static void mvneta_defaults_set(struct m +@@ -1468,7 +1445,6 @@ static void mvneta_defaults_set(struct m val &= ~MVNETA_PHY_POLLING_ENABLE; mvreg_write(pp, MVNETA_UNIT_CONTROL, val); @@ -196,7 +196,7 @@ Signed-off-by: Russell King mvneta_set_ucast_table(pp, -1); mvneta_set_special_mcast_table(pp, -1); mvneta_set_other_mcast_table(pp, -1); -@@ -2692,26 +2668,11 @@ static irqreturn_t mvneta_percpu_isr(int +@@ -2693,26 +2669,11 @@ static irqreturn_t mvneta_percpu_isr(int return IRQ_HANDLED; } @@ -225,7 +225,7 @@ Signed-off-by: Russell King } /* NAPI handler -@@ -2727,7 +2688,6 @@ static int mvneta_poll(struct napi_struc +@@ -2728,7 +2689,6 @@ static int mvneta_poll(struct napi_struc u32 cause_rx_tx; int rx_queue; struct mvneta_port *pp = netdev_priv(napi->dev); @@ -233,7 +233,7 @@ Signed-off-by: Russell King struct mvneta_pcpu_port *port = this_cpu_ptr(pp->ports); if (!netif_running(pp->dev)) { -@@ -2741,12 +2701,11 @@ static int mvneta_poll(struct napi_struc +@@ -2742,12 +2702,11 @@ static int mvneta_poll(struct napi_struc u32 cause_misc = mvreg_read(pp, MVNETA_INTR_MISC_CAUSE); mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0); @@ -251,7 +251,7 @@ Signed-off-by: Russell King } /* Release Tx descriptors */ -@@ -3060,7 +3019,6 @@ static int mvneta_setup_txqs(struct mvne +@@ -3061,7 +3020,6 @@ static int mvneta_setup_txqs(struct mvne static void mvneta_start_dev(struct mvneta_port *pp) { int cpu; @@ -259,7 +259,7 @@ Signed-off-by: Russell King mvneta_max_rx_size_set(pp, pp->pkt_size); mvneta_txq_max_tx_size_set(pp, pp->pkt_size); -@@ -3088,16 +3046,15 @@ static void mvneta_start_dev(struct mvne +@@ -3089,16 +3047,15 @@ static void mvneta_start_dev(struct mvne MVNETA_CAUSE_LINK_CHANGE | MVNETA_CAUSE_PSC_SYNC_CHANGE); @@ -278,7 +278,7 @@ Signed-off-by: Russell King if (!pp->neta_armada3700) { for_each_online_cpu(cpu) { -@@ -3251,103 +3208,232 @@ static int mvneta_set_mac_addr(struct ne +@@ -3252,103 +3209,232 @@ static int mvneta_set_mac_addr(struct ne return 0; } @@ -585,7 +585,7 @@ Signed-off-by: Russell King } /* Electing a CPU must be done in an atomic way: it should be done -@@ -3626,10 +3712,9 @@ static int mvneta_stop(struct net_device +@@ -3627,10 +3713,9 @@ static int mvneta_stop(struct net_device static int mvneta_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { @@ -598,7 +598,7 @@ Signed-off-by: Russell King } /* Ethtool methods */ -@@ -3640,44 +3725,25 @@ mvneta_ethtool_set_link_ksettings(struct +@@ -3641,44 +3726,25 @@ mvneta_ethtool_set_link_ksettings(struct const struct ethtool_link_ksettings *cmd) { struct mvneta_port *pp = netdev_priv(ndev); @@ -657,7 +657,7 @@ Signed-off-by: Russell King } /* Set interrupt coalescing for ethtools */ -@@ -3769,6 +3835,22 @@ static int mvneta_ethtool_set_ringparam( +@@ -3770,6 +3836,22 @@ static int mvneta_ethtool_set_ringparam( return 0; } @@ -680,7 +680,7 @@ Signed-off-by: Russell King static void mvneta_ethtool_get_strings(struct net_device *netdev, u32 sset, u8 *data) { -@@ -3785,26 +3867,35 @@ static void mvneta_ethtool_update_stats( +@@ -3786,26 +3868,35 @@ static void mvneta_ethtool_update_stats( { const struct mvneta_statistic *s; void __iomem *base = pp->base; @@ -721,7 +721,7 @@ Signed-off-by: Russell King } } -@@ -3939,28 +4030,65 @@ static int mvneta_ethtool_get_rxfh(struc +@@ -3940,28 +4031,65 @@ static int mvneta_ethtool_get_rxfh(struc static void mvneta_ethtool_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { @@ -795,7 +795,7 @@ Signed-off-by: Russell King static u16 mvneta_select_queue(struct net_device *dev, struct sk_buff *skb, void *accel_priv, select_queue_fallback_t fallback) -@@ -3984,13 +4112,15 @@ static const struct net_device_ops mvnet +@@ -3985,13 +4113,15 @@ static const struct net_device_ops mvnet }; static const struct ethtool_ops mvneta_eth_tool_ops = { @@ -812,7 +812,7 @@ Signed-off-by: Russell King .get_strings = mvneta_ethtool_get_strings, .get_ethtool_stats = mvneta_ethtool_get_stats, .get_sset_count = mvneta_ethtool_get_sset_count, -@@ -3998,10 +4128,12 @@ static const struct ethtool_ops mvneta_e +@@ -3999,10 +4129,12 @@ static const struct ethtool_ops mvneta_e .get_rxnfc = mvneta_ethtool_get_rxnfc, .get_rxfh = mvneta_ethtool_get_rxfh, .set_rxfh = mvneta_ethtool_set_rxfh, @@ -826,7 +826,7 @@ Signed-off-by: Russell King }; /* Initialize hw */ -@@ -4146,14 +4278,13 @@ static int mvneta_probe(struct platform_ +@@ -4147,14 +4279,13 @@ static int mvneta_probe(struct platform_ { struct resource *res; struct device_node *dn = pdev->dev.of_node; @@ -842,7 +842,7 @@ Signed-off-by: Russell King int tx_csum_limit; int phy_mode; int err; -@@ -4169,31 +4300,11 @@ static int mvneta_probe(struct platform_ +@@ -4170,31 +4301,11 @@ static int mvneta_probe(struct platform_ goto err_free_netdev; } @@ -875,7 +875,7 @@ Signed-off-by: Russell King } dev->tx_queue_len = MVNETA_MAX_TXD; -@@ -4204,12 +4315,7 @@ static int mvneta_probe(struct platform_ +@@ -4205,12 +4316,7 @@ static int mvneta_probe(struct platform_ pp = netdev_priv(dev); spin_lock_init(&pp->lock); @@ -889,7 +889,7 @@ Signed-off-by: Russell King pp->rxq_def = rxq_def; -@@ -4231,7 +4337,7 @@ static int mvneta_probe(struct platform_ +@@ -4232,7 +4338,7 @@ static int mvneta_probe(struct platform_ pp->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(pp->clk)) { err = PTR_ERR(pp->clk); @@ -898,7 +898,7 @@ Signed-off-by: Russell King } clk_prepare_enable(pp->clk); -@@ -4357,6 +4463,14 @@ static int mvneta_probe(struct platform_ +@@ -4358,6 +4464,14 @@ static int mvneta_probe(struct platform_ /* 9676 == 9700 - 20 and rounding to 8 */ dev->max_mtu = 9676; @@ -913,7 +913,7 @@ Signed-off-by: Russell King err = register_netdev(dev); if (err < 0) { dev_err(&pdev->dev, "failed to register\n"); -@@ -4368,14 +4482,6 @@ static int mvneta_probe(struct platform_ +@@ -4369,14 +4483,6 @@ static int mvneta_probe(struct platform_ platform_set_drvdata(pdev, pp->dev); @@ -928,7 +928,7 @@ Signed-off-by: Russell King return 0; err_netdev: -@@ -4386,16 +4492,14 @@ err_netdev: +@@ -4387,16 +4493,14 @@ err_netdev: 1 << pp->id); } err_free_stats: @@ -947,7 +947,7 @@ Signed-off-by: Russell King err_free_irq: irq_dispose_mapping(dev->irq); err_free_netdev: -@@ -4407,7 +4511,6 @@ err_free_netdev: +@@ -4408,7 +4512,6 @@ err_free_netdev: static int mvneta_remove(struct platform_device *pdev) { struct net_device *dev = platform_get_drvdata(pdev); @@ -955,7 +955,7 @@ Signed-off-by: Russell King struct mvneta_port *pp = netdev_priv(dev); unregister_netdev(dev); -@@ -4415,10 +4518,8 @@ static int mvneta_remove(struct platform +@@ -4416,10 +4519,8 @@ static int mvneta_remove(struct platform clk_disable_unprepare(pp->clk); free_percpu(pp->ports); free_percpu(pp->stats); @@ -967,7 +967,7 @@ Signed-off-by: Russell King free_netdev(dev); if (pp->bm_priv) { -@@ -4470,9 +4571,6 @@ static int mvneta_resume(struct device * +@@ -4471,9 +4572,6 @@ static int mvneta_resume(struct device * return err; } diff --git a/target/linux/mvebu/patches-4.14/404-net-mvneta-hack-fix-phy_interface.patch b/target/linux/mvebu/patches-4.14/404-net-mvneta-hack-fix-phy_interface.patch index 906c163ac9..88ea6973e1 100644 --- a/target/linux/mvebu/patches-4.14/404-net-mvneta-hack-fix-phy_interface.patch +++ b/target/linux/mvebu/patches-4.14/404-net-mvneta-hack-fix-phy_interface.patch @@ -18,7 +18,7 @@ Signed-off-by: Russell King struct device_node *dn; unsigned int tx_csum_limit; struct phylink *phylink; -@@ -4315,6 +4316,7 @@ static int mvneta_probe(struct platform_ +@@ -4316,6 +4317,7 @@ static int mvneta_probe(struct platform_ pp = netdev_priv(dev); spin_lock_init(&pp->lock); diff --git a/target/linux/mvebu/patches-4.14/405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch b/target/linux/mvebu/patches-4.14/405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch index ddb0cc8a2e..6f9c4dd596 100644 --- a/target/linux/mvebu/patches-4.14/405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch +++ b/target/linux/mvebu/patches-4.14/405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch @@ -14,7 +14,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -2704,8 +2704,7 @@ static int mvneta_poll(struct napi_struc +@@ -2705,8 +2705,7 @@ static int mvneta_poll(struct napi_struc mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0); if (cause_misc & (MVNETA_CAUSE_PHY_STATUS_CHANGE | @@ -24,7 +24,7 @@ Signed-off-by: Russell King mvneta_link_change(pp); } -@@ -3044,8 +3043,7 @@ static void mvneta_start_dev(struct mvne +@@ -3045,8 +3044,7 @@ static void mvneta_start_dev(struct mvne mvreg_write(pp, MVNETA_INTR_MISC_MASK, MVNETA_CAUSE_PHY_STATUS_CHANGE | @@ -34,7 +34,7 @@ Signed-off-by: Russell King phylink_start(pp->phylink); netif_tx_start_all_queues(pp->dev); -@@ -3542,8 +3540,7 @@ static int mvneta_cpu_online(unsigned in +@@ -3543,8 +3541,7 @@ static int mvneta_cpu_online(unsigned in on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true); mvreg_write(pp, MVNETA_INTR_MISC_MASK, MVNETA_CAUSE_PHY_STATUS_CHANGE | @@ -44,7 +44,7 @@ Signed-off-by: Russell King netif_tx_start_all_queues(pp->dev); spin_unlock(&pp->lock); return 0; -@@ -3584,8 +3581,7 @@ static int mvneta_cpu_dead(unsigned int +@@ -3585,8 +3582,7 @@ static int mvneta_cpu_dead(unsigned int on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true); mvreg_write(pp, MVNETA_INTR_MISC_MASK, MVNETA_CAUSE_PHY_STATUS_CHANGE | diff --git a/target/linux/mvebu/patches-4.14/406-net-mvneta-add-module-EEPROM-reading-support.patch b/target/linux/mvebu/patches-4.14/406-net-mvneta-add-module-EEPROM-reading-support.patch index 39eb33ac2c..f359eb3d78 100644 --- a/target/linux/mvebu/patches-4.14/406-net-mvneta-add-module-EEPROM-reading-support.patch +++ b/target/linux/mvebu/patches-4.14/406-net-mvneta-add-module-EEPROM-reading-support.patch @@ -10,7 +10,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -4045,6 +4045,22 @@ static int mvneta_ethtool_set_wol(struct +@@ -4046,6 +4046,22 @@ static int mvneta_ethtool_set_wol(struct return ret; } @@ -33,7 +33,7 @@ Signed-off-by: Russell King static int mvneta_ethtool_get_eee(struct net_device *dev, struct ethtool_eee *eee) { -@@ -4129,6 +4145,8 @@ static const struct ethtool_ops mvneta_e +@@ -4130,6 +4146,8 @@ static const struct ethtool_ops mvneta_e .set_link_ksettings = mvneta_ethtool_set_link_ksettings, .get_wol = mvneta_ethtool_get_wol, .set_wol = mvneta_ethtool_set_wol, diff --git a/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch b/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch index 2e135e6845..3012fae3d0 100644 --- a/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch +++ b/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch @@ -15,7 +15,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -4045,22 +4045,6 @@ static int mvneta_ethtool_set_wol(struct +@@ -4046,22 +4046,6 @@ static int mvneta_ethtool_set_wol(struct return ret; } @@ -38,7 +38,7 @@ Signed-off-by: Russell King static int mvneta_ethtool_get_eee(struct net_device *dev, struct ethtool_eee *eee) { -@@ -4145,8 +4129,6 @@ static const struct ethtool_ops mvneta_e +@@ -4146,8 +4130,6 @@ static const struct ethtool_ops mvneta_e .set_link_ksettings = mvneta_ethtool_set_link_ksettings, .get_wol = mvneta_ethtool_get_wol, .set_wol = mvneta_ethtool_set_wol, diff --git a/target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch b/target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch index 7d3352e928..1c6fe048b0 100644 --- a/target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch +++ b/target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch @@ -18,7 +18,7 @@ Signed-off-by: John Crispin #include #include -@@ -5075,6 +5076,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hso +@@ -5105,6 +5106,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hso retval = -ENOMEM;