From: Hauke Mehrtens Date: Wed, 2 Dec 2015 21:52:41 +0000 (+0000) Subject: kernel: update 4.1 to 4.1.13 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f0a5f24217fbedd7ffba0a2a0bf37c1102e44ad0;p=openwrt%2Fstaging%2Fyousong.git kernel: update 4.1 to 4.1.13 - two upstreamed patches removed - compile tested all targets using 4.1 - run tested ar71xx Signed-off-by: Roman Yeryomin Signed-off-by: Hauke Mehrtens SVN-Revision: 47694 --- diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 3955a292b5..9bbb344b23 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -4,12 +4,12 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .23 LINUX_VERSION-4.0 = .9 -LINUX_VERSION-4.1 = .11 +LINUX_VERSION-4.1 = .13 LINUX_VERSION-4.3 = LINUX_KERNEL_MD5SUM-3.18.23 = dc6d265ab38716be3676ac294b481ad8 LINUX_KERNEL_MD5SUM-4.0.9 = 40fc5f6e2d718e539b45e6601c71985b -LINUX_KERNEL_MD5SUM-4.1.11 = 63e5981e38f935772a5309289fe76972 +LINUX_KERNEL_MD5SUM-4.1.13 = af9dd5d8f71185a64a8eccface15fc00 LINUX_KERNEL_MD5SUM-4.3 = 58b35794eee3b6d52ce7be39357801e7 ifdef KERNEL_PATCHVER diff --git a/target/linux/ar71xx/patches-4.1/911-MIPS-ath79-add-gl_ar150.patch b/target/linux/ar71xx/patches-4.1/911-MIPS-ath79-add-gl_ar150.patch index 8c7b4d731b..6f42065865 100644 --- a/target/linux/ar71xx/patches-4.1/911-MIPS-ath79-add-gl_ar150.patch +++ b/target/linux/ar71xx/patches-4.1/911-MIPS-ath79-add-gl_ar150.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig -@@ -577,6 +577,16 @@ config ATH79_MACH_EL_MINI +@@ -586,6 +586,16 @@ config ATH79_MACH_EL_MINI select ATH79_DEV_USB select ATH79_DEV_WMAC @@ -19,7 +19,7 @@ select SOC_AR933X --- a/arch/mips/ath79/Makefile +++ b/arch/mips/ath79/Makefile -@@ -83,6 +83,7 @@ obj-$(CONFIG_ATH79_MACH_EL_MINI) += mach +@@ -84,6 +84,7 @@ obj-$(CONFIG_ATH79_MACH_EL_MINI) += mach obj-$(CONFIG_ATH79_MACH_EPG5000) += mach-epg5000.o obj-$(CONFIG_ATH79_MACH_ESR1750) += mach-esr1750.o obj-$(CONFIG_ATH79_MACH_F9K1115V2) += mach-f9k1115v2.o @@ -29,7 +29,7 @@ obj-$(CONFIG_ATH79_MACH_GS_OOLITE) += mach-gs-oolite.o --- a/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h -@@ -72,6 +72,7 @@ enum ath79_mach_type { +@@ -73,6 +73,7 @@ enum ath79_mach_type { ATH79_MACH_ESR1750, /* EnGenius ESR1750 */ ATH79_MACH_EPG5000, /* EnGenius EPG5000 */ ATH79_MACH_F9K1115V2, /* Belkin AC1750DB */ diff --git a/target/linux/ar71xx/patches-4.1/912-MIPS-ath79-add-gl_ar300.patch b/target/linux/ar71xx/patches-4.1/912-MIPS-ath79-add-gl_ar300.patch index 6ca9913b2d..e9c0f4f142 100644 --- a/target/linux/ar71xx/patches-4.1/912-MIPS-ath79-add-gl_ar300.patch +++ b/target/linux/ar71xx/patches-4.1/912-MIPS-ath79-add-gl_ar300.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig -@@ -587,6 +587,16 @@ config ATH79_MACH_GL_AR150 +@@ -596,6 +596,16 @@ config ATH79_MACH_GL_AR150 select ATH79_DEV_USB select ATH79_DEV_WMAC @@ -19,7 +19,7 @@ select SOC_AR933X --- a/arch/mips/ath79/Makefile +++ b/arch/mips/ath79/Makefile -@@ -84,6 +84,7 @@ obj-$(CONFIG_ATH79_MACH_EPG5000) += mach +@@ -85,6 +85,7 @@ obj-$(CONFIG_ATH79_MACH_EPG5000) += mach obj-$(CONFIG_ATH79_MACH_ESR1750) += mach-esr1750.o obj-$(CONFIG_ATH79_MACH_F9K1115V2) += mach-f9k1115v2.o obj-$(CONFIG_ATH79_MACH_GL_AR150) += mach-gl-ar150.o @@ -29,7 +29,7 @@ obj-$(CONFIG_ATH79_MACH_GS_OOLITE) += mach-gs-oolite.o --- a/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h -@@ -73,6 +73,7 @@ enum ath79_mach_type { +@@ -74,6 +74,7 @@ enum ath79_mach_type { ATH79_MACH_EPG5000, /* EnGenius EPG5000 */ ATH79_MACH_F9K1115V2, /* Belkin AC1750DB */ ATH79_MACH_GL_AR150, /* GL-AR150 support */ diff --git a/target/linux/ar71xx/patches-4.1/913-MIPS-ath79-add-domino-support.patch b/target/linux/ar71xx/patches-4.1/913-MIPS-ath79-add-domino-support.patch index 80351cf979..6524ba82e4 100644 --- a/target/linux/ar71xx/patches-4.1/913-MIPS-ath79-add-domino-support.patch +++ b/target/linux/ar71xx/patches-4.1/913-MIPS-ath79-add-domino-support.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig -@@ -597,6 +597,16 @@ config ATH79_MACH_GL_AR300 +@@ -606,6 +606,16 @@ config ATH79_MACH_GL_AR300 select ATH79_DEV_USB select ATH79_DEV_WMAC @@ -19,7 +19,7 @@ select SOC_AR933X --- a/arch/mips/ath79/Makefile +++ b/arch/mips/ath79/Makefile -@@ -85,6 +85,7 @@ obj-$(CONFIG_ATH79_MACH_ESR1750) += mach +@@ -86,6 +86,7 @@ obj-$(CONFIG_ATH79_MACH_ESR1750) += mach obj-$(CONFIG_ATH79_MACH_F9K1115V2) += mach-f9k1115v2.o obj-$(CONFIG_ATH79_MACH_GL_AR150) += mach-gl-ar150.o obj-$(CONFIG_ATH79_MACH_GL_AR300) += mach-gl-ar300.o @@ -29,7 +29,7 @@ obj-$(CONFIG_ATH79_MACH_GS_OOLITE) += mach-gs-oolite.o --- a/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h -@@ -74,6 +74,7 @@ enum ath79_mach_type { +@@ -75,6 +75,7 @@ enum ath79_mach_type { ATH79_MACH_F9K1115V2, /* Belkin AC1750DB */ ATH79_MACH_GL_AR150, /* GL-AR150 support */ ATH79_MACH_GL_AR300, /* GL-AR300 */ diff --git a/target/linux/brcm2708/patches-4.1/0032-Added-Device-IDs-for-August-DVB-T-205.patch b/target/linux/brcm2708/patches-4.1/0032-Added-Device-IDs-for-August-DVB-T-205.patch index f8cf48563a..514fee0bfa 100644 --- a/target/linux/brcm2708/patches-4.1/0032-Added-Device-IDs-for-August-DVB-T-205.patch +++ b/target/linux/brcm2708/patches-4.1/0032-Added-Device-IDs-for-August-DVB-T-205.patch @@ -9,7 +9,7 @@ Subject: [PATCH 032/203] Added Device IDs for August DVB-T 205 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c -@@ -1744,6 +1744,10 @@ static const struct usb_device_id rtl28x +@@ -1755,6 +1755,10 @@ static const struct usb_device_id rtl28x &rtl28xxu_props, "Compro VideoMate U620F", NULL) }, { DVB_USB_DEVICE(USB_VID_KWORLD_2, 0xd394, &rtl28xxu_props, "MaxMedia HU394-T", NULL) }, diff --git a/target/linux/brcm2708/patches-4.1/0033-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch b/target/linux/brcm2708/patches-4.1/0033-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch index 00a9532614..5a1d8c72c5 100644 --- a/target/linux/brcm2708/patches-4.1/0033-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch +++ b/target/linux/brcm2708/patches-4.1/0033-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch @@ -43,7 +43,7 @@ Subject: [PATCH 033/203] config: Enable CONFIG_MEMCG, but leave it disabled printk("cgroup: using legacy files on the default hierarchy\n"); --- a/mm/memcontrol.c +++ b/mm/memcontrol.c -@@ -5388,6 +5388,7 @@ struct cgroup_subsys memory_cgrp_subsys +@@ -5389,6 +5389,7 @@ struct cgroup_subsys memory_cgrp_subsys .dfl_cftypes = memory_files, .legacy_cftypes = mem_cgroup_legacy_files, .early_init = 0, diff --git a/target/linux/brcm47xx/patches-4.1/031-11-MIPS-BCM47xx-Simplify-handling-SPROM-revisions.patch b/target/linux/brcm47xx/patches-4.1/031-11-MIPS-BCM47xx-Simplify-handling-SPROM-revisions.patch index 7302c65c03..ed4005266b 100644 --- a/target/linux/brcm47xx/patches-4.1/031-11-MIPS-BCM47xx-Simplify-handling-SPROM-revisions.patch +++ b/target/linux/brcm47xx/patches-4.1/031-11-MIPS-BCM47xx-Simplify-handling-SPROM-revisions.patch @@ -21,11 +21,9 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/sprom.c | 53 ++++++++--------------------------------------- 1 file changed, 9 insertions(+), 44 deletions(-) -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index b0d62e7..2d5c7a7 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c -@@ -200,6 +200,9 @@ static void bcm47xx_sprom_fill_auto(struct ssb_sprom *sprom, +@@ -200,6 +200,9 @@ static void bcm47xx_sprom_fill_auto(stru const char *pre = prefix; bool fb = fallback; @@ -35,7 +33,7 @@ index b0d62e7..2d5c7a7 100644 ENTRY(0xfffffffe, u16, pre, "boardrev", board_rev, 0, true); ENTRY(0xfffffffe, u32, pre, "boardflags", boardflags, 0, fb); ENTRY(0xfffffff0, u32, pre, "boardflags2", boardflags2, 0, fb); -@@ -412,27 +415,6 @@ static void bcm47xx_sprom_fill_auto(struct ssb_sprom *sprom, +@@ -412,27 +415,6 @@ static void bcm47xx_sprom_fill_auto(stru } #undef ENTRY /* It's specififc, uses local variable, don't use it (again). */ @@ -63,7 +61,7 @@ index b0d62e7..2d5c7a7 100644 static void bcm47xx_fill_sprom_path_r4589(struct ssb_sprom *sprom, const char *prefix, bool fallback) { -@@ -589,39 +571,22 @@ void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, +@@ -589,39 +571,22 @@ void bcm47xx_fill_sprom(struct ssb_sprom nvram_read_u8(prefix, NULL, "sromrev", &sprom->revision, 0, fallback); @@ -109,6 +107,3 @@ index b0d62e7..2d5c7a7 100644 } bcm47xx_sprom_fill_auto(sprom, prefix, fallback); --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.1/032-01-MIPS-BCM47xx-Use-kmemdup-rather-than-duplicating-its.patch b/target/linux/brcm47xx/patches-4.1/032-01-MIPS-BCM47xx-Use-kmemdup-rather-than-duplicating-its.patch index 958738c35c..682cc419c5 100644 --- a/target/linux/brcm47xx/patches-4.1/032-01-MIPS-BCM47xx-Use-kmemdup-rather-than-duplicating-its.patch +++ b/target/linux/brcm47xx/patches-4.1/032-01-MIPS-BCM47xx-Use-kmemdup-rather-than-duplicating-its.patch @@ -27,11 +27,9 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/buttons.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c -index 08a4abf..52caa75 100644 --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -396,10 +396,9 @@ static int __init bcm47xx_buttons_copy(const struct gpio_keys_button *buttons, +@@ -396,10 +396,9 @@ static int __init bcm47xx_buttons_copy(c { size_t size = nbuttons * sizeof(*buttons); @@ -43,6 +41,3 @@ index 08a4abf..52caa75 100644 bcm47xx_button_pdata.nbuttons = nbuttons; return 0; --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.1/033-01-MIPS-BCM47xx-Support-on-SoC-bus-in-SPROM-reading-fun.patch b/target/linux/brcm47xx/patches-4.1/033-01-MIPS-BCM47xx-Support-on-SoC-bus-in-SPROM-reading-fun.patch index f8d945d1ba..7b8ed25f0f 100644 --- a/target/linux/brcm47xx/patches-4.1/033-01-MIPS-BCM47xx-Support-on-SoC-bus-in-SPROM-reading-fun.patch +++ b/target/linux/brcm47xx/patches-4.1/033-01-MIPS-BCM47xx-Support-on-SoC-bus-in-SPROM-reading-fun.patch @@ -21,11 +21,9 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/sprom.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index 2d5c7a7..e19c1b9 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c -@@ -610,14 +610,18 @@ static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out) +@@ -610,14 +610,18 @@ static int bcm47xx_get_sprom_ssb(struct { char prefix[10]; @@ -46,6 +44,3 @@ index 2d5c7a7..e19c1b9 100644 pr_warn("Unable to fill SPROM for given bustype.\n"); return -EINVAL; } --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.1/033-02-MIPS-BCM47xx-Fix-some-WARNINGs-pointed-in-sprom.c-by.patch b/target/linux/brcm47xx/patches-4.1/033-02-MIPS-BCM47xx-Fix-some-WARNINGs-pointed-in-sprom.c-by.patch index c32f1ec226..584b13593a 100644 --- a/target/linux/brcm47xx/patches-4.1/033-02-MIPS-BCM47xx-Fix-some-WARNINGs-pointed-in-sprom.c-by.patch +++ b/target/linux/brcm47xx/patches-4.1/033-02-MIPS-BCM47xx-Fix-some-WARNINGs-pointed-in-sprom.c-by.patch @@ -20,11 +20,9 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/sprom.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index e19c1b9..43353db 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c -@@ -60,9 +60,9 @@ static int get_nvram_var(const char *prefix, const char *postfix, +@@ -60,9 +60,9 @@ static int get_nvram_var(const char *pre } #define NVRAM_READ_VAL(type) \ @@ -37,7 +35,7 @@ index e19c1b9..43353db 100644 { \ char buf[100]; \ int err; \ -@@ -422,7 +422,10 @@ static void bcm47xx_fill_sprom_path_r4589(struct ssb_sprom *sprom, +@@ -422,7 +422,10 @@ static void bcm47xx_fill_sprom_path_r458 int i; for (i = 0; i < ARRAY_SIZE(sprom->core_pwr_info); i++) { @@ -49,7 +47,7 @@ index e19c1b9..43353db 100644 snprintf(postfix, sizeof(postfix), "%i", i); nvram_read_u8(prefix, postfix, "maxp2ga", &pwr_info->maxpwr_2g, 0, fallback); -@@ -470,7 +473,10 @@ static void bcm47xx_fill_sprom_path_r45(struct ssb_sprom *sprom, +@@ -470,7 +473,10 @@ static void bcm47xx_fill_sprom_path_r45( int i; for (i = 0; i < ARRAY_SIZE(sprom->core_pwr_info); i++) { @@ -61,7 +59,7 @@ index e19c1b9..43353db 100644 snprintf(postfix, sizeof(postfix), "%i", i); nvram_read_u16(prefix, postfix, "pa2gw3a", &pwr_info->pa_2g[3], 0, fallback); -@@ -535,10 +541,11 @@ static void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, +@@ -535,10 +541,11 @@ static void bcm47xx_fill_sprom_ethernet( nvram_read_macaddr(prefix, "il0macaddr", sprom->il0mac, fallback); /* The address prefix 00:90:4C is used by Broadcom in their initial @@ -77,6 +75,3 @@ index e19c1b9..43353db 100644 if (!bcm47xx_is_valid_mac(sprom->il0mac)) { u8 mac[6]; --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.1/033-03-MIPS-BCM47xx-Fetch-board-info-directly-in-callback-f.patch b/target/linux/brcm47xx/patches-4.1/033-03-MIPS-BCM47xx-Fetch-board-info-directly-in-callback-f.patch index 7cafe6fb63..777a82bd9b 100644 --- a/target/linux/brcm47xx/patches-4.1/033-03-MIPS-BCM47xx-Fetch-board-info-directly-in-callback-f.patch +++ b/target/linux/brcm47xx/patches-4.1/033-03-MIPS-BCM47xx-Fetch-board-info-directly-in-callback-f.patch @@ -23,11 +23,9 @@ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-bcm47xx/bcm47xx.h | 5 ----- 3 files changed, 18 insertions(+), 19 deletions(-) -diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c -index 17503a0..6d38948 100644 --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c -@@ -105,11 +105,28 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus, +@@ -105,11 +105,28 @@ static int bcm47xx_get_invariants(struct struct ssb_init_invariants *iv) { char buf[20]; @@ -57,11 +55,9 @@ index 17503a0..6d38948 100644 memset(&iv->sprom, 0, sizeof(struct ssb_sprom)); bcm47xx_fill_sprom(&iv->sprom, NULL, false); -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index 43353db..a7e569c 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c -@@ -599,19 +599,6 @@ void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, +@@ -599,19 +599,6 @@ void bcm47xx_fill_sprom(struct ssb_sprom bcm47xx_sprom_fill_auto(sprom, prefix, fallback); } @@ -81,11 +77,9 @@ index 43353db..a7e569c 100644 #if defined(CONFIG_BCM47XX_SSB) static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out) { -diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h -index 1461c10..71e4096 100644 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h -@@ -48,11 +48,6 @@ extern enum bcm47xx_bus_type bcm47xx_bus_type; +@@ -48,11 +48,6 @@ extern enum bcm47xx_bus_type bcm47xx_bus void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, bool fallback); @@ -97,6 +91,3 @@ index 1461c10..71e4096 100644 void bcm47xx_set_system_type(u16 chip_id); #endif /* __ASM_BCM47XX_H */ --- -1.8.4.5 - diff --git a/target/linux/generic/patches-4.1/101-pppoe-fix-disconnect-crash.patch b/target/linux/generic/patches-4.1/101-pppoe-fix-disconnect-crash.patch deleted file mode 100644 index f2e6e45b0b..0000000000 --- a/target/linux/generic/patches-4.1/101-pppoe-fix-disconnect-crash.patch +++ /dev/null @@ -1,16 +0,0 @@ -Fix crash with actions performed on the underlying interface (MAC address, -MTU or link state update). This triggers pppoe_flush_dev(), which cleans up -the device without announcing it in sk->sk_state. - -Patch by Guillaume Nault (pulled from netdev@vger) - ---- a/drivers/net/ppp/pppoe.c -+++ b/drivers/net/ppp/pppoe.c -@@ -313,7 +313,6 @@ static void pppoe_flush_dev(struct net_d - if (po->pppoe_dev == dev && - sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) { - pppox_unbind_sock(sk); -- sk->sk_state = PPPOX_ZOMBIE; - sk->sk_state_change(sk); - po->pppoe_dev = NULL; - dev_put(dev); diff --git a/target/linux/generic/patches-4.1/142-mtd-spi-nor-include-mtd.h-header-for-struct-mtd_info.patch b/target/linux/generic/patches-4.1/142-mtd-spi-nor-include-mtd.h-header-for-struct-mtd_info.patch index f25c79c281..b0a064fb4e 100644 --- a/target/linux/generic/patches-4.1/142-mtd-spi-nor-include-mtd.h-header-for-struct-mtd_info.patch +++ b/target/linux/generic/patches-4.1/142-mtd-spi-nor-include-mtd.h-header-for-struct-mtd_info.patch @@ -17,8 +17,6 @@ Signed-off-by: Rafał Miłecki include/linux/mtd/spi-nor.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h -index 7bed974..fac3f6f 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -12,6 +12,7 @@ diff --git a/target/linux/generic/patches-4.1/192-USB-qcserial-Add-support-for-Quectel-EC20-Mini-PCIe-.patch b/target/linux/generic/patches-4.1/192-USB-qcserial-Add-support-for-Quectel-EC20-Mini-PCIe-.patch index 1d0db6bdbd..71e89dc434 100644 --- a/target/linux/generic/patches-4.1/192-USB-qcserial-Add-support-for-Quectel-EC20-Mini-PCIe-.patch +++ b/target/linux/generic/patches-4.1/192-USB-qcserial-Add-support-for-Quectel-EC20-Mini-PCIe-.patch @@ -61,7 +61,7 @@ Signed-off-by: Petr Å tetiar /* standard device layouts supported by this driver */ enum qcserial_layouts { QCSERIAL_G2K = 0, /* Gobi 2000 */ -@@ -167,6 +169,38 @@ static const struct usb_device_id id_tab +@@ -169,6 +171,38 @@ static const struct usb_device_id id_tab }; MODULE_DEVICE_TABLE(usb, id_table); @@ -100,7 +100,7 @@ Signed-off-by: Petr Å tetiar static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) { struct usb_host_interface *intf = serial->interface->cur_altsetting; -@@ -235,6 +269,11 @@ static int qcprobe(struct usb_serial *se +@@ -237,6 +271,11 @@ static int qcprobe(struct usb_serial *se altsetting = -1; break; case QCSERIAL_G2K: diff --git a/target/linux/generic/patches-4.1/204-module_strip.patch b/target/linux/generic/patches-4.1/204-module_strip.patch index 0fdc8e101b..ab2fd17c2b 100644 --- a/target/linux/generic/patches-4.1/204-module_strip.patch +++ b/target/linux/generic/patches-4.1/204-module_strip.patch @@ -109,7 +109,7 @@ Signed-off-by: Felix Fietkau config INIT_ALL_POSSIBLE --- a/kernel/module.c +++ b/kernel/module.c -@@ -2681,6 +2681,7 @@ static struct module *setup_load_info(st +@@ -2685,6 +2685,7 @@ static struct module *setup_load_info(st static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau const char *modmagic = get_modinfo(info, "vermagic"); int err; -@@ -2706,6 +2707,7 @@ static int check_modinfo(struct module * +@@ -2710,6 +2711,7 @@ static int check_modinfo(struct module * pr_warn("%s: module is from the staging directory, the quality " "is unknown, you have been warned.\n", mod->name); } diff --git a/target/linux/generic/patches-4.1/902-debloat_proc.patch b/target/linux/generic/patches-4.1/902-debloat_proc.patch index 8207dadffe..ae721502fe 100644 --- a/target/linux/generic/patches-4.1/902-debloat_proc.patch +++ b/target/linux/generic/patches-4.1/902-debloat_proc.patch @@ -1,6 +1,6 @@ --- a/fs/locks.c +++ b/fs/locks.c -@@ -2676,6 +2676,8 @@ static const struct file_operations proc +@@ -2674,6 +2674,8 @@ static const struct file_operations proc static int __init proc_locks_init(void) { diff --git a/target/linux/generic/patches-4.1/903-debloat_direct_io.patch b/target/linux/generic/patches-4.1/903-debloat_direct_io.patch index 0bc9040170..ca35e57619 100644 --- a/target/linux/generic/patches-4.1/903-debloat_direct_io.patch +++ b/target/linux/generic/patches-4.1/903-debloat_direct_io.patch @@ -26,7 +26,7 @@ endif --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -2647,6 +2647,7 @@ enum { +@@ -2657,6 +2657,7 @@ enum { DIO_SKIP_DIO_COUNT = 0x08, }; @@ -34,7 +34,7 @@ void dio_end_io(struct bio *bio, int error); ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, -@@ -2654,6 +2655,18 @@ ssize_t __blockdev_direct_IO(struct kioc +@@ -2664,6 +2665,18 @@ ssize_t __blockdev_direct_IO(struct kioc loff_t offset, get_block_t get_block, dio_iodone_t end_io, dio_submit_t submit_io, int flags); diff --git a/target/linux/mediatek/patches/0001-clk-make-strings-in-parent-name-arrays-const.patch b/target/linux/mediatek/patches/0001-clk-make-strings-in-parent-name-arrays-const.patch index 3dca509648..33f51b9f4f 100644 --- a/target/linux/mediatek/patches/0001-clk-make-strings-in-parent-name-arrays-const.patch +++ b/target/linux/mediatek/patches/0001-clk-make-strings-in-parent-name-arrays-const.patch @@ -23,11 +23,9 @@ Acked-by: Uwe Kleine-König include/linux/clk-provider.h | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) -diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c -index 956b7e5..077f4c7 100644 --- a/drivers/clk/clk-composite.c +++ b/drivers/clk/clk-composite.c -@@ -188,7 +188,7 @@ static void clk_composite_disable(struct clk_hw *hw) +@@ -188,7 +188,7 @@ static void clk_composite_disable(struct } struct clk *clk_register_composite(struct device *dev, const char *name, @@ -36,8 +34,6 @@ index 956b7e5..077f4c7 100644 struct clk_hw *mux_hw, const struct clk_ops *mux_ops, struct clk_hw *rate_hw, const struct clk_ops *rate_ops, struct clk_hw *gate_hw, const struct clk_ops *gate_ops, -diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c -index 69a094c..1fa2a8d 100644 --- a/drivers/clk/clk-mux.c +++ b/drivers/clk/clk-mux.c @@ -114,7 +114,7 @@ const struct clk_ops clk_mux_ro_ops = { @@ -49,7 +45,7 @@ index 69a094c..1fa2a8d 100644 void __iomem *reg, u8 shift, u32 mask, u8 clk_mux_flags, u32 *table, spinlock_t *lock) { -@@ -166,7 +166,7 @@ struct clk *clk_register_mux_table(struct device *dev, const char *name, +@@ -166,7 +166,7 @@ struct clk *clk_register_mux_table(struc EXPORT_SYMBOL_GPL(clk_register_mux_table); struct clk *clk_register_mux(struct device *dev, const char *name, @@ -58,8 +54,6 @@ index 69a094c..1fa2a8d 100644 void __iomem *reg, u8 shift, u8 width, u8 clk_mux_flags, spinlock_t *lock) { -diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h -index df69531..ec609e5 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -209,7 +209,7 @@ struct clk_ops { @@ -95,6 +89,3 @@ index df69531..ec609e5 100644 struct clk_hw *mux_hw, const struct clk_ops *mux_ops, struct clk_hw *rate_hw, const struct clk_ops *rate_ops, struct clk_hw *gate_hw, const struct clk_ops *gate_ops, --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0002-clk-mediatek-Add-initial-common-clock-support-for-Me.patch b/target/linux/mediatek/patches/0002-clk-mediatek-Add-initial-common-clock-support-for-Me.patch index d5f52d15e8..7d5cfdf87e 100644 --- a/target/linux/mediatek/patches/0002-clk-mediatek-Add-initial-common-clock-support-for-Me.patch +++ b/target/linux/mediatek/patches/0002-clk-mediatek-Add-initial-common-clock-support-for-Me.patch @@ -26,8 +26,6 @@ Signed-off-by: Sascha Hauer create mode 100644 drivers/clk/mediatek/clk-mtk.h create mode 100644 drivers/clk/mediatek/clk-pll.c -diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile -index 3d00c25..d965b3f 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -51,6 +51,7 @@ obj-$(CONFIG_ARCH_HI3xxx) += hisilicon/ @@ -38,16 +36,10 @@ index 3d00c25..d965b3f 100644 ifeq ($(CONFIG_COMMON_CLK), y) obj-$(CONFIG_ARCH_MMP) += mmp/ endif -diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile -new file mode 100644 -index 0000000..c384e97 --- /dev/null +++ b/drivers/clk/mediatek/Makefile @@ -0,0 +1 @@ +obj-y += clk-mtk.o clk-pll.o clk-gate.o -diff --git a/drivers/clk/mediatek/clk-gate.c b/drivers/clk/mediatek/clk-gate.c -new file mode 100644 -index 0000000..9d77ee3 --- /dev/null +++ b/drivers/clk/mediatek/clk-gate.c @@ -0,0 +1,137 @@ @@ -188,9 +180,6 @@ index 0000000..9d77ee3 + + return clk; +} -diff --git a/drivers/clk/mediatek/clk-gate.h b/drivers/clk/mediatek/clk-gate.h -new file mode 100644 -index 0000000..6b6780b --- /dev/null +++ b/drivers/clk/mediatek/clk-gate.h @@ -0,0 +1,49 @@ @@ -243,9 +232,6 @@ index 0000000..6b6780b + const struct clk_ops *ops); + +#endif /* __DRV_CLK_GATE_H */ -diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c -new file mode 100644 -index 0000000..18444ae --- /dev/null +++ b/drivers/clk/mediatek/clk-mtk.c @@ -0,0 +1,220 @@ @@ -469,9 +455,6 @@ index 0000000..18444ae + clk_data->clks[mc->id] = clk; + } +} -diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h -new file mode 100644 -index 0000000..694fc39 --- /dev/null +++ b/drivers/clk/mediatek/clk-mtk.h @@ -0,0 +1,159 @@ @@ -634,9 +617,6 @@ index 0000000..694fc39 + struct clk_onecell_data *clk_data); + +#endif /* __DRV_CLK_MTK_H */ -diff --git a/drivers/clk/mediatek/clk-pll.c b/drivers/clk/mediatek/clk-pll.c -new file mode 100644 -index 0000000..66154ca --- /dev/null +++ b/drivers/clk/mediatek/clk-pll.c @@ -0,0 +1,332 @@ @@ -972,6 +952,3 @@ index 0000000..66154ca + pr_err("%s(): could not register clock provider: %d\n", + __func__, r); +} --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0003-clk-mediatek-Add-reset-controller-support.patch b/target/linux/mediatek/patches/0003-clk-mediatek-Add-reset-controller-support.patch index bb6f64b9b2..d54cb34a63 100644 --- a/target/linux/mediatek/patches/0003-clk-mediatek-Add-reset-controller-support.patch +++ b/target/linux/mediatek/patches/0003-clk-mediatek-Add-reset-controller-support.patch @@ -21,18 +21,14 @@ Acked-by: Philipp Zabel 3 files changed, 108 insertions(+) create mode 100644 drivers/clk/mediatek/reset.c -diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile -index c384e97..0b6f1c3 100644 --- a/drivers/clk/mediatek/Makefile +++ b/drivers/clk/mediatek/Makefile @@ -1 +1,2 @@ obj-y += clk-mtk.o clk-pll.o clk-gate.o +obj-$(CONFIG_RESET_CONTROLLER) += reset.o -diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h -index 694fc39..61035b9 100644 --- a/drivers/clk/mediatek/clk-mtk.h +++ b/drivers/clk/mediatek/clk-mtk.h -@@ -156,4 +156,14 @@ void __init mtk_clk_register_plls(struct device_node *node, +@@ -156,4 +156,14 @@ void __init mtk_clk_register_plls(struct const struct mtk_pll_data *plls, int num_plls, struct clk_onecell_data *clk_data); @@ -47,9 +43,6 @@ index 694fc39..61035b9 100644 +#endif + #endif /* __DRV_CLK_MTK_H */ -diff --git a/drivers/clk/mediatek/reset.c b/drivers/clk/mediatek/reset.c -new file mode 100644 -index 0000000..9e9fe4b --- /dev/null +++ b/drivers/clk/mediatek/reset.c @@ -0,0 +1,97 @@ @@ -150,6 +143,3 @@ index 0000000..9e9fe4b + return; + } +} --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0004-clk-mediatek-Add-basic-clocks-for-Mediatek-MT8135.patch b/target/linux/mediatek/patches/0004-clk-mediatek-Add-basic-clocks-for-Mediatek-MT8135.patch index 8666128ddc..58bbf5ffec 100644 --- a/target/linux/mediatek/patches/0004-clk-mediatek-Add-basic-clocks-for-Mediatek-MT8135.patch +++ b/target/linux/mediatek/patches/0004-clk-mediatek-Add-basic-clocks-for-Mediatek-MT8135.patch @@ -19,17 +19,12 @@ Signed-off-by: Sascha Hauer create mode 100644 include/dt-bindings/clock/mt8135-clk.h create mode 100644 include/dt-bindings/reset-controller/mt8135-resets.h -diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile -index 0b6f1c3..12ce576 100644 --- a/drivers/clk/mediatek/Makefile +++ b/drivers/clk/mediatek/Makefile @@ -1,2 +1,3 @@ obj-y += clk-mtk.o clk-pll.o clk-gate.o obj-$(CONFIG_RESET_CONTROLLER) += reset.o +obj-y += clk-mt8135.o -diff --git a/drivers/clk/mediatek/clk-mt8135.c b/drivers/clk/mediatek/clk-mt8135.c -new file mode 100644 -index 0000000..a63435b --- /dev/null +++ b/drivers/clk/mediatek/clk-mt8135.c @@ -0,0 +1,644 @@ @@ -677,9 +672,6 @@ index 0000000..a63435b +} +CLK_OF_DECLARE(mtk_apmixedsys, "mediatek,mt8135-apmixedsys", + mtk_apmixedsys_init); -diff --git a/include/dt-bindings/clock/mt8135-clk.h b/include/dt-bindings/clock/mt8135-clk.h -new file mode 100644 -index 0000000..6dac6c0 --- /dev/null +++ b/include/dt-bindings/clock/mt8135-clk.h @@ -0,0 +1,194 @@ @@ -877,9 +869,6 @@ index 0000000..6dac6c0 +#define CLK_PERI_NR_CLK 46 + +#endif /* _DT_BINDINGS_CLK_MT8135_H */ -diff --git a/include/dt-bindings/reset-controller/mt8135-resets.h b/include/dt-bindings/reset-controller/mt8135-resets.h -new file mode 100644 -index 0000000..1fb6295 --- /dev/null +++ b/include/dt-bindings/reset-controller/mt8135-resets.h @@ -0,0 +1,64 @@ @@ -947,6 +936,3 @@ index 0000000..1fb6295 +#define MT8135_PERI_PWRAP_BRIDGE_SW_RST 34 + +#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT8135 */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0005-clk-mediatek-Add-basic-clocks-for-Mediatek-MT8173.patch b/target/linux/mediatek/patches/0005-clk-mediatek-Add-basic-clocks-for-Mediatek-MT8173.patch index 9c0e2891a7..1e18660c72 100644 --- a/target/linux/mediatek/patches/0005-clk-mediatek-Add-basic-clocks-for-Mediatek-MT8173.patch +++ b/target/linux/mediatek/patches/0005-clk-mediatek-Add-basic-clocks-for-Mediatek-MT8173.patch @@ -19,8 +19,6 @@ Signed-off-by: Sascha Hauer create mode 100644 include/dt-bindings/clock/mt8173-clk.h create mode 100644 include/dt-bindings/reset-controller/mt8173-resets.h -diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile -index 12ce576..8e4b2a4 100644 --- a/drivers/clk/mediatek/Makefile +++ b/drivers/clk/mediatek/Makefile @@ -1,3 +1,4 @@ @@ -28,9 +26,6 @@ index 12ce576..8e4b2a4 100644 obj-$(CONFIG_RESET_CONTROLLER) += reset.o obj-y += clk-mt8135.o +obj-y += clk-mt8173.o -diff --git a/drivers/clk/mediatek/clk-mt8173.c b/drivers/clk/mediatek/clk-mt8173.c -new file mode 100644 -index 0000000..357b080 --- /dev/null +++ b/drivers/clk/mediatek/clk-mt8173.c @@ -0,0 +1,830 @@ @@ -864,9 +859,6 @@ index 0000000..357b080 +} +CLK_OF_DECLARE(mtk_apmixedsys, "mediatek,mt8173-apmixedsys", + mtk_apmixedsys_init); -diff --git a/include/dt-bindings/clock/mt8173-clk.h b/include/dt-bindings/clock/mt8173-clk.h -new file mode 100644 -index 0000000..4ad76ed --- /dev/null +++ b/include/dt-bindings/clock/mt8173-clk.h @@ -0,0 +1,235 @@ @@ -1105,9 +1097,6 @@ index 0000000..4ad76ed +#define CLK_PERI_NR_CLK 40 + +#endif /* _DT_BINDINGS_CLK_MT8173_H */ -diff --git a/include/dt-bindings/reset-controller/mt8173-resets.h b/include/dt-bindings/reset-controller/mt8173-resets.h -new file mode 100644 -index 0000000..9464b37 --- /dev/null +++ b/include/dt-bindings/reset-controller/mt8173-resets.h @@ -0,0 +1,63 @@ @@ -1174,6 +1163,3 @@ index 0000000..9464b37 +#define MT8173_PERI_SPI0_SW_RST 33 + +#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT8173 */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0006-soc-mediatek-Add-infracfg-misc-driver-support.patch b/target/linux/mediatek/patches/0006-soc-mediatek-Add-infracfg-misc-driver-support.patch index f47c19373e..96652d4998 100644 --- a/target/linux/mediatek/patches/0006-soc-mediatek-Add-infracfg-misc-driver-support.patch +++ b/target/linux/mediatek/patches/0006-soc-mediatek-Add-infracfg-misc-driver-support.patch @@ -18,8 +18,6 @@ Signed-off-by: Sascha Hauer create mode 100644 drivers/soc/mediatek/mtk-infracfg.c create mode 100644 include/linux/soc/mediatek/infracfg.h -diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig -index 3c18503..09da41e 100644 --- a/drivers/soc/mediatek/Kconfig +++ b/drivers/soc/mediatek/Kconfig @@ -1,6 +1,15 @@ @@ -38,16 +36,11 @@ index 3c18503..09da41e 100644 config MTK_PMIC_WRAP tristate "MediaTek PMIC Wrapper Support" depends on ARCH_MEDIATEK -diff --git a/drivers/soc/mediatek/Makefile b/drivers/soc/mediatek/Makefile -index ecaf4de..3fa940f 100644 --- a/drivers/soc/mediatek/Makefile +++ b/drivers/soc/mediatek/Makefile @@ -1 +1,2 @@ +obj-$(CONFIG_MTK_INFRACFG) += mtk-infracfg.o obj-$(CONFIG_MTK_PMIC_WRAP) += mtk-pmic-wrap.o -diff --git a/drivers/soc/mediatek/mtk-infracfg.c b/drivers/soc/mediatek/mtk-infracfg.c -new file mode 100644 -index 0000000..ca786e0 --- /dev/null +++ b/drivers/soc/mediatek/mtk-infracfg.c @@ -0,0 +1,91 @@ @@ -142,9 +135,6 @@ index 0000000..ca786e0 + + return 0; +} -diff --git a/include/linux/soc/mediatek/infracfg.h b/include/linux/soc/mediatek/infracfg.h -new file mode 100644 -index 0000000..a5714e9 --- /dev/null +++ b/include/linux/soc/mediatek/infracfg.h @@ -0,0 +1,26 @@ @@ -174,6 +164,3 @@ index 0000000..a5714e9 +int mtk_infracfg_clear_bus_protection(struct regmap *infracfg, u32 mask); + +#endif /* __SOC_MEDIATEK_INFRACFG_H */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0007-dt-bindings-soc-Add-documentation-for-the-MediaTek-S.patch b/target/linux/mediatek/patches/0007-dt-bindings-soc-Add-documentation-for-the-MediaTek-S.patch index f7bdbd6e0c..fd0ef48ff1 100644 --- a/target/linux/mediatek/patches/0007-dt-bindings-soc-Add-documentation-for-the-MediaTek-S.patch +++ b/target/linux/mediatek/patches/0007-dt-bindings-soc-Add-documentation-for-the-MediaTek-S.patch @@ -12,9 +12,6 @@ Signed-off-by: Sascha Hauer 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/scpsys.txt -diff --git a/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt b/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt -new file mode 100644 -index 0000000..87f2091 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt @@ -0,0 +1,34 @@ @@ -52,6 +49,3 @@ index 0000000..87f2091 + compatible = "mediatek,mt8173-afe-pcm"; + power-domains = <&scpsys MT8173_POWER_DOMAIN_AUDIO>; + }; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0008-soc-Mediatek-Add-SCPSYS-power-domain-driver.patch b/target/linux/mediatek/patches/0008-soc-Mediatek-Add-SCPSYS-power-domain-driver.patch index bbf5ad135e..63a8cef891 100644 --- a/target/linux/mediatek/patches/0008-soc-Mediatek-Add-SCPSYS-power-domain-driver.patch +++ b/target/linux/mediatek/patches/0008-soc-Mediatek-Add-SCPSYS-power-domain-driver.patch @@ -26,8 +26,6 @@ Signed-off-by: Sascha Hauer create mode 100644 drivers/soc/mediatek/mtk-scpsys.c create mode 100644 include/dt-bindings/power/mt8173-power.h -diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig -index 09da41e..2dc5d90 100644 --- a/drivers/soc/mediatek/Kconfig +++ b/drivers/soc/mediatek/Kconfig @@ -19,3 +19,12 @@ config MTK_PMIC_WRAP @@ -43,17 +41,12 @@ index 09da41e..2dc5d90 100644 + help + Say yes here to add support for the MediaTek SCPSYS power domain + driver. -diff --git a/drivers/soc/mediatek/Makefile b/drivers/soc/mediatek/Makefile -index 3fa940f..12998b0 100644 --- a/drivers/soc/mediatek/Makefile +++ b/drivers/soc/mediatek/Makefile @@ -1,2 +1,3 @@ obj-$(CONFIG_MTK_INFRACFG) += mtk-infracfg.o obj-$(CONFIG_MTK_PMIC_WRAP) += mtk-pmic-wrap.o +obj-$(CONFIG_MTK_SCPSYS) += mtk-scpsys.o -diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c -new file mode 100644 -index 0000000..b9eed37 --- /dev/null +++ b/drivers/soc/mediatek/mtk-scpsys.c @@ -0,0 +1,490 @@ @@ -547,9 +540,6 @@ index 0000000..b9eed37 +}; + +module_platform_driver_probe(scpsys_drv, scpsys_probe); -diff --git a/include/dt-bindings/power/mt8173-power.h b/include/dt-bindings/power/mt8173-power.h -new file mode 100644 -index 0000000..b34cee9 --- /dev/null +++ b/include/dt-bindings/power/mt8173-power.h @@ -0,0 +1,15 @@ @@ -568,6 +558,3 @@ index 0000000..b34cee9 +#define MT8173_POWER_DOMAIN_MFG 9 + +#endif /* _DT_BINDINGS_POWER_MT8183_POWER_H */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0009-dt-bindings-ARM-Mediatek-Document-devicetree-binding.patch b/target/linux/mediatek/patches/0009-dt-bindings-ARM-Mediatek-Document-devicetree-binding.patch index 6d7fd47577..27587e5909 100644 --- a/target/linux/mediatek/patches/0009-dt-bindings-ARM-Mediatek-Document-devicetree-binding.patch +++ b/target/linux/mediatek/patches/0009-dt-bindings-ARM-Mediatek-Document-devicetree-binding.patch @@ -19,9 +19,6 @@ Signed-off-by: Sascha Hauer create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt -diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt -new file mode 100644 -index 0000000..5af6d73 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt @@ -0,0 +1,23 @@ @@ -48,9 +45,6 @@ index 0000000..5af6d73 + reg = <0 0x10209000 0 0x1000>; + #clock-cells = <1>; +}; -diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt -new file mode 100644 -index 0000000..684da473 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt @@ -0,0 +1,30 @@ @@ -84,9 +78,6 @@ index 0000000..684da473 + #clock-cells = <1>; + #reset-cells = <1>; +}; -diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt -new file mode 100644 -index 0000000..fdb45c6 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt @@ -0,0 +1,30 @@ @@ -120,9 +111,6 @@ index 0000000..fdb45c6 + #clock-cells = <1>; + #reset-cells = <1>; +}; -diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt -new file mode 100644 -index 0000000..a425248 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt @@ -0,0 +1,23 @@ @@ -149,6 +137,3 @@ index 0000000..a425248 + reg = <0 0x10000000 0 0x1000>; + #clock-cells = <1>; +}; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0010-thermal-consistently-use-int-for-temperatures.patch b/target/linux/mediatek/patches/0010-thermal-consistently-use-int-for-temperatures.patch index 2aa83abb93..88aa72553c 100644 --- a/target/linux/mediatek/patches/0010-thermal-consistently-use-int-for-temperatures.patch +++ b/target/linux/mediatek/patches/0010-thermal-consistently-use-int-for-temperatures.patch @@ -42,11 +42,9 @@ Signed-off-by: Sascha Hauer include/linux/thermal.h | 26 ++++++++----------- 29 files changed, 120 insertions(+), 134 deletions(-) -diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c -index d24fa19..68bff60 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c -@@ -529,8 +529,7 @@ static void acpi_thermal_check(void *data) +@@ -529,8 +529,7 @@ static void acpi_thermal_check(void *dat /* sys I/F for generic thermal sysfs support */ @@ -56,7 +54,7 @@ index d24fa19..68bff60 100644 { struct acpi_thermal *tz = thermal->devdata; int result; -@@ -637,7 +636,7 @@ static int thermal_get_trip_type(struct thermal_zone_device *thermal, +@@ -637,7 +636,7 @@ static int thermal_get_trip_type(struct } static int thermal_get_trip_temp(struct thermal_zone_device *thermal, @@ -65,7 +63,7 @@ index d24fa19..68bff60 100644 { struct acpi_thermal *tz = thermal->devdata; int i; -@@ -690,7 +689,8 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal, +@@ -690,7 +689,8 @@ static int thermal_get_trip_temp(struct } static int thermal_get_crit_temp(struct thermal_zone_device *thermal, @@ -75,7 +73,7 @@ index d24fa19..68bff60 100644 struct acpi_thermal *tz = thermal->devdata; if (tz->trips.critical.flags.valid) { -@@ -713,8 +713,8 @@ static int thermal_get_trend(struct thermal_zone_device *thermal, +@@ -713,8 +713,8 @@ static int thermal_get_trend(struct ther return -EINVAL; if (type == THERMAL_TRIP_ACTIVE) { @@ -86,11 +84,9 @@ index d24fa19..68bff60 100644 tz->temperature, tz->kelvin_offset); if (thermal_get_trip_temp(thermal, trip, &trip_temp)) return -EINVAL; -diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c -index fe41d5a..e4e57bb 100644 --- a/drivers/hwmon/lm75.c +++ b/drivers/hwmon/lm75.c -@@ -104,7 +104,7 @@ static inline long lm75_reg_to_mc(s16 temp, u8 resolution) +@@ -104,7 +104,7 @@ static inline long lm75_reg_to_mc(s16 te /* sysfs attributes for hwmon */ @@ -99,11 +95,9 @@ index fe41d5a..e4e57bb 100644 { struct lm75_data *data = lm75_update_device(dev); -diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c -index 6880011..3d9eab9 100644 --- a/drivers/hwmon/ntc_thermistor.c +++ b/drivers/hwmon/ntc_thermistor.c -@@ -439,7 +439,7 @@ static int ntc_thermistor_get_ohm(struct ntc_data *data) +@@ -439,7 +439,7 @@ static int ntc_thermistor_get_ohm(struct return -EINVAL; } @@ -112,11 +106,9 @@ index 6880011..3d9eab9 100644 { struct ntc_data *data = dev_get_drvdata(dev); int ohm; -diff --git a/drivers/hwmon/tmp102.c b/drivers/hwmon/tmp102.c -index 9da2735..6548262 100644 --- a/drivers/hwmon/tmp102.c +++ b/drivers/hwmon/tmp102.c -@@ -98,7 +98,7 @@ static struct tmp102 *tmp102_update_device(struct device *dev) +@@ -98,7 +98,7 @@ static struct tmp102 *tmp102_update_devi return tmp102; } @@ -125,11 +117,9 @@ index 9da2735..6548262 100644 { struct tmp102 *tmp102 = tmp102_update_device(dev); -diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c -index c011699..4857943 100644 --- a/drivers/input/touchscreen/sun4i-ts.c +++ b/drivers/input/touchscreen/sun4i-ts.c -@@ -191,7 +191,7 @@ static void sun4i_ts_close(struct input_dev *dev) +@@ -191,7 +191,7 @@ static void sun4i_ts_close(struct input_ writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC); } @@ -138,7 +128,7 @@ index c011699..4857943 100644 { /* No temp_data until the first irq */ if (ts->temp_data == -1) -@@ -202,7 +202,7 @@ static int sun4i_get_temp(const struct sun4i_ts_data *ts, long *temp) +@@ -202,7 +202,7 @@ static int sun4i_get_temp(const struct s return 0; } @@ -147,7 +137,7 @@ index c011699..4857943 100644 { return sun4i_get_temp(data, temp); } -@@ -215,14 +215,14 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *devattr, +@@ -215,14 +215,14 @@ static ssize_t show_temp(struct device * char *buf) { struct sun4i_ts_data *ts = dev_get_drvdata(dev); @@ -164,11 +154,9 @@ index c011699..4857943 100644 } static ssize_t show_temp_label(struct device *dev, -diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c -index 594c918..f2ce63c 100644 --- a/drivers/platform/x86/acerhdf.c +++ b/drivers/platform/x86/acerhdf.c -@@ -346,8 +346,7 @@ static void acerhdf_check_param(struct thermal_zone_device *thermal) +@@ -346,8 +346,7 @@ static void acerhdf_check_param(struct t * as late as the polling interval is since we can't do that in the respective * accessors of the module parameters. */ @@ -178,7 +166,7 @@ index 594c918..f2ce63c 100644 { int temp, err = 0; -@@ -452,7 +451,7 @@ static int acerhdf_get_trip_type(struct thermal_zone_device *thermal, int trip, +@@ -452,7 +451,7 @@ static int acerhdf_get_trip_type(struct } static int acerhdf_get_trip_hyst(struct thermal_zone_device *thermal, int trip, @@ -187,7 +175,7 @@ index 594c918..f2ce63c 100644 { if (trip != 0) return -EINVAL; -@@ -463,7 +462,7 @@ static int acerhdf_get_trip_hyst(struct thermal_zone_device *thermal, int trip, +@@ -463,7 +462,7 @@ static int acerhdf_get_trip_hyst(struct } static int acerhdf_get_trip_temp(struct thermal_zone_device *thermal, int trip, @@ -196,7 +184,7 @@ index 594c918..f2ce63c 100644 { if (trip == 0) *temp = fanon; -@@ -476,7 +475,7 @@ static int acerhdf_get_trip_temp(struct thermal_zone_device *thermal, int trip, +@@ -476,7 +475,7 @@ static int acerhdf_get_trip_temp(struct } static int acerhdf_get_crit_temp(struct thermal_zone_device *thermal, @@ -205,11 +193,9 @@ index 594c918..f2ce63c 100644 { *temperature = ACERHDF_TEMP_CRIT; return 0; -diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c -index 2ed4a4a..87e2fd1 100644 --- a/drivers/power/power_supply_core.c +++ b/drivers/power/power_supply_core.c -@@ -492,7 +492,7 @@ EXPORT_SYMBOL_GPL(power_supply_unreg_notifier); +@@ -518,7 +518,7 @@ EXPORT_SYMBOL_GPL(power_supply_unreg_not #ifdef CONFIG_THERMAL static int power_supply_read_temp(struct thermal_zone_device *tzd, @@ -218,11 +204,9 @@ index 2ed4a4a..87e2fd1 100644 { struct power_supply *psy; union power_supply_propval val; -diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c -index 01255fd..26b8d32 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c -@@ -155,7 +155,7 @@ static bool armada_is_valid(struct armada_thermal_priv *priv) +@@ -155,7 +155,7 @@ static bool armada_is_valid(struct armad } static int armada_get_temp(struct thermal_zone_device *thermal, @@ -231,11 +215,9 @@ index 01255fd..26b8d32 100644 { struct armada_thermal_priv *priv = thermal->devdata; unsigned long reg; -diff --git a/drivers/thermal/db8500_thermal.c b/drivers/thermal/db8500_thermal.c -index 20adfbe..b3eca71 100644 --- a/drivers/thermal/db8500_thermal.c +++ b/drivers/thermal/db8500_thermal.c -@@ -107,8 +107,7 @@ static int db8500_cdev_unbind(struct thermal_zone_device *thermal, +@@ -107,8 +107,7 @@ static int db8500_cdev_unbind(struct the } /* Callback to get current temperature */ @@ -245,7 +227,7 @@ index 20adfbe..b3eca71 100644 { struct db8500_thermal_zone *pzone = thermal->devdata; -@@ -180,7 +179,7 @@ static int db8500_sys_get_trip_type(struct thermal_zone_device *thermal, +@@ -180,7 +179,7 @@ static int db8500_sys_get_trip_type(stru /* Callback to get trip point temperature */ static int db8500_sys_get_trip_temp(struct thermal_zone_device *thermal, @@ -254,7 +236,7 @@ index 20adfbe..b3eca71 100644 { struct db8500_thermal_zone *pzone = thermal->devdata; struct db8500_thsens_platform_data *ptrips = pzone->trip_tab; -@@ -195,7 +194,7 @@ static int db8500_sys_get_trip_temp(struct thermal_zone_device *thermal, +@@ -195,7 +194,7 @@ static int db8500_sys_get_trip_temp(stru /* Callback to get critical trip point temperature */ static int db8500_sys_get_crit_temp(struct thermal_zone_device *thermal, @@ -263,11 +245,9 @@ index 20adfbe..b3eca71 100644 { struct db8500_thermal_zone *pzone = thermal->devdata; struct db8500_thsens_platform_data *ptrips = pzone->trip_tab; -diff --git a/drivers/thermal/dove_thermal.c b/drivers/thermal/dove_thermal.c -index 09f6e30..a0bc9de 100644 --- a/drivers/thermal/dove_thermal.c +++ b/drivers/thermal/dove_thermal.c -@@ -93,7 +93,7 @@ static int dove_init_sensor(const struct dove_thermal_priv *priv) +@@ -93,7 +93,7 @@ static int dove_init_sensor(const struct } static int dove_get_temp(struct thermal_zone_device *thermal, @@ -276,8 +256,6 @@ index 09f6e30..a0bc9de 100644 { unsigned long reg; struct dove_thermal_priv *priv = thermal->devdata; -diff --git a/drivers/thermal/fair_share.c b/drivers/thermal/fair_share.c -index 6e0a3fb..efad70e 100644 --- a/drivers/thermal/fair_share.c +++ b/drivers/thermal/fair_share.c @@ -34,7 +34,7 @@ @@ -289,8 +267,6 @@ index 6e0a3fb..efad70e 100644 enum thermal_trip_type trip_type; if (tz->trips == 0 || !tz->ops->get_trip_temp) -diff --git a/drivers/thermal/gov_bang_bang.c b/drivers/thermal/gov_bang_bang.c -index c5dd76b..70836c5 100644 --- a/drivers/thermal/gov_bang_bang.c +++ b/drivers/thermal/gov_bang_bang.c @@ -25,14 +25,13 @@ @@ -310,8 +286,6 @@ index c5dd76b..70836c5 100644 trip, trip_temp, tz->temperature, trip_hyst); -diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c -index 2ccbc07..f1424f0 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -98,10 +98,10 @@ struct imx_thermal_data { @@ -338,7 +312,7 @@ index 2ccbc07..f1424f0 100644 { struct regmap *map = data->tempmon; int critical_value; -@@ -121,7 +121,7 @@ static void imx_set_panic_temp(struct imx_thermal_data *data, +@@ -121,7 +121,7 @@ static void imx_set_panic_temp(struct im } static void imx_set_alarm_temp(struct imx_thermal_data *data, @@ -347,7 +321,7 @@ index 2ccbc07..f1424f0 100644 { struct regmap *map = data->tempmon; int alarm_value; -@@ -133,7 +133,7 @@ static void imx_set_alarm_temp(struct imx_thermal_data *data, +@@ -133,7 +133,7 @@ static void imx_set_alarm_temp(struct im TEMPSENSE0_ALARM_VALUE_SHIFT); } @@ -356,7 +330,7 @@ index 2ccbc07..f1424f0 100644 { struct imx_thermal_data *data = tz->devdata; struct regmap *map = data->tempmon; -@@ -189,13 +189,13 @@ static int imx_get_temp(struct thermal_zone_device *tz, unsigned long *temp) +@@ -189,13 +189,13 @@ static int imx_get_temp(struct thermal_z if (data->alarm_temp == data->temp_critical && *temp < data->temp_passive) { imx_set_alarm_temp(data, data->temp_passive); @@ -372,7 +346,7 @@ index 2ccbc07..f1424f0 100644 data->last_temp = *temp; } -@@ -262,8 +262,7 @@ static int imx_get_trip_type(struct thermal_zone_device *tz, int trip, +@@ -262,8 +262,7 @@ static int imx_get_trip_type(struct ther return 0; } @@ -382,7 +356,7 @@ index 2ccbc07..f1424f0 100644 { struct imx_thermal_data *data = tz->devdata; -@@ -272,7 +271,7 @@ static int imx_get_crit_temp(struct thermal_zone_device *tz, +@@ -272,7 +271,7 @@ static int imx_get_crit_temp(struct ther } static int imx_get_trip_temp(struct thermal_zone_device *tz, int trip, @@ -391,7 +365,7 @@ index 2ccbc07..f1424f0 100644 { struct imx_thermal_data *data = tz->devdata; -@@ -282,7 +281,7 @@ static int imx_get_trip_temp(struct thermal_zone_device *tz, int trip, +@@ -282,7 +281,7 @@ static int imx_get_trip_temp(struct ther } static int imx_set_trip_temp(struct thermal_zone_device *tz, int trip, @@ -400,7 +374,7 @@ index 2ccbc07..f1424f0 100644 { struct imx_thermal_data *data = tz->devdata; -@@ -433,7 +432,7 @@ static irqreturn_t imx_thermal_alarm_irq_thread(int irq, void *dev) +@@ -433,7 +432,7 @@ static irqreturn_t imx_thermal_alarm_irq { struct imx_thermal_data *data = dev; @@ -409,8 +383,6 @@ index 2ccbc07..f1424f0 100644 data->alarm_temp / 1000); thermal_zone_device_update(data->tz); -diff --git a/drivers/thermal/int340x_thermal/int340x_thermal_zone.c b/drivers/thermal/int340x_thermal/int340x_thermal_zone.c -index 1e25133..b9b2666 100644 --- a/drivers/thermal/int340x_thermal/int340x_thermal_zone.c +++ b/drivers/thermal/int340x_thermal/int340x_thermal_zone.c @@ -20,7 +20,7 @@ @@ -422,7 +394,7 @@ index 1e25133..b9b2666 100644 { struct int34x_thermal_zone *d = zone->devdata; unsigned long long tmp; -@@ -49,7 +49,7 @@ static int int340x_thermal_get_zone_temp(struct thermal_zone_device *zone, +@@ -49,7 +49,7 @@ static int int340x_thermal_get_zone_temp } static int int340x_thermal_get_trip_temp(struct thermal_zone_device *zone, @@ -431,7 +403,7 @@ index 1e25133..b9b2666 100644 { struct int34x_thermal_zone *d = zone->devdata; int i; -@@ -114,7 +114,7 @@ static int int340x_thermal_get_trip_type(struct thermal_zone_device *zone, +@@ -114,7 +114,7 @@ static int int340x_thermal_get_trip_type } static int int340x_thermal_set_trip_temp(struct thermal_zone_device *zone, @@ -440,7 +412,7 @@ index 1e25133..b9b2666 100644 { struct int34x_thermal_zone *d = zone->devdata; acpi_status status; -@@ -136,7 +136,7 @@ static int int340x_thermal_set_trip_temp(struct thermal_zone_device *zone, +@@ -136,7 +136,7 @@ static int int340x_thermal_set_trip_temp static int int340x_thermal_get_trip_hyst(struct thermal_zone_device *zone, @@ -449,7 +421,7 @@ index 1e25133..b9b2666 100644 { struct int34x_thermal_zone *d = zone->devdata; acpi_status status; -@@ -163,7 +163,7 @@ static struct thermal_zone_device_ops int340x_thermal_zone_ops = { +@@ -163,7 +163,7 @@ static struct thermal_zone_device_ops in }; static int int340x_thermal_get_trip_config(acpi_handle handle, char *name, @@ -458,8 +430,6 @@ index 1e25133..b9b2666 100644 { unsigned long long r; acpi_status status; -diff --git a/drivers/thermal/int340x_thermal/int340x_thermal_zone.h b/drivers/thermal/int340x_thermal/int340x_thermal_zone.h -index 9f38ab7..aaadf72 100644 --- a/drivers/thermal/int340x_thermal/int340x_thermal_zone.h +++ b/drivers/thermal/int340x_thermal/int340x_thermal_zone.h @@ -21,7 +21,7 @@ @@ -486,8 +456,6 @@ index 9f38ab7..aaadf72 100644 int hot_trip_id; struct thermal_zone_device *zone; struct thermal_zone_device_ops *override_ops; -diff --git a/drivers/thermal/intel_soc_dts_thermal.c b/drivers/thermal/intel_soc_dts_thermal.c -index 9013505..fd550b9 100644 --- a/drivers/thermal/intel_soc_dts_thermal.c +++ b/drivers/thermal/intel_soc_dts_thermal.c @@ -106,7 +106,7 @@ err_ret: @@ -508,7 +476,7 @@ index 9013505..fd550b9 100644 { struct soc_sensor_entry *aux_entry = tzd->devdata; int status; -@@ -250,8 +250,7 @@ static int sys_get_trip_type(struct thermal_zone_device *thermal, +@@ -250,8 +250,7 @@ static int sys_get_trip_type(struct ther return 0; } @@ -518,8 +486,6 @@ index 9013505..fd550b9 100644 { int status; u32 out; -diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c -index 668fb1b..03839df 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -87,7 +87,7 @@ struct __thermal_zone { @@ -531,7 +497,7 @@ index 668fb1b..03839df 100644 { struct __thermal_zone *data = tz->devdata; -@@ -173,7 +173,7 @@ EXPORT_SYMBOL_GPL(of_thermal_get_trip_points); +@@ -173,7 +173,7 @@ EXPORT_SYMBOL_GPL(of_thermal_get_trip_po * Return: zero on success, error code otherwise */ static int of_thermal_set_emul_temp(struct thermal_zone_device *tz, @@ -540,7 +506,7 @@ index 668fb1b..03839df 100644 { struct __thermal_zone *data = tz->devdata; -@@ -306,7 +306,7 @@ static int of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip, +@@ -306,7 +306,7 @@ static int of_thermal_get_trip_type(stru } static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip, @@ -549,7 +515,7 @@ index 668fb1b..03839df 100644 { struct __thermal_zone *data = tz->devdata; -@@ -319,7 +319,7 @@ static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip, +@@ -319,7 +319,7 @@ static int of_thermal_get_trip_temp(stru } static int of_thermal_set_trip_temp(struct thermal_zone_device *tz, int trip, @@ -558,7 +524,7 @@ index 668fb1b..03839df 100644 { struct __thermal_zone *data = tz->devdata; -@@ -333,7 +333,7 @@ static int of_thermal_set_trip_temp(struct thermal_zone_device *tz, int trip, +@@ -333,7 +333,7 @@ static int of_thermal_set_trip_temp(stru } static int of_thermal_get_trip_hyst(struct thermal_zone_device *tz, int trip, @@ -567,7 +533,7 @@ index 668fb1b..03839df 100644 { struct __thermal_zone *data = tz->devdata; -@@ -346,7 +346,7 @@ static int of_thermal_get_trip_hyst(struct thermal_zone_device *tz, int trip, +@@ -346,7 +346,7 @@ static int of_thermal_get_trip_hyst(stru } static int of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip, @@ -576,7 +542,7 @@ index 668fb1b..03839df 100644 { struct __thermal_zone *data = tz->devdata; -@@ -360,7 +360,7 @@ static int of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip, +@@ -360,7 +360,7 @@ static int of_thermal_set_trip_hyst(stru } static int of_thermal_get_crit_temp(struct thermal_zone_device *tz, @@ -585,8 +551,6 @@ index 668fb1b..03839df 100644 { struct __thermal_zone *data = tz->devdata; int i; -diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c -index fe4e767..5d4ae7d 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -200,8 +200,7 @@ err_out_unlock: @@ -599,7 +563,7 @@ index fe4e767..5d4ae7d 100644 { struct rcar_thermal_priv *priv = rcar_zone_to_priv(zone); -@@ -235,7 +234,7 @@ static int rcar_thermal_get_trip_type(struct thermal_zone_device *zone, +@@ -235,7 +234,7 @@ static int rcar_thermal_get_trip_type(st } static int rcar_thermal_get_trip_temp(struct thermal_zone_device *zone, @@ -608,7 +572,7 @@ index fe4e767..5d4ae7d 100644 { struct rcar_thermal_priv *priv = rcar_zone_to_priv(zone); struct device *dev = rcar_priv_to_dev(priv); -@@ -299,7 +298,7 @@ static void _rcar_thermal_irq_ctrl(struct rcar_thermal_priv *priv, int enable) +@@ -299,7 +298,7 @@ static void _rcar_thermal_irq_ctrl(struc static void rcar_thermal_work(struct work_struct *work) { struct rcar_thermal_priv *priv; @@ -617,8 +581,6 @@ index fe4e767..5d4ae7d 100644 priv = container_of(work, struct rcar_thermal_priv, work.work); -diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c -index cd8f5f93..c89ffb2 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -64,7 +64,7 @@ struct rockchip_tsadc_chip { @@ -630,7 +592,7 @@ index cd8f5f93..c89ffb2 100644 void (*set_tshut_temp)(int chn, void __iomem *reg, long temp); void (*set_tshut_mode)(int chn, void __iomem *reg, enum tshut_mode m); }; -@@ -191,7 +191,7 @@ static u32 rk_tsadcv2_temp_to_code(long temp) +@@ -191,7 +191,7 @@ static u32 rk_tsadcv2_temp_to_code(long return 0; } @@ -639,7 +601,7 @@ index cd8f5f93..c89ffb2 100644 { unsigned int low = 0; unsigned int high = ARRAY_SIZE(v2_code_table) - 1; -@@ -277,7 +277,7 @@ static void rk_tsadcv2_control(void __iomem *regs, bool enable) +@@ -277,7 +277,7 @@ static void rk_tsadcv2_control(void __io writel_relaxed(val, regs + TSADCV2_AUTO_CON); } @@ -648,7 +610,7 @@ index cd8f5f93..c89ffb2 100644 { u32 val; -@@ -366,7 +366,7 @@ static irqreturn_t rockchip_thermal_alarm_irq_thread(int irq, void *dev) +@@ -366,7 +366,7 @@ static irqreturn_t rockchip_thermal_alar return IRQ_HANDLED; } @@ -657,7 +619,7 @@ index cd8f5f93..c89ffb2 100644 { struct rockchip_thermal_sensor *sensor = _sensor; struct rockchip_thermal_data *thermal = sensor->thermal; -@@ -374,7 +374,7 @@ static int rockchip_thermal_get_temp(void *_sensor, long *out_temp) +@@ -374,7 +374,7 @@ static int rockchip_thermal_get_temp(voi int retval; retval = tsadc->get_temp(sensor->id, thermal->regs, out_temp); @@ -666,8 +628,6 @@ index cd8f5f93..c89ffb2 100644 sensor->id, *out_temp, retval); return retval; -diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c -index 1d30b09..29eaf4d 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -181,8 +181,7 @@ struct exynos_tmu_data { @@ -680,7 +640,7 @@ index 1d30b09..29eaf4d 100644 void (*tmu_clear_irqs)(struct exynos_tmu_data *data); }; -@@ -190,7 +189,7 @@ static void exynos_report_trigger(struct exynos_tmu_data *p) +@@ -190,7 +189,7 @@ static void exynos_report_trigger(struct { char data[10], *envp[] = { data, NULL }; struct thermal_zone_device *tz = p->tzd; @@ -689,7 +649,7 @@ index 1d30b09..29eaf4d 100644 unsigned int i; if (!tz) { -@@ -489,7 +488,7 @@ static int exynos5440_tmu_initialize(struct platform_device *pdev) +@@ -489,7 +488,7 @@ static int exynos5440_tmu_initialize(str struct exynos_tmu_data *data = platform_get_drvdata(pdev); unsigned int trim_info = 0, con, rising_threshold; int ret = 0, threshold_code; @@ -698,7 +658,7 @@ index 1d30b09..29eaf4d 100644 /* * For exynos5440 soc triminfo value is swapped between TMU0 and -@@ -542,7 +541,7 @@ static int exynos7_tmu_initialize(struct platform_device *pdev) +@@ -542,7 +541,7 @@ static int exynos7_tmu_initialize(struct unsigned int status, trim_info; unsigned int rising_threshold = 0, falling_threshold = 0; int ret = 0, threshold_code, i; @@ -707,7 +667,7 @@ index 1d30b09..29eaf4d 100644 unsigned int reg_off, bit_off; status = readb(data->base + EXYNOS_TMU_REG_STATUS); -@@ -713,7 +712,7 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on) +@@ -713,7 +712,7 @@ static void exynos7_tmu_control(struct p writel(con, data->base + EXYNOS_TMU_REG_CONTROL); } @@ -716,7 +676,7 @@ index 1d30b09..29eaf4d 100644 { struct exynos_tmu_data *data = p; -@@ -733,7 +732,7 @@ static int exynos_get_temp(void *p, long *temp) +@@ -733,7 +732,7 @@ static int exynos_get_temp(void *p, long #ifdef CONFIG_THERMAL_EMULATION static u32 get_emul_con_reg(struct exynos_tmu_data *data, unsigned int val, @@ -725,7 +685,7 @@ index 1d30b09..29eaf4d 100644 { if (temp) { temp /= MCELSIUS; -@@ -763,7 +762,7 @@ static u32 get_emul_con_reg(struct exynos_tmu_data *data, unsigned int val, +@@ -763,7 +762,7 @@ static u32 get_emul_con_reg(struct exyno } static void exynos4412_tmu_set_emulation(struct exynos_tmu_data *data, @@ -734,7 +694,7 @@ index 1d30b09..29eaf4d 100644 { unsigned int val; u32 emul_con; -@@ -781,7 +780,7 @@ static void exynos4412_tmu_set_emulation(struct exynos_tmu_data *data, +@@ -781,7 +780,7 @@ static void exynos4412_tmu_set_emulation } static void exynos5440_tmu_set_emulation(struct exynos_tmu_data *data, @@ -743,7 +703,7 @@ index 1d30b09..29eaf4d 100644 { unsigned int val; -@@ -790,7 +789,7 @@ static void exynos5440_tmu_set_emulation(struct exynos_tmu_data *data, +@@ -790,7 +789,7 @@ static void exynos5440_tmu_set_emulation writel(val, data->base + EXYNOS5440_TMU_S0_7_DEBUG); } @@ -752,8 +712,6 @@ index 1d30b09..29eaf4d 100644 { struct exynos_tmu_data *data = drv_data; int ret = -EINVAL; -diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c -index bddb717..534dd91 100644 --- a/drivers/thermal/spear_thermal.c +++ b/drivers/thermal/spear_thermal.c @@ -38,7 +38,7 @@ struct spear_thermal_dev { @@ -765,11 +723,9 @@ index bddb717..534dd91 100644 { struct spear_thermal_dev *stdev = thermal->devdata; -diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c -index 76c515d..44cbba9 100644 --- a/drivers/thermal/st/st_thermal.c +++ b/drivers/thermal/st/st_thermal.c -@@ -111,8 +111,7 @@ static int st_thermal_calibration(struct st_thermal_sensor *sensor) +@@ -111,8 +111,7 @@ static int st_thermal_calibration(struct } /* Callback to get temperature from HW*/ @@ -779,7 +735,7 @@ index 76c515d..44cbba9 100644 { struct st_thermal_sensor *sensor = th->devdata; struct device *dev = sensor->dev; -@@ -159,7 +158,7 @@ static int st_thermal_get_trip_type(struct thermal_zone_device *th, +@@ -159,7 +158,7 @@ static int st_thermal_get_trip_type(stru } static int st_thermal_get_trip_temp(struct thermal_zone_device *th, @@ -788,11 +744,9 @@ index 76c515d..44cbba9 100644 { struct st_thermal_sensor *sensor = th->devdata; struct device *dev = sensor->dev; -diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c -index 5a0f12d..2f9f708 100644 --- a/drivers/thermal/step_wise.c +++ b/drivers/thermal/step_wise.c -@@ -113,7 +113,7 @@ static void update_passive_instance(struct thermal_zone_device *tz, +@@ -113,7 +113,7 @@ static void update_passive_instance(stru static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) { @@ -801,7 +755,7 @@ index 5a0f12d..2f9f708 100644 enum thermal_trip_type trip_type; enum thermal_trend trend; struct thermal_instance *instance; -@@ -135,7 +135,7 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) +@@ -135,7 +135,7 @@ static void thermal_zone_trip_update(str trace_thermal_zone_trip(tz, trip, trip_type); } @@ -810,11 +764,9 @@ index 5a0f12d..2f9f708 100644 trip, trip_type, trip_temp, trend, throttle); mutex_lock(&tz->lock); -diff --git a/drivers/thermal/tegra_soctherm.c b/drivers/thermal/tegra_soctherm.c -index 9197fc0..74ea576 100644 --- a/drivers/thermal/tegra_soctherm.c +++ b/drivers/thermal/tegra_soctherm.c -@@ -293,7 +293,7 @@ static int enable_tsensor(struct tegra_soctherm *tegra, +@@ -293,7 +293,7 @@ static int enable_tsensor(struct tegra_s * H denotes an addition of 0.5 Celsius and N denotes negation * of the final value. */ @@ -832,11 +784,9 @@ index 9197fc0..74ea576 100644 { struct tegra_thermctl_zone *zone = data; u32 val; -diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c -index 4108db7..62cc82a 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c -@@ -363,7 +363,7 @@ static void handle_non_critical_trips(struct thermal_zone_device *tz, +@@ -363,7 +363,7 @@ static void handle_non_critical_trips(st static void handle_critical_trips(struct thermal_zone_device *tz, int trip, enum thermal_trip_type trip_type) { @@ -845,7 +795,7 @@ index 4108db7..62cc82a 100644 tz->ops->get_trip_temp(tz, trip, &trip_temp); -@@ -411,12 +411,12 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip) +@@ -411,12 +411,12 @@ static void handle_thermal_trip(struct t * * Return: On success returns 0, an error code otherwise */ @@ -860,7 +810,7 @@ index 4108db7..62cc82a 100644 enum thermal_trip_type type; #endif -@@ -453,8 +453,7 @@ EXPORT_SYMBOL_GPL(thermal_zone_get_temp); +@@ -453,8 +453,7 @@ EXPORT_SYMBOL_GPL(thermal_zone_get_temp) static void update_temperature(struct thermal_zone_device *tz) { @@ -888,7 +838,7 @@ index 4108db7..62cc82a 100644 } static ssize_t -@@ -626,7 +624,7 @@ trip_point_temp_show(struct device *dev, struct device_attribute *attr, +@@ -626,7 +624,7 @@ trip_point_temp_show(struct device *dev, { struct thermal_zone_device *tz = to_thermal_zone(dev); int trip, ret; @@ -897,7 +847,7 @@ index 4108db7..62cc82a 100644 if (!tz->ops->get_trip_temp) return -EPERM; -@@ -639,7 +637,7 @@ trip_point_temp_show(struct device *dev, struct device_attribute *attr, +@@ -639,7 +637,7 @@ trip_point_temp_show(struct device *dev, if (ret) return ret; @@ -906,7 +856,7 @@ index 4108db7..62cc82a 100644 } static ssize_t -@@ -648,7 +646,7 @@ trip_point_hyst_store(struct device *dev, struct device_attribute *attr, +@@ -648,7 +646,7 @@ trip_point_hyst_store(struct device *dev { struct thermal_zone_device *tz = to_thermal_zone(dev); int trip, ret; @@ -915,7 +865,7 @@ index 4108db7..62cc82a 100644 if (!tz->ops->set_trip_hyst) return -EPERM; -@@ -656,7 +654,7 @@ trip_point_hyst_store(struct device *dev, struct device_attribute *attr, +@@ -656,7 +654,7 @@ trip_point_hyst_store(struct device *dev if (!sscanf(attr->attr.name, "trip_point_%d_hyst", &trip)) return -EINVAL; @@ -924,7 +874,7 @@ index 4108db7..62cc82a 100644 return -EINVAL; /* -@@ -675,7 +673,7 @@ trip_point_hyst_show(struct device *dev, struct device_attribute *attr, +@@ -675,7 +673,7 @@ trip_point_hyst_show(struct device *dev, { struct thermal_zone_device *tz = to_thermal_zone(dev); int trip, ret; @@ -933,7 +883,7 @@ index 4108db7..62cc82a 100644 if (!tz->ops->get_trip_hyst) return -EPERM; -@@ -685,7 +683,7 @@ trip_point_hyst_show(struct device *dev, struct device_attribute *attr, +@@ -685,7 +683,7 @@ trip_point_hyst_show(struct device *dev, ret = tz->ops->get_trip_hyst(tz, trip, &temperature); @@ -942,11 +892,9 @@ index 4108db7..62cc82a 100644 } static ssize_t -diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c -index 1967bee..06fd2ed9 100644 --- a/drivers/thermal/thermal_hwmon.c +++ b/drivers/thermal/thermal_hwmon.c -@@ -69,7 +69,7 @@ static DEVICE_ATTR(name, 0444, name_show, NULL); +@@ -69,7 +69,7 @@ static DEVICE_ATTR(name, 0444, name_show static ssize_t temp_input_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -955,7 +903,7 @@ index 1967bee..06fd2ed9 100644 int ret; struct thermal_hwmon_attr *hwmon_attr = container_of(attr, struct thermal_hwmon_attr, attr); -@@ -83,7 +83,7 @@ temp_input_show(struct device *dev, struct device_attribute *attr, char *buf) +@@ -83,7 +83,7 @@ temp_input_show(struct device *dev, stru if (ret) return ret; @@ -964,7 +912,7 @@ index 1967bee..06fd2ed9 100644 } static ssize_t -@@ -95,14 +95,14 @@ temp_crit_show(struct device *dev, struct device_attribute *attr, char *buf) +@@ -95,14 +95,14 @@ temp_crit_show(struct device *dev, struc = container_of(hwmon_attr, struct thermal_hwmon_temp, temp_crit); struct thermal_zone_device *tz = temp->tz; @@ -981,7 +929,7 @@ index 1967bee..06fd2ed9 100644 } -@@ -142,7 +142,7 @@ thermal_hwmon_lookup_temp(const struct thermal_hwmon_device *hwmon, +@@ -142,7 +142,7 @@ thermal_hwmon_lookup_temp(const struct t static bool thermal_zone_crit_temp_valid(struct thermal_zone_device *tz) { @@ -990,11 +938,9 @@ index 1967bee..06fd2ed9 100644 return tz->ops->get_crit_temp && !tz->ops->get_crit_temp(tz, &temp); } -diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c -index a38c175..d3a42bf 100644 --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c -@@ -76,14 +76,14 @@ static inline int ti_thermal_hotspot_temperature(int t, int s, int c) +@@ -76,14 +76,14 @@ static inline int ti_thermal_hotspot_tem /* thermal zone ops */ /* Get temperature callback function for thermal zone*/ @@ -1011,7 +957,7 @@ index a38c175..d3a42bf 100644 if (!data) return 0; -@@ -119,7 +119,7 @@ static inline int __ti_thermal_get_temp(void *devdata, long *temp) +@@ -119,7 +119,7 @@ static inline int __ti_thermal_get_temp( } static inline int ti_thermal_get_temp(struct thermal_zone_device *thermal, @@ -1020,7 +966,7 @@ index a38c175..d3a42bf 100644 { struct ti_thermal_data *data = thermal->devdata; -@@ -228,7 +228,7 @@ static int ti_thermal_get_trip_type(struct thermal_zone_device *thermal, +@@ -228,7 +228,7 @@ static int ti_thermal_get_trip_type(stru /* Get trip temperature callback functions for thermal zone */ static int ti_thermal_get_trip_temp(struct thermal_zone_device *thermal, @@ -1029,7 +975,7 @@ index a38c175..d3a42bf 100644 { if (!ti_thermal_is_valid_trip(trip)) return -EINVAL; -@@ -279,7 +279,7 @@ static int ti_thermal_get_trend(struct thermal_zone_device *thermal, +@@ -279,7 +279,7 @@ static int ti_thermal_get_trend(struct t /* Get critical temperature callback functions for thermal zone */ static int ti_thermal_get_crit_temp(struct thermal_zone_device *thermal, @@ -1038,8 +984,6 @@ index a38c175..d3a42bf 100644 { /* shutdown zone */ return ti_thermal_get_trip_temp(thermal, OMAP_TRIP_NUMBER - 1, temp); -diff --git a/drivers/thermal/x86_pkg_temp_thermal.c b/drivers/thermal/x86_pkg_temp_thermal.c -index 9ea3d9d..054c6d45 100644 --- a/drivers/thermal/x86_pkg_temp_thermal.c +++ b/drivers/thermal/x86_pkg_temp_thermal.c @@ -164,7 +164,7 @@ err_ret: @@ -1051,7 +995,7 @@ index 9ea3d9d..054c6d45 100644 { u32 eax, edx; struct phy_dev_entry *phy_dev_entry; -@@ -175,7 +175,7 @@ static int sys_get_curr_temp(struct thermal_zone_device *tzd, unsigned long *tem +@@ -175,7 +175,7 @@ static int sys_get_curr_temp(struct ther if (eax & 0x80000000) { *temp = phy_dev_entry->tj_max - ((eax >> 16) & 0x7f) * 1000; @@ -1060,7 +1004,7 @@ index 9ea3d9d..054c6d45 100644 return 0; } -@@ -183,7 +183,7 @@ static int sys_get_curr_temp(struct thermal_zone_device *tzd, unsigned long *tem +@@ -183,7 +183,7 @@ static int sys_get_curr_temp(struct ther } static int sys_get_trip_temp(struct thermal_zone_device *tzd, @@ -1069,7 +1013,7 @@ index 9ea3d9d..054c6d45 100644 { u32 eax, edx; struct phy_dev_entry *phy_dev_entry; -@@ -214,13 +214,13 @@ static int sys_get_trip_temp(struct thermal_zone_device *tzd, +@@ -214,13 +214,13 @@ static int sys_get_trip_temp(struct ther *temp = phy_dev_entry->tj_max - thres_reg_value * 1000; else *temp = 0; @@ -1085,8 +1029,6 @@ index 9ea3d9d..054c6d45 100644 { u32 l, h; struct phy_dev_entry *phy_dev_entry; -diff --git a/include/linux/thermal.h b/include/linux/thermal.h -index 5eac316..e9f2863 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -86,23 +86,19 @@ struct thermal_zone_device_ops { @@ -1132,7 +1074,7 @@ index 5eac316..e9f2863 100644 }; /** -@@ -335,7 +331,7 @@ thermal_of_cooling_device_register(struct device_node *np, char *, void *, +@@ -335,7 +331,7 @@ thermal_of_cooling_device_register(struc const struct thermal_cooling_device_ops *); void thermal_cooling_device_unregister(struct thermal_cooling_device *); struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name); @@ -1141,7 +1083,7 @@ index 5eac316..e9f2863 100644 int get_tz_trend(struct thermal_zone_device *, int); struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, -@@ -378,7 +374,7 @@ static inline struct thermal_zone_device *thermal_zone_get_zone_by_name( +@@ -378,7 +374,7 @@ static inline struct thermal_zone_device const char *name) { return ERR_PTR(-ENODEV); } static inline int thermal_zone_get_temp( @@ -1150,6 +1092,3 @@ index 5eac316..e9f2863 100644 { return -ENODEV; } static inline int get_tz_trend(struct thermal_zone_device *tz, int trip) { return -ENODEV; } --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0011-thermal-trivial-fix-typo-in-comment.patch b/target/linux/mediatek/patches/0011-thermal-trivial-fix-typo-in-comment.patch index 4b9e0f9514..db06362a75 100644 --- a/target/linux/mediatek/patches/0011-thermal-trivial-fix-typo-in-comment.patch +++ b/target/linux/mediatek/patches/0011-thermal-trivial-fix-typo-in-comment.patch @@ -9,11 +9,9 @@ Acked-by: Eduardo Valentin drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c -index 62cc82a..244784f 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c -@@ -402,7 +402,7 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip) +@@ -402,7 +402,7 @@ static void handle_thermal_trip(struct t } /** @@ -22,6 +20,3 @@ index 62cc82a..244784f 100644 * @tz: a valid pointer to a struct thermal_zone_device * @temp: a valid pointer to where to store the resulting temperature. * --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0012-thermal-remove-useless-call-to-thermal_zone_device_s.patch b/target/linux/mediatek/patches/0012-thermal-remove-useless-call-to-thermal_zone_device_s.patch index 2d64f4949c..f4e237f369 100644 --- a/target/linux/mediatek/patches/0012-thermal-remove-useless-call-to-thermal_zone_device_s.patch +++ b/target/linux/mediatek/patches/0012-thermal-remove-useless-call-to-thermal_zone_device_s.patch @@ -15,11 +15,9 @@ Acked-by: Eduardo Valentin drivers/thermal/thermal_core.c | 3 --- 1 file changed, 3 deletions(-) -diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c -index 244784f..1b68d20 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c -@@ -1571,9 +1571,6 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type, +@@ -1571,9 +1571,6 @@ struct thermal_zone_device *thermal_zone INIT_DELAYED_WORK(&(tz->poll_queue), thermal_zone_device_check); @@ -29,6 +27,3 @@ index 244784f..1b68d20 100644 thermal_zone_device_update(tz); return tz; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0013-thermal-Use-IS_ENABLED-instead-of-ifdef.patch b/target/linux/mediatek/patches/0013-thermal-Use-IS_ENABLED-instead-of-ifdef.patch index 0b033d65e1..f0cbdb380b 100644 --- a/target/linux/mediatek/patches/0013-thermal-Use-IS_ENABLED-instead-of-ifdef.patch +++ b/target/linux/mediatek/patches/0013-thermal-Use-IS_ENABLED-instead-of-ifdef.patch @@ -12,11 +12,9 @@ Signed-off-by: Sascha Hauer drivers/thermal/thermal_core.c | 45 +++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 26 deletions(-) -diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c -index 1b68d20..3e0fe55 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c -@@ -414,11 +414,9 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip) +@@ -414,11 +414,9 @@ static void handle_thermal_trip(struct t int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) { int ret = -EINVAL; @@ -28,7 +26,7 @@ index 1b68d20..3e0fe55 100644 if (!tz || IS_ERR(tz) || !tz->ops->get_temp) goto exit; -@@ -426,25 +424,21 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) +@@ -426,25 +424,21 @@ int thermal_zone_get_temp(struct thermal mutex_lock(&tz->lock); ret = tz->ops->get_temp(tz, temp); @@ -67,7 +65,7 @@ index 1b68d20..3e0fe55 100644 mutex_unlock(&tz->lock); exit: return ret; -@@ -780,7 +774,6 @@ policy_show(struct device *dev, struct device_attribute *devattr, char *buf) +@@ -780,7 +774,6 @@ policy_show(struct device *dev, struct d return sprintf(buf, "%s\n", tz->governor->name); } @@ -75,7 +73,7 @@ index 1b68d20..3e0fe55 100644 static ssize_t emul_temp_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) -@@ -806,7 +799,6 @@ emul_temp_store(struct device *dev, struct device_attribute *attr, +@@ -806,7 +799,6 @@ emul_temp_store(struct device *dev, stru return ret ? ret : count; } static DEVICE_ATTR(emul_temp, S_IWUSR, NULL, emul_temp_store); @@ -83,7 +81,7 @@ index 1b68d20..3e0fe55 100644 static DEVICE_ATTR(type, 0444, type_show, NULL); static DEVICE_ATTR(temp, 0444, temp_show, NULL); -@@ -1536,11 +1528,12 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type, +@@ -1536,11 +1528,12 @@ struct thermal_zone_device *thermal_zone goto unregister; } @@ -101,6 +99,3 @@ index 1b68d20..3e0fe55 100644 /* Create policy attribute */ result = device_create_file(&tz->device, &dev_attr_policy); if (result) --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0014-thermal-Add-comment-explaining-test-for-critical-tem.patch b/target/linux/mediatek/patches/0014-thermal-Add-comment-explaining-test-for-critical-tem.patch index 56d3e4f21e..8f7ee00cae 100644 --- a/target/linux/mediatek/patches/0014-thermal-Add-comment-explaining-test-for-critical-tem.patch +++ b/target/linux/mediatek/patches/0014-thermal-Add-comment-explaining-test-for-critical-tem.patch @@ -13,11 +13,9 @@ Reviewed-by: Mikko Perttunen drivers/thermal/thermal_core.c | 5 +++++ 1 file changed, 5 insertions(+) -diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c -index 3e0fe55..e204deb 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c -@@ -435,6 +435,11 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) +@@ -435,6 +435,11 @@ int thermal_zone_get_temp(struct thermal } } @@ -29,6 +27,3 @@ index 3e0fe55..e204deb 100644 if (!ret && *temp < crit_temp) *temp = tz->emul_temperature; } --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0015-thermal-inline-only-once-used-function.patch b/target/linux/mediatek/patches/0015-thermal-inline-only-once-used-function.patch index e050ae763a..e3ffb330f5 100644 --- a/target/linux/mediatek/patches/0015-thermal-inline-only-once-used-function.patch +++ b/target/linux/mediatek/patches/0015-thermal-inline-only-once-used-function.patch @@ -12,8 +12,6 @@ Reviewed-by: Mikko Perttunen drivers/thermal/thermal_core.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) -diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c -index e204deb..19da022 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -450,9 +450,12 @@ exit: @@ -31,7 +29,7 @@ index e204deb..19da022 100644 ret = thermal_zone_get_temp(tz, &temp); if (ret) { -@@ -471,16 +474,6 @@ static void update_temperature(struct thermal_zone_device *tz) +@@ -471,16 +474,6 @@ static void update_temperature(struct th trace_thermal_temperature(tz); dev_dbg(&tz->device, "last_temperature=%d, current_temperature=%d\n", tz->last_temperature, tz->temperature); @@ -48,6 +46,3 @@ index e204deb..19da022 100644 for (count = 0; count < tz->trips; count++) handle_thermal_trip(tz, count); --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0016-thermal-streamline-get_trend-callbacks.patch b/target/linux/mediatek/patches/0016-thermal-streamline-get_trend-callbacks.patch index 99d490f2bb..3ee345e688 100644 --- a/target/linux/mediatek/patches/0016-thermal-streamline-get_trend-callbacks.patch +++ b/target/linux/mediatek/patches/0016-thermal-streamline-get_trend-callbacks.patch @@ -25,11 +25,9 @@ Signed-off-by: Sascha Hauer include/linux/thermal.h | 2 +- 3 files changed, 10 insertions(+), 28 deletions(-) -diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c -index 03839df..c84404d 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c -@@ -187,24 +187,15 @@ static int of_thermal_get_trend(struct thermal_zone_device *tz, int trip, +@@ -187,24 +187,15 @@ static int of_thermal_get_trend(struct t enum thermal_trend *trend) { struct __thermal_zone *data = tz->devdata; @@ -55,11 +53,9 @@ index 03839df..c84404d 100644 return 0; } -diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c -index d3a42bf..ade78eb 100644 --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c -@@ -238,7 +238,7 @@ static int ti_thermal_get_trip_temp(struct thermal_zone_device *thermal, +@@ -238,7 +238,7 @@ static int ti_thermal_get_trip_temp(stru return 0; } @@ -68,7 +64,7 @@ index d3a42bf..ade78eb 100644 { struct ti_thermal_data *data = p; struct ti_bandgap *bgp; -@@ -251,22 +251,6 @@ static int __ti_thermal_get_trend(void *p, long *trend) +@@ -251,22 +251,6 @@ static int __ti_thermal_get_trend(void * if (ret) return ret; @@ -91,7 +87,7 @@ index d3a42bf..ade78eb 100644 if (tr > 0) *trend = THERMAL_TREND_RAISING; else if (tr < 0) -@@ -277,6 +261,13 @@ static int ti_thermal_get_trend(struct thermal_zone_device *thermal, +@@ -277,6 +261,13 @@ static int ti_thermal_get_trend(struct t return 0; } @@ -105,8 +101,6 @@ index d3a42bf..ade78eb 100644 /* Get critical temperature callback functions for thermal zone */ static int ti_thermal_get_crit_temp(struct thermal_zone_device *thermal, int *temp) -diff --git a/include/linux/thermal.h b/include/linux/thermal.h -index e9f2863..5c6a589 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -269,7 +269,7 @@ struct thermal_genl_event { @@ -118,6 +112,3 @@ index e9f2863..5c6a589 100644 int (*set_emul_temp)(void *, int); }; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0017-thermal-Allow-sensor-ops-to-fail-with-ENOSYS.patch b/target/linux/mediatek/patches/0017-thermal-Allow-sensor-ops-to-fail-with-ENOSYS.patch index f533a88319..65c76c3a26 100644 --- a/target/linux/mediatek/patches/0017-thermal-Allow-sensor-ops-to-fail-with-ENOSYS.patch +++ b/target/linux/mediatek/patches/0017-thermal-Allow-sensor-ops-to-fail-with-ENOSYS.patch @@ -20,11 +20,9 @@ Signed-off-by: Sascha Hauer drivers/thermal/thermal_core.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) -diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c -index 19da022..3d8f9f9 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c -@@ -413,13 +413,16 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip) +@@ -413,13 +413,16 @@ static void handle_thermal_trip(struct t */ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) { @@ -44,7 +42,7 @@ index 19da022..3d8f9f9 100644 mutex_lock(&tz->lock); -@@ -445,7 +448,7 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) +@@ -445,7 +448,7 @@ int thermal_zone_get_temp(struct thermal } mutex_unlock(&tz->lock); @@ -53,7 +51,7 @@ index 19da022..3d8f9f9 100644 return ret; } EXPORT_SYMBOL_GPL(thermal_zone_get_temp); -@@ -454,10 +457,11 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) +@@ -454,10 +457,11 @@ void thermal_zone_device_update(struct t { int temp, ret, count; @@ -67,7 +65,7 @@ index 19da022..3d8f9f9 100644 if (ret) { if (ret != -EAGAIN) dev_warn(&tz->device, -@@ -783,10 +787,16 @@ emul_temp_store(struct device *dev, struct device_attribute *attr, +@@ -783,10 +787,16 @@ emul_temp_store(struct device *dev, stru if (kstrtoul(buf, 10, &temperature)) return -EINVAL; @@ -85,6 +83,3 @@ index 19da022..3d8f9f9 100644 } else { ret = tz->ops->set_emul_temp(tz, temperature); } --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0018-thermal-of-always-set-sensor-related-callbacks.patch b/target/linux/mediatek/patches/0018-thermal-of-always-set-sensor-related-callbacks.patch index e47e8a27f0..3cd2e90315 100644 --- a/target/linux/mediatek/patches/0018-thermal-of-always-set-sensor-related-callbacks.patch +++ b/target/linux/mediatek/patches/0018-thermal-of-always-set-sensor-related-callbacks.patch @@ -13,11 +13,9 @@ Signed-off-by: Sascha Hauer drivers/thermal/of-thermal.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) -diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c -index c84404d..b9c35bd 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c -@@ -91,7 +91,7 @@ static int of_thermal_get_temp(struct thermal_zone_device *tz, +@@ -91,7 +91,7 @@ static int of_thermal_get_temp(struct th { struct __thermal_zone *data = tz->devdata; @@ -26,7 +24,7 @@ index c84404d..b9c35bd 100644 return -EINVAL; return data->ops->get_temp(data->sensor_data, temp); -@@ -178,7 +178,7 @@ static int of_thermal_set_emul_temp(struct thermal_zone_device *tz, +@@ -178,7 +178,7 @@ static int of_thermal_set_emul_temp(stru struct __thermal_zone *data = tz->devdata; if (!data->ops || !data->ops->set_emul_temp) @@ -35,7 +33,7 @@ index c84404d..b9c35bd 100644 return data->ops->set_emul_temp(data->sensor_data, temp); } -@@ -189,8 +189,8 @@ static int of_thermal_get_trend(struct thermal_zone_device *tz, int trip, +@@ -189,8 +189,8 @@ static int of_thermal_get_trend(struct t struct __thermal_zone *data = tz->devdata; int r; @@ -46,7 +44,7 @@ index c84404d..b9c35bd 100644 r = data->ops->get_trend(data->sensor_data, trip, trend); if (r) -@@ -366,6 +366,10 @@ static int of_thermal_get_crit_temp(struct thermal_zone_device *tz, +@@ -366,6 +366,10 @@ static int of_thermal_get_crit_temp(stru } static struct thermal_zone_device_ops of_thermal_ops = { @@ -57,7 +55,7 @@ index c84404d..b9c35bd 100644 .get_mode = of_thermal_get_mode, .set_mode = of_thermal_set_mode, -@@ -399,13 +403,13 @@ thermal_zone_of_add_sensor(struct device_node *zone, +@@ -399,13 +403,13 @@ thermal_zone_of_add_sensor(struct device if (!ops) return ERR_PTR(-EINVAL); @@ -74,7 +72,7 @@ index c84404d..b9c35bd 100644 mutex_unlock(&tzd->lock); return tzd; -@@ -535,9 +539,6 @@ void thermal_zone_of_sensor_unregister(struct device *dev, +@@ -535,9 +539,6 @@ void thermal_zone_of_sensor_unregister(s return; mutex_lock(&tzd->lock); @@ -124,6 +122,3 @@ index c84404d..b9c35bd 100644 of_thermal_free_zone(tz); /* attempting to build remaining zones still */ } --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0019-thermal-Make-struct-thermal_zone_device_ops-const.patch b/target/linux/mediatek/patches/0019-thermal-Make-struct-thermal_zone_device_ops-const.patch index 1ca9ab8c2f..36f7ccf1ea 100644 --- a/target/linux/mediatek/patches/0019-thermal-Make-struct-thermal_zone_device_ops-const.patch +++ b/target/linux/mediatek/patches/0019-thermal-Make-struct-thermal_zone_device_ops-const.patch @@ -31,11 +31,9 @@ Signed-off-by: Sascha Hauer include/linux/thermal.h | 6 +++--- 21 files changed, 23 insertions(+), 23 deletions(-) -diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt -index 87519cb..bb346a2 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt -@@ -33,7 +33,7 @@ temperature) and throttle appropriate devices. +@@ -33,7 +33,7 @@ temperature) and throttle appropriate de 1.1 thermal zone device interface 1.1.1 struct thermal_zone_device *thermal_zone_device_register(char *type, int trips, int mask, void *devdata, @@ -44,11 +42,9 @@ index 87519cb..bb346a2 100644 const struct thermal_zone_params *tzp, int passive_delay, int polling_delay)) -diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c -index 68bff60..6b11462 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c -@@ -869,7 +869,7 @@ acpi_thermal_unbind_cooling_device(struct thermal_zone_device *thermal, +@@ -869,7 +869,7 @@ acpi_thermal_unbind_cooling_device(struc return acpi_thermal_cooling_device_cb(thermal, cdev, false); } @@ -57,11 +53,9 @@ index 68bff60..6b11462 100644 .bind = acpi_thermal_bind_cooling_device, .unbind = acpi_thermal_unbind_cooling_device, .get_temp = thermal_get_temp, -diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c -index f2ce63c..bae9ca0 100644 --- a/drivers/platform/x86/acerhdf.c +++ b/drivers/platform/x86/acerhdf.c -@@ -482,7 +482,7 @@ static int acerhdf_get_crit_temp(struct thermal_zone_device *thermal, +@@ -482,7 +482,7 @@ static int acerhdf_get_crit_temp(struct } /* bind callback functions to thermalzone */ @@ -70,11 +64,9 @@ index f2ce63c..bae9ca0 100644 .bind = acerhdf_bind, .unbind = acerhdf_unbind, .get_temp = acerhdf_get_ec_temp, -diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c -index 0944e83..069d36b 100644 --- a/drivers/platform/x86/intel_mid_thermal.c +++ b/drivers/platform/x86/intel_mid_thermal.c -@@ -460,7 +460,7 @@ static int read_curr_temp(struct thermal_zone_device *tzd, unsigned long *temp) +@@ -460,7 +460,7 @@ static int read_curr_temp(struct thermal } /* Can't be const */ @@ -83,11 +75,9 @@ index 0944e83..069d36b 100644 .get_temp = read_curr_temp, }; -diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c -index 87e2fd1..878cb4e 100644 --- a/drivers/power/power_supply_core.c +++ b/drivers/power/power_supply_core.c -@@ -509,7 +509,7 @@ static int power_supply_read_temp(struct thermal_zone_device *tzd, +@@ -535,7 +535,7 @@ static int power_supply_read_temp(struct return ret; } @@ -96,11 +86,9 @@ index 87e2fd1..878cb4e 100644 .get_temp = power_supply_read_temp, }; -diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c -index 26b8d32..3f59c8b 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c -@@ -183,7 +183,7 @@ static int armada_get_temp(struct thermal_zone_device *thermal, +@@ -183,7 +183,7 @@ static int armada_get_temp(struct therma return 0; } @@ -109,11 +97,9 @@ index 26b8d32..3f59c8b 100644 .get_temp = armada_get_temp, }; -diff --git a/drivers/thermal/db8500_thermal.c b/drivers/thermal/db8500_thermal.c -index b3eca71..38d6aab9 100644 --- a/drivers/thermal/db8500_thermal.c +++ b/drivers/thermal/db8500_thermal.c -@@ -210,7 +210,7 @@ static int db8500_sys_get_crit_temp(struct thermal_zone_device *thermal, +@@ -210,7 +210,7 @@ static int db8500_sys_get_crit_temp(stru return -EINVAL; } @@ -122,11 +108,9 @@ index b3eca71..38d6aab9 100644 .bind = db8500_cdev_bind, .unbind = db8500_cdev_unbind, .get_temp = db8500_sys_get_temp, -diff --git a/drivers/thermal/dove_thermal.c b/drivers/thermal/dove_thermal.c -index a0bc9de..e8fd627 100644 --- a/drivers/thermal/dove_thermal.c +++ b/drivers/thermal/dove_thermal.c -@@ -118,7 +118,7 @@ static int dove_get_temp(struct thermal_zone_device *thermal, +@@ -118,7 +118,7 @@ static int dove_get_temp(struct thermal_ return 0; } @@ -135,11 +119,9 @@ index a0bc9de..e8fd627 100644 .get_temp = dove_get_temp, }; -diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c -index f1424f0..8a3cfed 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c -@@ -332,7 +332,7 @@ static int imx_unbind(struct thermal_zone_device *tz, +@@ -332,7 +332,7 @@ static int imx_unbind(struct thermal_zon return 0; } @@ -148,11 +130,9 @@ index f1424f0..8a3cfed 100644 .bind = imx_bind, .unbind = imx_unbind, .get_temp = imx_get_temp, -diff --git a/drivers/thermal/int340x_thermal/int3400_thermal.c b/drivers/thermal/int340x_thermal/int3400_thermal.c -index 031018e..96bdf8a 100644 --- a/drivers/thermal/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/int340x_thermal/int3400_thermal.c -@@ -231,7 +231,7 @@ static int int3400_thermal_set_mode(struct thermal_zone_device *thermal, +@@ -231,7 +231,7 @@ static int int3400_thermal_set_mode(stru return result; } @@ -161,11 +141,9 @@ index 031018e..96bdf8a 100644 .get_temp = int3400_thermal_get_temp, }; -diff --git a/drivers/thermal/int340x_thermal/int340x_thermal_zone.c b/drivers/thermal/int340x_thermal/int340x_thermal_zone.c -index b9b2666..bd9f9e8 100644 --- a/drivers/thermal/int340x_thermal/int340x_thermal_zone.c +++ b/drivers/thermal/int340x_thermal/int340x_thermal_zone.c -@@ -154,7 +154,7 @@ static int int340x_thermal_get_trip_hyst(struct thermal_zone_device *zone, +@@ -154,7 +154,7 @@ static int int340x_thermal_get_trip_hyst return 0; } @@ -174,11 +152,9 @@ index b9b2666..bd9f9e8 100644 .get_temp = int340x_thermal_get_zone_temp, .get_trip_temp = int340x_thermal_get_trip_temp, .get_trip_type = int340x_thermal_get_trip_type, -diff --git a/drivers/thermal/intel_soc_dts_thermal.c b/drivers/thermal/intel_soc_dts_thermal.c -index fd550b9..625ba6f 100644 --- a/drivers/thermal/intel_soc_dts_thermal.c +++ b/drivers/thermal/intel_soc_dts_thermal.c -@@ -270,7 +270,7 @@ static int sys_get_curr_temp(struct thermal_zone_device *tzd, int *temp) +@@ -270,7 +270,7 @@ static int sys_get_curr_temp(struct ther return 0; } @@ -187,11 +163,9 @@ index fd550b9..625ba6f 100644 .get_temp = sys_get_curr_temp, .get_trip_temp = sys_get_trip_temp, .get_trip_type = sys_get_trip_type, -diff --git a/drivers/thermal/kirkwood_thermal.c b/drivers/thermal/kirkwood_thermal.c -index 11041fe..abba3e2 100644 --- a/drivers/thermal/kirkwood_thermal.c +++ b/drivers/thermal/kirkwood_thermal.c -@@ -60,7 +60,7 @@ static int kirkwood_get_temp(struct thermal_zone_device *thermal, +@@ -60,7 +60,7 @@ static int kirkwood_get_temp(struct ther return 0; } @@ -200,11 +174,9 @@ index 11041fe..abba3e2 100644 .get_temp = kirkwood_get_temp, }; -diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c -index b9c35bd..bd3185e 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c -@@ -365,7 +365,7 @@ static int of_thermal_get_crit_temp(struct thermal_zone_device *tz, +@@ -365,7 +365,7 @@ static int of_thermal_get_crit_temp(stru return -EINVAL; } @@ -213,11 +185,9 @@ index b9c35bd..bd3185e 100644 .get_temp = of_thermal_get_temp, .get_trend = of_thermal_get_trend, .set_emul_temp = of_thermal_set_emul_temp, -diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c -index 5d4ae7d..320ceac 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c -@@ -270,7 +270,7 @@ static int rcar_thermal_notify(struct thermal_zone_device *zone, +@@ -270,7 +270,7 @@ static int rcar_thermal_notify(struct th return 0; } @@ -226,11 +196,9 @@ index 5d4ae7d..320ceac 100644 .get_temp = rcar_thermal_get_temp, .get_trip_type = rcar_thermal_get_trip_type, .get_trip_temp = rcar_thermal_get_trip_temp, -diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c -index 534dd91..ec07743 100644 --- a/drivers/thermal/spear_thermal.c +++ b/drivers/thermal/spear_thermal.c -@@ -50,7 +50,7 @@ static inline int thermal_get_temp(struct thermal_zone_device *thermal, +@@ -50,7 +50,7 @@ static inline int thermal_get_temp(struc return 0; } @@ -239,11 +207,9 @@ index 534dd91..ec07743 100644 .get_temp = thermal_get_temp, }; -diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c -index 44cbba9..0cb5c19 100644 --- a/drivers/thermal/st/st_thermal.c +++ b/drivers/thermal/st/st_thermal.c -@@ -175,7 +175,7 @@ static int st_thermal_get_trip_temp(struct thermal_zone_device *th, +@@ -175,7 +175,7 @@ static int st_thermal_get_trip_temp(stru return 0; } @@ -252,11 +218,9 @@ index 44cbba9..0cb5c19 100644 .get_temp = st_thermal_get_temp, .get_trip_type = st_thermal_get_trip_type, .get_trip_temp = st_thermal_get_trip_temp, -diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c -index 3d8f9f9..6bbf61f 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c -@@ -1451,7 +1451,7 @@ static void remove_trip_attrs(struct thermal_zone_device *tz) +@@ -1451,7 +1451,7 @@ static void remove_trip_attrs(struct the */ struct thermal_zone_device *thermal_zone_device_register(const char *type, int trips, int mask, void *devdata, @@ -265,11 +229,9 @@ index 3d8f9f9..6bbf61f 100644 const struct thermal_zone_params *tzp, int passive_delay, int polling_delay) { -diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c -index ade78eb..e9c82fc 100644 --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c -@@ -281,7 +281,7 @@ static const struct thermal_zone_of_device_ops ti_of_thermal_ops = { +@@ -281,7 +281,7 @@ static const struct thermal_zone_of_devi .get_trend = __ti_thermal_get_trend, }; @@ -278,11 +240,9 @@ index ade78eb..e9c82fc 100644 .get_temp = ti_thermal_get_temp, .get_trend = ti_thermal_get_trend, .bind = ti_thermal_bind, -diff --git a/drivers/thermal/x86_pkg_temp_thermal.c b/drivers/thermal/x86_pkg_temp_thermal.c -index 054c6d45..bb2b975 100644 --- a/drivers/thermal/x86_pkg_temp_thermal.c +++ b/drivers/thermal/x86_pkg_temp_thermal.c -@@ -274,7 +274,7 @@ static int sys_get_trip_type(struct thermal_zone_device *thermal, +@@ -274,7 +274,7 @@ static int sys_get_trip_type(struct ther } /* Thermal zone callback registry */ @@ -291,8 +251,6 @@ index 054c6d45..bb2b975 100644 .get_temp = sys_get_curr_temp, .get_trip_temp = sys_get_trip_temp, .get_trip_type = sys_get_trip_type, -diff --git a/include/linux/thermal.h b/include/linux/thermal.h -index 5c6a589..07bd5e8 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -181,7 +181,7 @@ struct thermal_zone_device { @@ -304,7 +262,7 @@ index 5c6a589..07bd5e8 100644 const struct thermal_zone_params *tzp; struct thermal_governor *governor; struct list_head thermal_instances; -@@ -313,7 +313,7 @@ void thermal_zone_of_sensor_unregister(struct device *dev, +@@ -313,7 +313,7 @@ void thermal_zone_of_sensor_unregister(s #if IS_ENABLED(CONFIG_THERMAL) struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, @@ -313,7 +271,7 @@ index 5c6a589..07bd5e8 100644 const struct thermal_zone_params *, int, int); void thermal_zone_device_unregister(struct thermal_zone_device *); -@@ -341,7 +341,7 @@ void thermal_notify_framework(struct thermal_zone_device *, int); +@@ -341,7 +341,7 @@ void thermal_notify_framework(struct the #else static inline struct thermal_zone_device *thermal_zone_device_register( const char *type, int trips, int mask, void *devdata, @@ -322,6 +280,3 @@ index 5c6a589..07bd5e8 100644 const struct thermal_zone_params *tzp, int passive_delay, int polling_delay) { return ERR_PTR(-ENODEV); } --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0020-thermal-thermal-Add-support-for-hardware-tracked-tri.patch b/target/linux/mediatek/patches/0020-thermal-thermal-Add-support-for-hardware-tracked-tri.patch index 6a48350039..d492a0683f 100644 --- a/target/linux/mediatek/patches/0020-thermal-thermal-Add-support-for-hardware-tracked-tri.patch +++ b/target/linux/mediatek/patches/0020-thermal-thermal-Add-support-for-hardware-tracked-tri.patch @@ -30,11 +30,9 @@ Signed-off-by: Sascha Hauer include/linux/thermal.h | 3 +++ 2 files changed, 46 insertions(+) -diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c -index 6bbf61f..3ae1795 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c -@@ -453,6 +453,45 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) +@@ -453,6 +453,45 @@ int thermal_zone_get_temp(struct thermal } EXPORT_SYMBOL_GPL(thermal_zone_get_temp); @@ -80,7 +78,7 @@ index 6bbf61f..3ae1795 100644 void thermal_zone_device_update(struct thermal_zone_device *tz) { int temp, ret, count; -@@ -479,6 +518,8 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) +@@ -479,6 +518,8 @@ void thermal_zone_device_update(struct t dev_dbg(&tz->device, "last_temperature=%d, current_temperature=%d\n", tz->last_temperature, tz->temperature); @@ -89,7 +87,7 @@ index 6bbf61f..3ae1795 100644 for (count = 0; count < tz->trips; count++) handle_thermal_trip(tz, count); } -@@ -1494,6 +1535,8 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type, +@@ -1494,6 +1535,8 @@ struct thermal_zone_device *thermal_zone tz->trips = trips; tz->passive_delay = passive_delay; tz->polling_delay = polling_delay; @@ -98,8 +96,6 @@ index 6bbf61f..3ae1795 100644 dev_set_name(&tz->device, "thermal_zone%d", tz->id); result = device_register(&tz->device); -diff --git a/include/linux/thermal.h b/include/linux/thermal.h -index 07bd5e8..aef6e13 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -87,6 +87,7 @@ struct thermal_zone_device_ops { @@ -119,6 +115,3 @@ index 07bd5e8..aef6e13 100644 unsigned int forced_passive; const struct thermal_zone_device_ops *ops; const struct thermal_zone_params *tzp; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0021-thermal-of-implement-.set_trips-for-device-tree-ther.patch b/target/linux/mediatek/patches/0021-thermal-of-implement-.set_trips-for-device-tree-ther.patch index 81b50431c6..149ba000af 100644 --- a/target/linux/mediatek/patches/0021-thermal-of-implement-.set_trips-for-device-tree-ther.patch +++ b/target/linux/mediatek/patches/0021-thermal-of-implement-.set_trips-for-device-tree-ther.patch @@ -10,11 +10,9 @@ Signed-off-by: Sascha Hauer include/linux/thermal.h | 3 +++ 2 files changed, 15 insertions(+) -diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c -index bd3185e..f8dd847 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c -@@ -97,6 +97,17 @@ static int of_thermal_get_temp(struct thermal_zone_device *tz, +@@ -97,6 +97,17 @@ static int of_thermal_get_temp(struct th return data->ops->get_temp(data->sensor_data, temp); } @@ -32,7 +30,7 @@ index bd3185e..f8dd847 100644 /** * of_thermal_get_ntrips - function to export number of available trip * points. -@@ -367,6 +378,7 @@ static int of_thermal_get_crit_temp(struct thermal_zone_device *tz, +@@ -367,6 +378,7 @@ static int of_thermal_get_crit_temp(stru static const struct thermal_zone_device_ops of_thermal_ops = { .get_temp = of_thermal_get_temp, @@ -40,8 +38,6 @@ index bd3185e..f8dd847 100644 .get_trend = of_thermal_get_trend, .set_emul_temp = of_thermal_set_emul_temp, -diff --git a/include/linux/thermal.h b/include/linux/thermal.h -index aef6e13..b751f6b 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -267,12 +267,15 @@ struct thermal_genl_event { @@ -60,6 +56,3 @@ index aef6e13..b751f6b 100644 int (*set_emul_temp)(void *, int); }; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0022-dt-bindings-thermal-Add-binding-document-for-Mediate.patch b/target/linux/mediatek/patches/0022-dt-bindings-thermal-Add-binding-document-for-Mediate.patch index c556ac08b5..222fc5527f 100644 --- a/target/linux/mediatek/patches/0022-dt-bindings-thermal-Add-binding-document-for-Mediate.patch +++ b/target/linux/mediatek/patches/0022-dt-bindings-thermal-Add-binding-document-for-Mediate.patch @@ -10,9 +10,6 @@ Signed-off-by: Sascha Hauer 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/mediatek-thermal.txt -diff --git a/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt b/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt -new file mode 100644 -index 0000000..adf5d2c --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt @@ -0,0 +1,36 @@ @@ -52,6 +49,3 @@ index 0000000..adf5d2c + auxadc = <&auxadc>; + apmixedsys = <&apmixedsys>; + }; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0023-thermal-Add-Mediatek-thermal-controller-support.patch b/target/linux/mediatek/patches/0023-thermal-Add-Mediatek-thermal-controller-support.patch index 827d721138..3c2d2dbc78 100644 --- a/target/linux/mediatek/patches/0023-thermal-Add-Mediatek-thermal-controller-support.patch +++ b/target/linux/mediatek/patches/0023-thermal-Add-Mediatek-thermal-controller-support.patch @@ -18,8 +18,6 @@ Signed-off-by: Sascha Hauer 3 files changed, 737 insertions(+) create mode 100644 drivers/thermal/mtk_thermal.c -diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig -index af40db0..3aa5500 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -285,6 +285,14 @@ config ACPI_THERMAL_REL @@ -37,18 +35,13 @@ index af40db0..3aa5500 100644 menu "Texas Instruments thermal drivers" source "drivers/thermal/ti-soc-thermal/Kconfig" endmenu -diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile -index fa0dc48..51cfab7 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile -@@ -39,3 +39,4 @@ obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/ +@@ -39,3 +39,4 @@ obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-t obj-$(CONFIG_INT340X_THERMAL) += int340x_thermal/ obj-$(CONFIG_ST_THERMAL) += st/ obj-$(CONFIG_TEGRA_SOCTHERM) += tegra_soctherm.o +obj-$(CONFIG_MTK_THERMAL) += mtk_thermal.o -diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c -new file mode 100644 -index 0000000..27aab12 --- /dev/null +++ b/drivers/thermal/mtk_thermal.c @@ -0,0 +1,728 @@ @@ -780,6 +773,3 @@ index 0000000..27aab12 +}; + +module_platform_driver(mtk_thermal_driver); --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0024-ARM64-dts-mt8173-Add-thermal-auxadc-device-nodes.patch b/target/linux/mediatek/patches/0024-ARM64-dts-mt8173-Add-thermal-auxadc-device-nodes.patch index ef80497cec..e22a670aa7 100644 --- a/target/linux/mediatek/patches/0024-ARM64-dts-mt8173-Add-thermal-auxadc-device-nodes.patch +++ b/target/linux/mediatek/patches/0024-ARM64-dts-mt8173-Add-thermal-auxadc-device-nodes.patch @@ -8,8 +8,6 @@ Signed-off-by: Sascha Hauer arch/arm64/boot/dts/mediatek/mt8173.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi -index 924fdb6..50d424f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi @@ -147,6 +147,11 @@ @@ -44,6 +42,3 @@ index 924fdb6..50d424f 100644 }; }; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0025-dt-bindings-ARM-Mediatek-Document-devicetree-binding.patch b/target/linux/mediatek/patches/0025-dt-bindings-ARM-Mediatek-Document-devicetree-binding.patch index ab8f2d5cee..13cc3fa703 100644 --- a/target/linux/mediatek/patches/0025-dt-bindings-ARM-Mediatek-Document-devicetree-binding.patch +++ b/target/linux/mediatek/patches/0025-dt-bindings-ARM-Mediatek-Document-devicetree-binding.patch @@ -10,9 +10,6 @@ Signed-off-by: Leilk Liu 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-mt65xx.txt -diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b/Documentation/devicetree/bindings/spi/spi-mt65xx.txt -new file mode 100644 -index 0000000..04c28fd --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-mt65xx.txt @@ -0,0 +1,32 @@ @@ -48,6 +45,3 @@ index 0000000..04c28fd + pad-select = <1>; + status = "disabled"; +}; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0026-spi-mediatek-Add-spi-bus-for-Mediatek-MT8173.patch b/target/linux/mediatek/patches/0026-spi-mediatek-Add-spi-bus-for-Mediatek-MT8173.patch index 3466581e04..4a4d83df89 100644 --- a/target/linux/mediatek/patches/0026-spi-mediatek-Add-spi-bus-for-Mediatek-MT8173.patch +++ b/target/linux/mediatek/patches/0026-spi-mediatek-Add-spi-bus-for-Mediatek-MT8173.patch @@ -13,11 +13,9 @@ Signed-off-by: Leilk Liu 3 files changed, 633 insertions(+) create mode 100644 drivers/spi/spi-mt65xx.c -diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig -index 72b0590..53dbea3 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -325,6 +325,16 @@ config SPI_MESON_SPIFC +@@ -334,6 +334,16 @@ config SPI_MESON_SPIFC This enables master mode support for the SPIFC (SPI flash controller) available in Amlogic Meson SoCs. @@ -34,11 +32,9 @@ index 72b0590..53dbea3 100644 config SPI_OC_TINY tristate "OpenCores tiny SPI" depends on GPIOLIB -diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile -index d8cbf65..ab332ef 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile -@@ -48,6 +48,7 @@ obj-$(CONFIG_SPI_MESON_SPIFC) += spi-meson-spifc.o +@@ -49,6 +49,7 @@ obj-$(CONFIG_SPI_MESON_SPIFC) += spi-me obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mpc512x-psc.o obj-$(CONFIG_SPI_MPC52xx_PSC) += spi-mpc52xx-psc.o obj-$(CONFIG_SPI_MPC52xx) += spi-mpc52xx.o @@ -46,9 +42,6 @@ index d8cbf65..ab332ef 100644 obj-$(CONFIG_SPI_MXS) += spi-mxs.o obj-$(CONFIG_SPI_NUC900) += spi-nuc900.o obj-$(CONFIG_SPI_OC_TINY) += spi-oc-tiny.o -diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c -new file mode 100644 -index 0000000..92c119d --- /dev/null +++ b/drivers/spi/spi-mt65xx.c @@ -0,0 +1,622 @@ @@ -674,6 +667,3 @@ index 0000000..92c119d +MODULE_AUTHOR("Leilk Liu "); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform: mtk_spi"); --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0027-dt-bindings-pwm-add-Mediatek-display-PWM-bindings.patch b/target/linux/mediatek/patches/0027-dt-bindings-pwm-add-Mediatek-display-PWM-bindings.patch index 1236a96782..f13f84f99b 100644 --- a/target/linux/mediatek/patches/0027-dt-bindings-pwm-add-Mediatek-display-PWM-bindings.patch +++ b/target/linux/mediatek/patches/0027-dt-bindings-pwm-add-Mediatek-display-PWM-bindings.patch @@ -11,9 +11,6 @@ Signed-off-by: YH Huang 1 file changed, 25 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/pwm-disp-mediatek.txt -diff --git a/Documentation/devicetree/bindings/pwm/pwm-disp-mediatek.txt b/Documentation/devicetree/bindings/pwm/pwm-disp-mediatek.txt -new file mode 100644 -index 0000000..ef54e9d --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-disp-mediatek.txt @@ -0,0 +1,25 @@ @@ -42,6 +39,3 @@ index 0000000..ef54e9d + clock-names = "main", + "mm"; + }; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0028-pwm-add-Mediatek-display-PWM-driver-support.patch b/target/linux/mediatek/patches/0028-pwm-add-Mediatek-display-PWM-driver-support.patch index dbcca3e160..c2f75a3f71 100644 --- a/target/linux/mediatek/patches/0028-pwm-add-Mediatek-display-PWM-driver-support.patch +++ b/target/linux/mediatek/patches/0028-pwm-add-Mediatek-display-PWM-driver-support.patch @@ -13,8 +13,6 @@ Signed-off-by: YH Huang 3 files changed, 235 insertions(+) create mode 100644 drivers/pwm/pwm-disp-mediatek.c -diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig -index b1541f4..9edbb5a 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -111,6 +111,15 @@ config PWM_CLPS711X @@ -33,11 +31,9 @@ index b1541f4..9edbb5a 100644 config PWM_EP93XX tristate "Cirrus Logic EP93xx PWM support" depends on ARCH_EP93XX -diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile -index ec50eb5..c5ff72a 100644 --- a/drivers/pwm/Makefile +++ b/drivers/pwm/Makefile -@@ -8,6 +8,7 @@ obj-$(CONFIG_PWM_BCM_KONA) += pwm-bcm-kona.o +@@ -8,6 +8,7 @@ obj-$(CONFIG_PWM_BCM_KONA) += pwm-bcm-ko obj-$(CONFIG_PWM_BCM2835) += pwm-bcm2835.o obj-$(CONFIG_PWM_BFIN) += pwm-bfin.o obj-$(CONFIG_PWM_CLPS711X) += pwm-clps711x.o @@ -45,9 +41,6 @@ index ec50eb5..c5ff72a 100644 obj-$(CONFIG_PWM_EP93XX) += pwm-ep93xx.o obj-$(CONFIG_PWM_FSL_FTM) += pwm-fsl-ftm.o obj-$(CONFIG_PWM_IMG) += pwm-img.o -diff --git a/drivers/pwm/pwm-disp-mediatek.c b/drivers/pwm/pwm-disp-mediatek.c -new file mode 100644 -index 0000000..38293af --- /dev/null +++ b/drivers/pwm/pwm-disp-mediatek.c @@ -0,0 +1,225 @@ @@ -276,6 +269,3 @@ index 0000000..38293af +MODULE_AUTHOR("YH Huang "); +MODULE_DESCRIPTION("MediaTek SoC display PWM driver"); +MODULE_LICENSE("GPL v2"); --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0029-dt-bindings-Add-I2C-bindings-for-mt65xx-mt81xx.patch b/target/linux/mediatek/patches/0029-dt-bindings-Add-I2C-bindings-for-mt65xx-mt81xx.patch index 03f03fb1dc..776942c4f8 100644 --- a/target/linux/mediatek/patches/0029-dt-bindings-Add-I2C-bindings-for-mt65xx-mt81xx.patch +++ b/target/linux/mediatek/patches/0029-dt-bindings-Add-I2C-bindings-for-mt65xx-mt81xx.patch @@ -12,9 +12,6 @@ Signed-off-by: Eddie Huang 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mt6577.txt -diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt -new file mode 100644 -index 0000000..0ce6fa3 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt @@ -0,0 +1,41 @@ @@ -59,6 +56,3 @@ index 0000000..0ce6fa3 + clock-names = "main", "dma"; + }; + --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0030-I2C-mediatek-Add-driver-for-MediaTek-I2C-controller.patch b/target/linux/mediatek/patches/0030-I2C-mediatek-Add-driver-for-MediaTek-I2C-controller.patch index df22f08764..f7048f1668 100644 --- a/target/linux/mediatek/patches/0030-I2C-mediatek-Add-driver-for-MediaTek-I2C-controller.patch +++ b/target/linux/mediatek/patches/0030-I2C-mediatek-Add-driver-for-MediaTek-I2C-controller.patch @@ -17,8 +17,6 @@ Signed-off-by: Eddie Huang 3 files changed, 710 insertions(+) create mode 100644 drivers/i2c/busses/i2c-mt65xx.c -diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig -index 2255af2..14c7266 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -620,6 +620,15 @@ config I2C_MPC @@ -37,8 +35,6 @@ index 2255af2..14c7266 100644 config I2C_MV64XXX tristate "Marvell mv64xxx I2C Controller" depends on MV64X60 || PLAT_ORION || ARCH_SUNXI -diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile -index cdf941d..abbf422 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile @@ -60,6 +60,7 @@ obj-$(CONFIG_I2C_JZ4780) += i2c-jz4780.o @@ -49,9 +45,6 @@ index cdf941d..abbf422 100644 obj-$(CONFIG_I2C_MV64XXX) += i2c-mv64xxx.o obj-$(CONFIG_I2C_MXS) += i2c-mxs.o obj-$(CONFIG_I2C_NOMADIK) += i2c-nomadik.o -diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c -new file mode 100644 -index 0000000..faecf7e --- /dev/null +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -0,0 +1,700 @@ @@ -755,6 +748,3 @@ index 0000000..faecf7e +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("MediaTek I2C Bus Driver"); +MODULE_AUTHOR("Xudong Chen "); --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0031-I2C-mediatek-Add-driver-for-MediaTek-MT8173-I2C-cont.patch b/target/linux/mediatek/patches/0031-I2C-mediatek-Add-driver-for-MediaTek-MT8173-I2C-cont.patch index 25ea23ef23..af9673de4b 100644 --- a/target/linux/mediatek/patches/0031-I2C-mediatek-Add-driver-for-MediaTek-MT8173-I2C-cont.patch +++ b/target/linux/mediatek/patches/0031-I2C-mediatek-Add-driver-for-MediaTek-MT8173-I2C-cont.patch @@ -15,8 +15,6 @@ Signed-off-by: Eddie Huang drivers/i2c/busses/i2c-mt65xx.c | 104 ++++++++++++++++++++++++++++----------- 1 file changed, 76 insertions(+), 28 deletions(-) -diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c -index faecf7e..c501421 100644 --- a/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -33,10 +33,13 @@ @@ -51,7 +49,7 @@ index faecf7e..c501421 100644 }; struct mtk_i2c { -@@ -172,21 +179,39 @@ static const struct i2c_adapter_quirks mt6577_i2c_quirks = { +@@ -172,21 +179,39 @@ static const struct i2c_adapter_quirks m .max_comb_2nd_msg_len = MAX_WRRD_TRANS_SIZE_MT6577, }; @@ -91,7 +89,7 @@ index faecf7e..c501421 100644 {} }; MODULE_DEVICE_TABLE(of, mtk_i2c_of_match); -@@ -343,9 +368,11 @@ static int mtk_i2c_set_speed(struct mtk_i2c *i2c, unsigned int clk_src_in_hz) +@@ -343,9 +368,11 @@ static int mtk_i2c_set_speed(struct mtk_ return 0; } @@ -104,7 +102,7 @@ index faecf7e..c501421 100644 u16 control_reg; dma_addr_t rpaddr = 0; dma_addr_t wpaddr = 0; -@@ -361,6 +388,8 @@ static int mtk_i2c_do_transfer(struct mtk_i2c *i2c, struct i2c_msg *msgs) +@@ -361,6 +388,8 @@ static int mtk_i2c_do_transfer(struct mt control_reg |= I2C_CONTROL_RS; if (i2c->op == I2C_MASTER_WRRD) control_reg |= I2C_CONTROL_DIR_CHANGE | I2C_CONTROL_RS; @@ -113,7 +111,7 @@ index faecf7e..c501421 100644 mtk_i2c_writew(control_reg, i2c, OFFSET_CONTROL); /* set start condition */ -@@ -375,13 +404,13 @@ static int mtk_i2c_do_transfer(struct mtk_i2c *i2c, struct i2c_msg *msgs) +@@ -375,13 +404,13 @@ static int mtk_i2c_do_transfer(struct mt mtk_i2c_writew(addr_reg, i2c, OFFSET_SLAVE_ADDR); /* Clear interrupt status */ @@ -131,7 +129,7 @@ index faecf7e..c501421 100644 /* Set transfer and transaction len */ if (i2c->op == I2C_MASTER_WRRD) { -@@ -390,7 +419,7 @@ static int mtk_i2c_do_transfer(struct mtk_i2c *i2c, struct i2c_msg *msgs) +@@ -390,7 +419,7 @@ static int mtk_i2c_do_transfer(struct mt mtk_i2c_writew(I2C_WRRD_TRANAC_VALUE, i2c, OFFSET_TRANSAC_LEN); } else { mtk_i2c_writew(msgs->len, i2c, OFFSET_TRANSFER_LEN); @@ -140,7 +138,7 @@ index faecf7e..c501421 100644 } /* Prepare buffer data to start transfer */ -@@ -436,13 +465,23 @@ static int mtk_i2c_do_transfer(struct mtk_i2c *i2c, struct i2c_msg *msgs) +@@ -436,13 +465,23 @@ static int mtk_i2c_do_transfer(struct mt /* flush before sending start */ mb(); mtk_i2c_writel_dma(I2C_DMA_START_EN, i2c, OFFSET_EN); @@ -166,7 +164,7 @@ index faecf7e..c501421 100644 | I2C_TRANSAC_COMP), i2c, OFFSET_INTR_MASK); if (i2c->op == I2C_MASTER_WR) { -@@ -472,6 +511,10 @@ static int mtk_i2c_do_transfer(struct mtk_i2c *i2c, struct i2c_msg *msgs) +@@ -472,6 +511,10 @@ static int mtk_i2c_do_transfer(struct mt return -EREMOTEIO; } @@ -177,7 +175,7 @@ index faecf7e..c501421 100644 return 0; } -@@ -486,28 +529,33 @@ static int mtk_i2c_transfer(struct i2c_adapter *adap, +@@ -486,28 +529,33 @@ static int mtk_i2c_transfer(struct i2c_a if (ret) return ret; @@ -230,7 +228,7 @@ index faecf7e..c501421 100644 /* the return value is number of executed messages */ ret = num; -@@ -521,7 +569,7 @@ static irqreturn_t mtk_i2c_irq(int irqno, void *dev_id) +@@ -521,7 +569,7 @@ static irqreturn_t mtk_i2c_irq(int irqno struct mtk_i2c *i2c = dev_id; i2c->irq_stat = mtk_i2c_readw(i2c, OFFSET_INTR_STAT); @@ -239,6 +237,3 @@ index faecf7e..c501421 100644 | I2C_TRANSAC_COMP, i2c, OFFSET_INTR_STAT); complete(&i2c->msg_complete); --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0032-dt-bindings-mediatek-Add-MT8173-cpufreq-driver-bindi.patch b/target/linux/mediatek/patches/0032-dt-bindings-mediatek-Add-MT8173-cpufreq-driver-bindi.patch index 7f3b249a05..54ae45b90e 100644 --- a/target/linux/mediatek/patches/0032-dt-bindings-mediatek-Add-MT8173-cpufreq-driver-bindi.patch +++ b/target/linux/mediatek/patches/0032-dt-bindings-mediatek-Add-MT8173-cpufreq-driver-bindi.patch @@ -12,9 +12,6 @@ Signed-off-by: Pi-Cheng Chen 1 file changed, 127 insertions(+) create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-mt8173.txt -diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-mt8173.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-mt8173.txt -new file mode 100644 -index 0000000..7708a65 --- /dev/null +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mt8173.txt @@ -0,0 +1,127 @@ @@ -145,6 +142,3 @@ index 0000000..7708a65 + proc-supply = <&da9211_vcpu_reg>; + sram-supply = <&mt6397_vsramca7_reg>; + }; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0033-cpufreq-mediatek-Add-MT8173-cpufreq-driver.patch b/target/linux/mediatek/patches/0033-cpufreq-mediatek-Add-MT8173-cpufreq-driver.patch index 81ae4f8275..883fcab0aa 100644 --- a/target/linux/mediatek/patches/0033-cpufreq-mediatek-Add-MT8173-cpufreq-driver.patch +++ b/target/linux/mediatek/patches/0033-cpufreq-mediatek-Add-MT8173-cpufreq-driver.patch @@ -13,8 +13,6 @@ Signed-off-by: Pi-Cheng Chen 3 files changed, 558 insertions(+) create mode 100644 drivers/cpufreq/mt8173-cpufreq.c -diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm -index 4f3dbc8..350752b 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -141,6 +141,13 @@ config ARM_KIRKWOOD_CPUFREQ @@ -31,11 +29,9 @@ index 4f3dbc8..350752b 100644 config ARM_OMAP2PLUS_CPUFREQ bool "TI OMAP2+" depends on ARCH_OMAP2PLUS -diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile -index cdce92a..97f9a9b 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile -@@ -63,6 +63,7 @@ obj-$(CONFIG_ARM_HISI_ACPU_CPUFREQ) += hisi-acpu-cpufreq.o +@@ -63,6 +63,7 @@ obj-$(CONFIG_ARM_HISI_ACPU_CPUFREQ) += h obj-$(CONFIG_ARM_IMX6Q_CPUFREQ) += imx6q-cpufreq.o obj-$(CONFIG_ARM_INTEGRATOR) += integrator-cpufreq.o obj-$(CONFIG_ARM_KIRKWOOD_CPUFREQ) += kirkwood-cpufreq.o @@ -43,9 +39,6 @@ index cdce92a..97f9a9b 100644 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/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c -new file mode 100644 -index 0000000..d539e7b --- /dev/null +++ b/drivers/cpufreq/mt8173-cpufreq.c @@ -0,0 +1,550 @@ @@ -599,6 +592,3 @@ index 0000000..d539e7b + return 0; +} +module_init(mt8173_cpufreq_driver_init); --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0034-mmc-dt-bindings-add-Mediatek-MMC-bindings.patch b/target/linux/mediatek/patches/0034-mmc-dt-bindings-add-Mediatek-MMC-bindings.patch index 02a153d7da..97a00efda2 100644 --- a/target/linux/mediatek/patches/0034-mmc-dt-bindings-add-Mediatek-MMC-bindings.patch +++ b/target/linux/mediatek/patches/0034-mmc-dt-bindings-add-Mediatek-MMC-bindings.patch @@ -11,9 +11,6 @@ Signed-off-by: Chaotian Jing 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/mtk-sd.txt -diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt -new file mode 100644 -index 0000000..a1adfa4 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt @@ -0,0 +1,32 @@ @@ -49,6 +46,3 @@ index 0000000..a1adfa4 + pinctrl-0 = <&mmc0_pins_default>; + pinctrl-1 = <&mmc0_pins_uhs>; +}; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0035-mmc-mediatek-Add-Mediatek-MMC-driver.patch b/target/linux/mediatek/patches/0035-mmc-mediatek-Add-Mediatek-MMC-driver.patch index d135ad0432..a954abe8a3 100644 --- a/target/linux/mediatek/patches/0035-mmc-mediatek-Add-Mediatek-MMC-driver.patch +++ b/target/linux/mediatek/patches/0035-mmc-mediatek-Add-Mediatek-MMC-driver.patch @@ -17,7 +17,7 @@ Signed-off-by: Chaotian Jing --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig -@@ -800,3 +800,11 @@ +@@ -800,3 +800,11 @@ config MMC_TOSHIBA_PCI tristate "Toshiba Type A SD/MMC Card Interface Driver" depends on PCI help @@ -31,7 +31,7 @@ Signed-off-by: Chaotian Jing + If unsure, say N. --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile -@@ -20,6 +20,7 @@ +@@ -20,6 +20,7 @@ obj-$(CONFIG_MMC_SDHCI_F_SDH30) += sdhci obj-$(CONFIG_MMC_SDHCI_SPEAR) += sdhci-spear.o obj-$(CONFIG_MMC_WBSD) += wbsd.o obj-$(CONFIG_MMC_AU1X) += au1xmmc.o diff --git a/target/linux/mediatek/patches/0036-mmc-mediatek-Add-PM-support-for-MMC-driver.patch b/target/linux/mediatek/patches/0036-mmc-mediatek-Add-PM-support-for-MMC-driver.patch index e9ba31d76f..d806778bfe 100644 --- a/target/linux/mediatek/patches/0036-mmc-mediatek-Add-PM-support-for-MMC-driver.patch +++ b/target/linux/mediatek/patches/0036-mmc-mediatek-Add-PM-support-for-MMC-driver.patch @@ -11,8 +11,6 @@ Signed-off-by: Chaotian Jing drivers/mmc/host/mtk-sd.c | 89 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 3 deletions(-) -diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c -index 952be2e..7c20f28 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -22,6 +22,8 @@ @@ -56,7 +54,7 @@ index 952be2e..7c20f28 100644 }; static void sdr_set_bits(void __iomem *reg, u32 bs) -@@ -677,6 +690,9 @@ static void msdc_request_done(struct msdc_host *host, struct mmc_request *mrq) +@@ -677,6 +690,9 @@ static void msdc_request_done(struct msd if (mrq->data) msdc_unprepare_data(host, mrq); mmc_request_done(host->mmc, mrq); @@ -66,7 +64,7 @@ index 952be2e..7c20f28 100644 } /* returns true if command is fully handled; returns false otherwise */ -@@ -831,6 +847,8 @@ static void msdc_ops_request(struct mmc_host *mmc, struct mmc_request *mrq) +@@ -831,6 +847,8 @@ static void msdc_ops_request(struct mmc_ WARN_ON(host->mrq); host->mrq = mrq; @@ -75,7 +73,7 @@ index 952be2e..7c20f28 100644 if (mrq->data) msdc_prepare_data(host, mrq); -@@ -1145,6 +1163,8 @@ static void msdc_ops_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) +@@ -1145,6 +1163,8 @@ static void msdc_ops_set_ios(struct mmc_ int ret; u32 ddr = 0; @@ -84,7 +82,7 @@ index 952be2e..7c20f28 100644 if (ios->timing == MMC_TIMING_UHS_DDR50 || ios->timing == MMC_TIMING_MMC_DDR52) ddr = 1; -@@ -1159,7 +1179,7 @@ static void msdc_ops_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) +@@ -1159,7 +1179,7 @@ static void msdc_ops_set_ios(struct mmc_ ios->vdd); if (ret) { dev_err(host->dev, "Failed to set vmmc power!\n"); @@ -93,7 +91,7 @@ index 952be2e..7c20f28 100644 } } break; -@@ -1187,6 +1207,10 @@ static void msdc_ops_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) +@@ -1187,6 +1207,10 @@ static void msdc_ops_set_ios(struct mmc_ if (host->mclk != ios->clock || host->ddr != ddr) msdc_set_mclk(host, ddr, ios->clock); @@ -104,7 +102,7 @@ index 952be2e..7c20f28 100644 } static struct mmc_host_ops mt_msdc_ops = { -@@ -1310,12 +1334,18 @@ static int msdc_drv_probe(struct platform_device *pdev) +@@ -1310,12 +1334,18 @@ static int msdc_drv_probe(struct platfor if (ret) goto release; @@ -125,7 +123,7 @@ index 952be2e..7c20f28 100644 release: platform_set_drvdata(pdev, NULL); msdc_deinit_hw(host); -@@ -1343,11 +1373,15 @@ static int msdc_drv_remove(struct platform_device *pdev) +@@ -1343,11 +1373,15 @@ static int msdc_drv_remove(struct platfo mmc = platform_get_drvdata(pdev); host = mmc_priv(mmc); @@ -141,7 +139,7 @@ index 952be2e..7c20f28 100644 dma_free_coherent(&pdev->dev, sizeof(struct mt_gpdma_desc), host->dma.gpd, host->dma.gpd_addr); -@@ -1359,6 +1393,54 @@ static int msdc_drv_remove(struct platform_device *pdev) +@@ -1359,6 +1393,54 @@ static int msdc_drv_remove(struct platfo return 0; } @@ -196,7 +194,7 @@ index 952be2e..7c20f28 100644 static const struct of_device_id msdc_of_ids[] = { { .compatible = "mediatek,mt8135-mmc", }, {} -@@ -1370,6 +1452,7 @@ static struct platform_driver mt_msdc_driver = { +@@ -1370,6 +1452,7 @@ static struct platform_driver mt_msdc_dr .driver = { .name = "mtk-msdc", .of_match_table = msdc_of_ids, @@ -204,6 +202,3 @@ index 952be2e..7c20f28 100644 }, }; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0037-arm64-mediatek-Add-Mediatek-MMC-support-in-defconfig.patch b/target/linux/mediatek/patches/0037-arm64-mediatek-Add-Mediatek-MMC-support-in-defconfig.patch index 7d9143f2f6..c4478040df 100644 --- a/target/linux/mediatek/patches/0037-arm64-mediatek-Add-Mediatek-MMC-support-in-defconfig.patch +++ b/target/linux/mediatek/patches/0037-arm64-mediatek-Add-Mediatek-MMC-support-in-defconfig.patch @@ -11,8 +11,6 @@ Signed-off-by: Eddie Huang arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) -diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig -index 2ed7449..e03288a 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -138,6 +138,7 @@ CONFIG_MMC_ARMMMCI=y @@ -23,6 +21,3 @@ index 2ed7449..e03288a 100644 CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_EFI=y CONFIG_RTC_DRV_XGENE=y --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0038-ARM-multi_v7_defconfig-Enable-Mediatek-MMC-support-m.patch b/target/linux/mediatek/patches/0038-ARM-multi_v7_defconfig-Enable-Mediatek-MMC-support-m.patch index 35dc99faf9..67ac7dd733 100644 --- a/target/linux/mediatek/patches/0038-ARM-multi_v7_defconfig-Enable-Mediatek-MMC-support-m.patch +++ b/target/linux/mediatek/patches/0038-ARM-multi_v7_defconfig-Enable-Mediatek-MMC-support-m.patch @@ -12,8 +12,6 @@ Signed-off-by: Chaotian Jing arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) -diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig -index fbbb191..bfa09ab 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -477,6 +477,7 @@ CONFIG_MMC_DW_EXYNOS=y @@ -24,6 +22,3 @@ index fbbb191..bfa09ab 100644 CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_GPIO=y --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0039-clocksource-mediatek-Don-t-run-event_handler-if-it-i.patch b/target/linux/mediatek/patches/0039-clocksource-mediatek-Don-t-run-event_handler-if-it-i.patch index aabe8497f3..7da9bfa86c 100644 --- a/target/linux/mediatek/patches/0039-clocksource-mediatek-Don-t-run-event_handler-if-it-i.patch +++ b/target/linux/mediatek/patches/0039-clocksource-mediatek-Don-t-run-event_handler-if-it-i.patch @@ -13,11 +13,9 @@ Signed-off-by: Yingjoe Chen drivers/clocksource/mtk_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/drivers/clocksource/mtk_timer.c b/drivers/clocksource/mtk_timer.c -index 68ab423..85e0ab5 100644 --- a/drivers/clocksource/mtk_timer.c +++ b/drivers/clocksource/mtk_timer.c -@@ -143,7 +143,8 @@ static irqreturn_t mtk_timer_interrupt(int irq, void *dev_id) +@@ -143,7 +143,8 @@ static irqreturn_t mtk_timer_interrupt(i /* Acknowledge timer0 irq */ writel(GPT_IRQ_ACK(GPT_CLK_EVT), evt->gpt_base + GPT_IRQ_ACK_REG); @@ -27,6 +25,3 @@ index 68ab423..85e0ab5 100644 return IRQ_HANDLED; } --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0040-clocksource-mediatek-Use-GPT-as-sched-clock-source.patch b/target/linux/mediatek/patches/0040-clocksource-mediatek-Use-GPT-as-sched-clock-source.patch index c6b66afc05..4de1d75c89 100644 --- a/target/linux/mediatek/patches/0040-clocksource-mediatek-Use-GPT-as-sched-clock-source.patch +++ b/target/linux/mediatek/patches/0040-clocksource-mediatek-Use-GPT-as-sched-clock-source.patch @@ -11,8 +11,6 @@ Signed-off-by: Yingjoe Chen drivers/clocksource/mtk_timer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -diff --git a/drivers/clocksource/mtk_timer.c b/drivers/clocksource/mtk_timer.c -index 85e0ab5..9a90c7b 100644 --- a/drivers/clocksource/mtk_timer.c +++ b/drivers/clocksource/mtk_timer.c @@ -24,6 +24,7 @@ @@ -37,7 +35,7 @@ index 85e0ab5..9a90c7b 100644 static inline struct mtk_clock_event_device *to_mtk_clk( struct clock_event_device *c) { -@@ -239,6 +247,8 @@ static void __init mtk_timer_init(struct device_node *node) +@@ -239,6 +247,8 @@ static void __init mtk_timer_init(struct mtk_timer_setup(evt, GPT_CLK_SRC, TIMER_CTRL_OP_FREERUN); clocksource_mmio_init(evt->gpt_base + TIMER_CNT_REG(GPT_CLK_SRC), node->name, rate, 300, 32, clocksource_mmio_readl_up); @@ -46,6 +44,3 @@ index 85e0ab5..9a90c7b 100644 /* Configure clock event */ mtk_timer_setup(evt, GPT_CLK_EVT, TIMER_CTRL_OP_REPEAT); --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0041-arm-mediatek-enable-gpt6-on-boot-up-to-make-arch-tim.patch b/target/linux/mediatek/patches/0041-arm-mediatek-enable-gpt6-on-boot-up-to-make-arch-tim.patch index 728792c2a8..48c7d142d9 100644 --- a/target/linux/mediatek/patches/0041-arm-mediatek-enable-gpt6-on-boot-up-to-make-arch-tim.patch +++ b/target/linux/mediatek/patches/0041-arm-mediatek-enable-gpt6-on-boot-up-to-make-arch-tim.patch @@ -13,8 +13,6 @@ Signed-off-by: Yingjoe Chen arch/arm/mach-mediatek/mediatek.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) -diff --git a/arch/arm/mach-mediatek/mediatek.c b/arch/arm/mach-mediatek/mediatek.c -index a954900..6b38d67 100644 --- a/arch/arm/mach-mediatek/mediatek.c +++ b/arch/arm/mach-mediatek/mediatek.c @@ -16,6 +16,34 @@ @@ -52,12 +50,9 @@ index a954900..6b38d67 100644 static const char * const mediatek_board_dt_compat[] = { "mediatek,mt6589", -@@ -27,4 +55,5 @@ static const char * const mediatek_board_dt_compat[] = { +@@ -27,4 +55,5 @@ static const char * const mediatek_board DT_MACHINE_START(MEDIATEK_DT, "Mediatek Cortex-A7 (Device Tree)") .dt_compat = mediatek_board_dt_compat, + .init_time = mediatek_timer_init, MACHINE_END --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0042-ARM-mediatek-add-smp-bringup-code.patch b/target/linux/mediatek/patches/0042-ARM-mediatek-add-smp-bringup-code.patch index 8910532e18..c03fb5f6cb 100644 --- a/target/linux/mediatek/patches/0042-ARM-mediatek-add-smp-bringup-code.patch +++ b/target/linux/mediatek/patches/0042-ARM-mediatek-add-smp-bringup-code.patch @@ -13,8 +13,6 @@ Signed-off-by: Yingjoe Chen 2 files changed, 148 insertions(+) create mode 100644 arch/arm/mach-mediatek/platsmp.c -diff --git a/arch/arm/mach-mediatek/Makefile b/arch/arm/mach-mediatek/Makefile -index 43e619f..2116460 100644 --- a/arch/arm/mach-mediatek/Makefile +++ b/arch/arm/mach-mediatek/Makefile @@ -1 +1,4 @@ @@ -22,9 +20,6 @@ index 43e619f..2116460 100644 +obj-$(CONFIG_ARCH_MEDIATEK) += platsmp.o +endif obj-$(CONFIG_ARCH_MEDIATEK) += mediatek.o -diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c -new file mode 100644 -index 0000000..e266b3d --- /dev/null +++ b/arch/arm/mach-mediatek/platsmp.c @@ -0,0 +1,145 @@ @@ -173,6 +168,3 @@ index 0000000..e266b3d + .smp_boot_secondary = mtk_boot_secondary, +}; +CPU_METHOD_OF_DECLARE(mt65xx_smp, "mediatek,mt65xx-smp", &mt65xx_smp_ops); --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0043-ARM-dts-mt8127-enable-basic-SMP-bringup-for-mt8127.patch b/target/linux/mediatek/patches/0043-ARM-dts-mt8127-enable-basic-SMP-bringup-for-mt8127.patch index 60990c3282..432c48e9ca 100644 --- a/target/linux/mediatek/patches/0043-ARM-dts-mt8127-enable-basic-SMP-bringup-for-mt8127.patch +++ b/target/linux/mediatek/patches/0043-ARM-dts-mt8127-enable-basic-SMP-bringup-for-mt8127.patch @@ -14,8 +14,6 @@ Signed-off-by: Yingjoe Chen arch/arm/boot/dts/mt8127.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -diff --git a/arch/arm/boot/dts/mt8127.dtsi b/arch/arm/boot/dts/mt8127.dtsi -index aaa7862..7c2090d 100644 --- a/arch/arm/boot/dts/mt8127.dtsi +++ b/arch/arm/boot/dts/mt8127.dtsi @@ -23,6 +23,7 @@ @@ -48,6 +46,3 @@ index aaa7862..7c2090d 100644 soc { #address-cells = <2>; #size-cells = <2>; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0044-dt-bindings-Add-usb3.0-phy-binding-for-MT65xx-SoCs.patch b/target/linux/mediatek/patches/0044-dt-bindings-Add-usb3.0-phy-binding-for-MT65xx-SoCs.patch index 1783e089ae..4b3fc675df 100644 --- a/target/linux/mediatek/patches/0044-dt-bindings-Add-usb3.0-phy-binding-for-MT65xx-SoCs.patch +++ b/target/linux/mediatek/patches/0044-dt-bindings-Add-usb3.0-phy-binding-for-MT65xx-SoCs.patch @@ -12,9 +12,6 @@ Signed-off-by: Chunfeng Yun 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/mt65xx-u3phy.txt -diff --git a/Documentation/devicetree/bindings/usb/mt65xx-u3phy.txt b/Documentation/devicetree/bindings/usb/mt65xx-u3phy.txt -new file mode 100644 -index 0000000..b0b91b0 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/mt65xx-u3phy.txt @@ -0,0 +1,37 @@ @@ -55,6 +52,3 @@ index 0000000..b0b91b0 + "u3phya_ref"; + disable-usb2-p1; +}; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0045-dt-bindings-Add-a-binding-for-Mediatek-xHCI-host-con.patch b/target/linux/mediatek/patches/0045-dt-bindings-Add-a-binding-for-Mediatek-xHCI-host-con.patch index 6c1d7b3759..07c2a93201 100644 --- a/target/linux/mediatek/patches/0045-dt-bindings-Add-a-binding-for-Mediatek-xHCI-host-con.patch +++ b/target/linux/mediatek/patches/0045-dt-bindings-Add-a-binding-for-Mediatek-xHCI-host-con.patch @@ -13,9 +13,6 @@ Signed-off-by: Chunfeng Yun 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/mt8173-xhci.txt -diff --git a/Documentation/devicetree/bindings/usb/mt8173-xhci.txt b/Documentation/devicetree/bindings/usb/mt8173-xhci.txt -new file mode 100644 -index 0000000..da28570 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/mt8173-xhci.txt @@ -0,0 +1,19 @@ @@ -38,6 +35,3 @@ index 0000000..da28570 + usb-phy = <&u3phy>; + usb3-lpm-capable; +}; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0046-usb-phy-add-usb3.0-phy-driver-for-mt65xx-SoCs.patch b/target/linux/mediatek/patches/0046-usb-phy-add-usb3.0-phy-driver-for-mt65xx-SoCs.patch index 40ba24d552..62000bc0a3 100644 --- a/target/linux/mediatek/patches/0046-usb-phy-add-usb3.0-phy-driver-for-mt65xx-SoCs.patch +++ b/target/linux/mediatek/patches/0046-usb-phy-add-usb3.0-phy-driver-for-mt65xx-SoCs.patch @@ -11,8 +11,6 @@ Signed-off-by: Chunfeng Yun 3 files changed, 735 insertions(+) create mode 100644 drivers/usb/phy/phy-mt65xx-usb3.c -diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig -index 2175678..dfca566 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig @@ -151,6 +151,16 @@ config USB_MSM_OTG @@ -32,11 +30,9 @@ index 2175678..dfca566 100644 config USB_MV_OTG tristate "Marvell USB OTG support" depends on USB_EHCI_MV && USB_MV_UDC && PM -diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile -index 75f2bba..d6113a4 100644 --- a/drivers/usb/phy/Makefile +++ b/drivers/usb/phy/Makefile -@@ -20,6 +20,7 @@ obj-$(CONFIG_USB_EHCI_TEGRA) += phy-tegra-usb.o +@@ -20,6 +20,7 @@ obj-$(CONFIG_USB_EHCI_TEGRA) += phy-teg obj-$(CONFIG_USB_GPIO_VBUS) += phy-gpio-vbus-usb.o obj-$(CONFIG_USB_ISP1301) += phy-isp1301.o obj-$(CONFIG_USB_MSM_OTG) += phy-msm-usb.o @@ -44,9 +40,6 @@ index 75f2bba..d6113a4 100644 obj-$(CONFIG_USB_MV_OTG) += phy-mv-usb.o obj-$(CONFIG_USB_MXS_PHY) += phy-mxs-usb.o obj-$(CONFIG_USB_RCAR_PHY) += phy-rcar-usb.o -diff --git a/drivers/usb/phy/phy-mt65xx-usb3.c b/drivers/usb/phy/phy-mt65xx-usb3.c -new file mode 100644 -index 0000000..ec5cf24 --- /dev/null +++ b/drivers/usb/phy/phy-mt65xx-usb3.c @@ -0,0 +1,724 @@ @@ -774,6 +767,3 @@ index 0000000..ec5cf24 + +MODULE_DESCRIPTION("Mt65xx USB PHY driver"); +MODULE_LICENSE("GPL v2"); --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0047-xhci-mediatek-support-MTK-xHCI-host-controller.patch b/target/linux/mediatek/patches/0047-xhci-mediatek-support-MTK-xHCI-host-controller.patch index ea3289ed7e..135ac63e89 100644 --- a/target/linux/mediatek/patches/0047-xhci-mediatek-support-MTK-xHCI-host-controller.patch +++ b/target/linux/mediatek/patches/0047-xhci-mediatek-support-MTK-xHCI-host-controller.patch @@ -24,7 +24,7 @@ Signed-off-by: Chunfeng Yun --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig -@@ -41,6 +41,15 @@ +@@ -41,6 +41,15 @@ config USB_XHCI_PLATFORM If unsure, say N. @@ -42,7 +42,7 @@ Signed-off-by: Chunfeng Yun select USB_XHCI_PLATFORM --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile -@@ -15,6 +15,9 @@ +@@ -15,6 +15,9 @@ xhci-hcd-y += xhci-ring.o xhci-hub.o xhc xhci-hcd-y += xhci-trace.o xhci-plat-hcd-y := xhci-plat.o @@ -657,7 +657,7 @@ Signed-off-by: Chunfeng Yun static struct hc_driver __read_mostly xhci_plat_hc_driver; -@@ -49,7 +50,23 @@ +@@ -49,7 +50,23 @@ static int xhci_plat_setup(struct usb_hc return ret; } @@ -682,7 +682,7 @@ Signed-off-by: Chunfeng Yun } static int xhci_plat_start(struct usb_hcd *hcd) -@@ -207,6 +224,8 @@ +@@ -207,6 +224,8 @@ static int xhci_plat_remove(struct platf if (!IS_ERR(clk)) clk_disable_unprepare(clk); usb_put_hcd(hcd); @@ -691,7 +691,7 @@ Signed-off-by: Chunfeng Yun kfree(xhci); return 0; -@@ -253,6 +272,7 @@ +@@ -253,6 +272,7 @@ static const struct of_device_id usb_xhc { .compatible = "marvell,armada-380-xhci"}, { .compatible = "renesas,xhci-r8a7790"}, { .compatible = "renesas,xhci-r8a7791"}, @@ -709,7 +709,7 @@ Signed-off-by: Chunfeng Yun /* * Returns zero if the TRB isn't in this segment, otherwise it returns the DMA -@@ -3163,9 +3164,14 @@ +@@ -3173,9 +3174,14 @@ static int queue_bulk_sg_tx(struct xhci_ /* Set the TRB length, TD size, and interrupter fields. */ if (xhci->hci_version < 0x100) { @@ -725,7 +725,7 @@ Signed-off-by: Chunfeng Yun } else { remainder = xhci_v1_0_td_remainder(running_total, trb_buff_len, total_packet_count, urb, -@@ -3336,9 +3342,14 @@ +@@ -3346,9 +3352,14 @@ int xhci_queue_bulk_tx(struct xhci_hcd * /* Set the TRB length, TD size, and interrupter fields. */ if (xhci->hci_version < 0x100) { @@ -741,7 +741,7 @@ Signed-off-by: Chunfeng Yun } else { remainder = xhci_v1_0_td_remainder(running_total, trb_buff_len, total_packet_count, urb, -@@ -3457,8 +3468,14 @@ +@@ -3467,8 +3478,14 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * field = TRB_TYPE(TRB_DATA); length_field = TRB_LEN(urb->transfer_buffer_length) | @@ -757,7 +757,7 @@ Signed-off-by: Chunfeng Yun if (urb->transfer_buffer_length > 0) { if (setup->bRequestType & USB_DIR_IN) field |= TRB_DIR_IN; -@@ -3682,8 +3699,14 @@ +@@ -3692,8 +3709,14 @@ static int xhci_queue_isoc_tx(struct xhc /* Set the TRB length, TD size, & interrupter fields. */ if (xhci->hci_version < 0x100) { @@ -784,7 +784,7 @@ Signed-off-by: Chunfeng Yun #define DRIVER_AUTHOR "Sarah Sharp" #define DRIVER_DESC "'eXtensible' Host Controller (xHC) Driver" -@@ -624,7 +625,11 @@ +@@ -624,7 +625,11 @@ int xhci_run(struct usb_hcd *hcd) "// Set the interrupt modulation register"); temp = readl(&xhci->ir_set->irq_control); temp &= ~ER_IRQ_INTERVAL_MASK; @@ -797,7 +797,7 @@ Signed-off-by: Chunfeng Yun writel(temp, &xhci->ir_set->irq_control); /* Set the HCD state before we enable the irqs */ -@@ -1698,6 +1703,9 @@ +@@ -1698,6 +1703,9 @@ int xhci_drop_endpoint(struct usb_hcd *h xhci_endpoint_zero(xhci, xhci->devs[udev->slot_id], ep); @@ -807,7 +807,7 @@ Signed-off-by: Chunfeng Yun xhci_dbg(xhci, "drop ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x\n", (unsigned int) ep->desc.bEndpointAddress, udev->slot_id, -@@ -1793,6 +1801,12 @@ +@@ -1793,6 +1801,12 @@ int xhci_add_endpoint(struct usb_hcd *hc return -ENOMEM; } @@ -822,7 +822,7 @@ Signed-off-by: Chunfeng Yun --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1568,6 +1568,7 @@ +@@ -1568,6 +1568,7 @@ struct xhci_hcd { /* For controllers with a broken beyond repair streams implementation */ #define XHCI_BROKEN_STREAMS (1 << 19) #define XHCI_PME_STUCK_QUIRK (1 << 20) diff --git a/target/linux/mediatek/patches/0048-dt-bindings-mediatek-Modify-pinctrl-bindings-for-mt6.patch b/target/linux/mediatek/patches/0048-dt-bindings-mediatek-Modify-pinctrl-bindings-for-mt6.patch index 40303c0e92..15254097af 100644 --- a/target/linux/mediatek/patches/0048-dt-bindings-mediatek-Modify-pinctrl-bindings-for-mt6.patch +++ b/target/linux/mediatek/patches/0048-dt-bindings-mediatek-Modify-pinctrl-bindings-for-mt6.patch @@ -13,8 +13,6 @@ Signed-off-by: Hongzhou Yang Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) -diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt -index 5868a0f..0480bc3 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt @@ -3,9 +3,11 @@ @@ -41,6 +39,3 @@ index 5868a0f..0480bc3 100644 - reg: physicall address base for EINT registers - interrupt-controller: Marks the device node as an interrupt controller - #interrupt-cells: Should be two. --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0049-pinctrl-dt-bindings-mt6397-Add-pinfunc-header-file-f.patch b/target/linux/mediatek/patches/0049-pinctrl-dt-bindings-mt6397-Add-pinfunc-header-file-f.patch index 8178761677..29f7b0933f 100644 --- a/target/linux/mediatek/patches/0049-pinctrl-dt-bindings-mt6397-Add-pinfunc-header-file-f.patch +++ b/target/linux/mediatek/patches/0049-pinctrl-dt-bindings-mt6397-Add-pinfunc-header-file-f.patch @@ -12,9 +12,6 @@ Signed-off-by: Hongzhou Yang 1 file changed, 256 insertions(+) create mode 100644 include/dt-bindings/pinctrl/mt6397-pinfunc.h -diff --git a/include/dt-bindings/pinctrl/mt6397-pinfunc.h b/include/dt-bindings/pinctrl/mt6397-pinfunc.h -new file mode 100644 -index 0000000..85739b3 --- /dev/null +++ b/include/dt-bindings/pinctrl/mt6397-pinfunc.h @@ -0,0 +1,256 @@ @@ -274,6 +271,3 @@ index 0000000..85739b3 +#define MT6397_PIN_40_CEC__FUNC_TEST_OUT31 (MTK_PIN_NO(40) | 7) + +#endif /* __DTS_MT6397_PINFUNC_H */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0050-pinctrl-mediatek-data-struct-optimize-and-remove-unu.patch b/target/linux/mediatek/patches/0050-pinctrl-mediatek-data-struct-optimize-and-remove-unu.patch index 7399746783..ab1ccdb9b0 100644 --- a/target/linux/mediatek/patches/0050-pinctrl-mediatek-data-struct-optimize-and-remove-unu.patch +++ b/target/linux/mediatek/patches/0050-pinctrl-mediatek-data-struct-optimize-and-remove-unu.patch @@ -18,8 +18,6 @@ Signed-off-by: Hongzhou Yang drivers/pinctrl/mediatek/pinctrl-mtk-common.h | 10 ++-------- 2 files changed, 6 insertions(+), 14 deletions(-) -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8135.c b/drivers/pinctrl/mediatek/pinctrl-mt8135.c -index f1e1e18..8e6abd5 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt8135.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt8135.c @@ -32,12 +32,12 @@ @@ -39,7 +37,7 @@ index f1e1e18..8e6abd5 100644 unsigned char r1_bit; }; -@@ -305,7 +305,6 @@ static const struct mtk_pinctrl_devdata mt8135_pinctrl_data = { +@@ -305,7 +305,6 @@ static const struct mtk_pinctrl_devdata .pullen_offset = 0x0200, .smt_offset = 0x0300, .pullsel_offset = 0x0400, @@ -47,7 +45,7 @@ index f1e1e18..8e6abd5 100644 .dout_offset = 0x0800, .din_offset = 0x0A00, .pinmux_offset = 0x0C00, -@@ -314,7 +313,6 @@ static const struct mtk_pinctrl_devdata mt8135_pinctrl_data = { +@@ -314,7 +313,6 @@ static const struct mtk_pinctrl_devdata .port_shf = 4, .port_mask = 0xf, .port_align = 4, @@ -55,8 +53,6 @@ index f1e1e18..8e6abd5 100644 .eint_offsets = { .name = "mt8135_eint", .stat = 0x000, -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h -index 375771d..1508849 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h @@ -19,8 +19,6 @@ @@ -111,6 +107,3 @@ index 375771d..1508849 100644 struct mtk_eint_offsets eint_offsets; unsigned int ap_num; unsigned int db_cnt; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0051-pinctrl-mediatek-add-mtk_pctrl_spec_pull_set_samereg.patch b/target/linux/mediatek/patches/0051-pinctrl-mediatek-add-mtk_pctrl_spec_pull_set_samereg.patch index 2e9eb60b5b..c569213c7e 100644 --- a/target/linux/mediatek/patches/0051-pinctrl-mediatek-add-mtk_pctrl_spec_pull_set_samereg.patch +++ b/target/linux/mediatek/patches/0051-pinctrl-mediatek-add-mtk_pctrl_spec_pull_set_samereg.patch @@ -17,8 +17,6 @@ Signed-off-by: Hongzhou Yang drivers/pinctrl/mediatek/pinctrl-mtk-common.h | 31 +++++ 3 files changed, 136 insertions(+), 121 deletions(-) -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8173.c b/drivers/pinctrl/mediatek/pinctrl-mt8173.c -index 412ea84..cc44b27 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt8173.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt8173.c @@ -47,130 +47,54 @@ struct mtk_pin_ies_smt_set { @@ -39,8 +37,49 @@ index 412ea84..cc44b27 100644 - unsigned char pupd_bit; - unsigned char r1_bit; - unsigned char r0_bit; --}; -- ++static const struct mtk_pin_spec_pupd_set_samereg mt8173_spec_pupd[] = { ++ MTK_PIN_PUPD_SPEC_SR(119, 0xe00, 2, 1, 0), /* KROW0 */ ++ MTK_PIN_PUPD_SPEC_SR(120, 0xe00, 6, 5, 4), /* KROW1 */ ++ MTK_PIN_PUPD_SPEC_SR(121, 0xe00, 10, 9, 8), /* KROW2 */ ++ MTK_PIN_PUPD_SPEC_SR(122, 0xe10, 2, 1, 0), /* KCOL0 */ ++ MTK_PIN_PUPD_SPEC_SR(123, 0xe10, 6, 5, 4), /* KCOL1 */ ++ MTK_PIN_PUPD_SPEC_SR(124, 0xe10, 10, 9, 8), /* KCOL2 */ ++ ++ MTK_PIN_PUPD_SPEC_SR(67, 0xd10, 2, 1, 0), /* ms0 DS */ ++ MTK_PIN_PUPD_SPEC_SR(68, 0xd00, 2, 1, 0), /* ms0 RST */ ++ MTK_PIN_PUPD_SPEC_SR(66, 0xc10, 2, 1, 0), /* ms0 cmd */ ++ MTK_PIN_PUPD_SPEC_SR(65, 0xc00, 2, 1, 0), /* ms0 clk */ ++ MTK_PIN_PUPD_SPEC_SR(57, 0xc20, 2, 1, 0), /* ms0 data0 */ ++ MTK_PIN_PUPD_SPEC_SR(58, 0xc20, 2, 1, 0), /* ms0 data1 */ ++ MTK_PIN_PUPD_SPEC_SR(59, 0xc20, 2, 1, 0), /* ms0 data2 */ ++ MTK_PIN_PUPD_SPEC_SR(60, 0xc20, 2, 1, 0), /* ms0 data3 */ ++ MTK_PIN_PUPD_SPEC_SR(61, 0xc20, 2, 1, 0), /* ms0 data4 */ ++ MTK_PIN_PUPD_SPEC_SR(62, 0xc20, 2, 1, 0), /* ms0 data5 */ ++ MTK_PIN_PUPD_SPEC_SR(63, 0xc20, 2, 1, 0), /* ms0 data6 */ ++ MTK_PIN_PUPD_SPEC_SR(64, 0xc20, 2, 1, 0), /* ms0 data7 */ ++ ++ MTK_PIN_PUPD_SPEC_SR(78, 0xc50, 2, 1, 0), /* ms1 cmd */ ++ MTK_PIN_PUPD_SPEC_SR(73, 0xd20, 2, 1, 0), /* ms1 dat0 */ ++ MTK_PIN_PUPD_SPEC_SR(74, 0xd20, 6, 5, 4), /* ms1 dat1 */ ++ MTK_PIN_PUPD_SPEC_SR(75, 0xd20, 10, 9, 8), /* ms1 dat2 */ ++ MTK_PIN_PUPD_SPEC_SR(76, 0xd20, 14, 13, 12), /* ms1 dat3 */ ++ MTK_PIN_PUPD_SPEC_SR(77, 0xc40, 2, 1, 0), /* ms1 clk */ ++ ++ MTK_PIN_PUPD_SPEC_SR(100, 0xd40, 2, 1, 0), /* ms2 dat0 */ ++ MTK_PIN_PUPD_SPEC_SR(101, 0xd40, 6, 5, 4), /* ms2 dat1 */ ++ MTK_PIN_PUPD_SPEC_SR(102, 0xd40, 10, 9, 8), /* ms2 dat2 */ ++ MTK_PIN_PUPD_SPEC_SR(103, 0xd40, 14, 13, 12), /* ms2 dat3 */ ++ MTK_PIN_PUPD_SPEC_SR(104, 0xc80, 2, 1, 0), /* ms2 clk */ ++ MTK_PIN_PUPD_SPEC_SR(105, 0xc90, 2, 1, 0), /* ms2 cmd */ ++ ++ MTK_PIN_PUPD_SPEC_SR(22, 0xd60, 2, 1, 0), /* ms3 dat0 */ ++ MTK_PIN_PUPD_SPEC_SR(23, 0xd60, 6, 5, 4), /* ms3 dat1 */ ++ MTK_PIN_PUPD_SPEC_SR(24, 0xd60, 10, 9, 8), /* ms3 dat2 */ ++ MTK_PIN_PUPD_SPEC_SR(25, 0xd60, 14, 13, 12), /* ms3 dat3 */ ++ MTK_PIN_PUPD_SPEC_SR(26, 0xcc0, 2, 1, 0), /* ms3 clk */ ++ MTK_PIN_PUPD_SPEC_SR(27, 0xcd0, 2, 1, 0) /* ms3 cmd */ + }; + -#define MTK_PIN_PUPD_SPEC(_pin, _offset, _pupd, _r1, _r0) \ - { \ - .pin = _pin, \ @@ -91,49 +130,8 @@ index 412ea84..cc44b27 100644 - MTK_PIN_PUPD_SPEC(25, 0xd60, 14, 13, 12), /* ms3 dat3 */ - MTK_PIN_PUPD_SPEC(26, 0xcc0, 2, 1, 0), /* ms3 clk */ - MTK_PIN_PUPD_SPEC(27, 0xcd0, 2, 1, 0) /* ms3 cmd */ -+static const struct mtk_pin_spec_pupd_set_samereg mt8173_spec_pupd[] = { -+ MTK_PIN_PUPD_SPEC_SR(119, 0xe00, 2, 1, 0), /* KROW0 */ -+ MTK_PIN_PUPD_SPEC_SR(120, 0xe00, 6, 5, 4), /* KROW1 */ -+ MTK_PIN_PUPD_SPEC_SR(121, 0xe00, 10, 9, 8), /* KROW2 */ -+ MTK_PIN_PUPD_SPEC_SR(122, 0xe10, 2, 1, 0), /* KCOL0 */ -+ MTK_PIN_PUPD_SPEC_SR(123, 0xe10, 6, 5, 4), /* KCOL1 */ -+ MTK_PIN_PUPD_SPEC_SR(124, 0xe10, 10, 9, 8), /* KCOL2 */ -+ -+ MTK_PIN_PUPD_SPEC_SR(67, 0xd10, 2, 1, 0), /* ms0 DS */ -+ MTK_PIN_PUPD_SPEC_SR(68, 0xd00, 2, 1, 0), /* ms0 RST */ -+ MTK_PIN_PUPD_SPEC_SR(66, 0xc10, 2, 1, 0), /* ms0 cmd */ -+ MTK_PIN_PUPD_SPEC_SR(65, 0xc00, 2, 1, 0), /* ms0 clk */ -+ MTK_PIN_PUPD_SPEC_SR(57, 0xc20, 2, 1, 0), /* ms0 data0 */ -+ MTK_PIN_PUPD_SPEC_SR(58, 0xc20, 2, 1, 0), /* ms0 data1 */ -+ MTK_PIN_PUPD_SPEC_SR(59, 0xc20, 2, 1, 0), /* ms0 data2 */ -+ MTK_PIN_PUPD_SPEC_SR(60, 0xc20, 2, 1, 0), /* ms0 data3 */ -+ MTK_PIN_PUPD_SPEC_SR(61, 0xc20, 2, 1, 0), /* ms0 data4 */ -+ MTK_PIN_PUPD_SPEC_SR(62, 0xc20, 2, 1, 0), /* ms0 data5 */ -+ MTK_PIN_PUPD_SPEC_SR(63, 0xc20, 2, 1, 0), /* ms0 data6 */ -+ MTK_PIN_PUPD_SPEC_SR(64, 0xc20, 2, 1, 0), /* ms0 data7 */ -+ -+ MTK_PIN_PUPD_SPEC_SR(78, 0xc50, 2, 1, 0), /* ms1 cmd */ -+ MTK_PIN_PUPD_SPEC_SR(73, 0xd20, 2, 1, 0), /* ms1 dat0 */ -+ MTK_PIN_PUPD_SPEC_SR(74, 0xd20, 6, 5, 4), /* ms1 dat1 */ -+ MTK_PIN_PUPD_SPEC_SR(75, 0xd20, 10, 9, 8), /* ms1 dat2 */ -+ MTK_PIN_PUPD_SPEC_SR(76, 0xd20, 14, 13, 12), /* ms1 dat3 */ -+ MTK_PIN_PUPD_SPEC_SR(77, 0xc40, 2, 1, 0), /* ms1 clk */ -+ -+ MTK_PIN_PUPD_SPEC_SR(100, 0xd40, 2, 1, 0), /* ms2 dat0 */ -+ MTK_PIN_PUPD_SPEC_SR(101, 0xd40, 6, 5, 4), /* ms2 dat1 */ -+ MTK_PIN_PUPD_SPEC_SR(102, 0xd40, 10, 9, 8), /* ms2 dat2 */ -+ MTK_PIN_PUPD_SPEC_SR(103, 0xd40, 14, 13, 12), /* ms2 dat3 */ -+ MTK_PIN_PUPD_SPEC_SR(104, 0xc80, 2, 1, 0), /* ms2 clk */ -+ MTK_PIN_PUPD_SPEC_SR(105, 0xc90, 2, 1, 0), /* ms2 cmd */ -+ -+ MTK_PIN_PUPD_SPEC_SR(22, 0xd60, 2, 1, 0), /* ms3 dat0 */ -+ MTK_PIN_PUPD_SPEC_SR(23, 0xd60, 6, 5, 4), /* ms3 dat1 */ -+ MTK_PIN_PUPD_SPEC_SR(24, 0xd60, 10, 9, 8), /* ms3 dat2 */ -+ MTK_PIN_PUPD_SPEC_SR(25, 0xd60, 14, 13, 12), /* ms3 dat3 */ -+ MTK_PIN_PUPD_SPEC_SR(26, 0xcc0, 2, 1, 0), /* ms3 clk */ -+ MTK_PIN_PUPD_SPEC_SR(27, 0xcd0, 2, 1, 0) /* ms3 cmd */ - }; - +-}; +- -static int spec_pull_set(struct regmap *regmap, unsigned int pin, +static int mt8173_spec_pull_set(struct regmap *regmap, unsigned int pin, unsigned char align, bool isup, unsigned int r1r0) @@ -196,7 +194,7 @@ index 412ea84..cc44b27 100644 } static const struct mtk_pin_ies_smt_set mt8173_ies_smt_set[] = { -@@ -382,7 +306,7 @@ static const struct mtk_pinctrl_devdata mt8173_pinctrl_data = { +@@ -382,7 +306,7 @@ static const struct mtk_pinctrl_devdata .n_grp_cls = ARRAY_SIZE(mt8173_drv_grp), .pin_drv_grp = mt8173_pin_drv, .n_pin_drv_grps = ARRAY_SIZE(mt8173_pin_drv), @@ -205,11 +203,9 @@ index 412ea84..cc44b27 100644 .spec_ies_smt_set = spec_ies_smt_set, .dir_offset = 0x0000, .pullen_offset = 0x0100, -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -index 474812e..0d51145 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -@@ -186,6 +186,66 @@ static int mtk_pconf_set_driving(struct mtk_pinctrl *pctl, +@@ -186,6 +186,66 @@ static int mtk_pconf_set_driving(struct return -EINVAL; } @@ -276,8 +272,6 @@ index 474812e..0d51145 100644 static int mtk_pconf_set_pull_select(struct mtk_pinctrl *pctl, unsigned int pin, bool enable, bool isup, unsigned int arg) { -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h -index 1508849..2a4b7be 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h @@ -117,6 +117,32 @@ struct mtk_pin_drv_grp { @@ -323,6 +317,3 @@ index 1508849..2a4b7be 100644 + unsigned char align, bool isup, unsigned int r1r0); + #endif /* __PINCTRL_MTK_COMMON_H */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0052-pinctrl-mediatek-add-ies-smt-control-to-common-code.patch b/target/linux/mediatek/patches/0052-pinctrl-mediatek-add-ies-smt-control-to-common-code.patch index 5467c216b8..7d77dc5931 100644 --- a/target/linux/mediatek/patches/0052-pinctrl-mediatek-add-ies-smt-control-to-common-code.patch +++ b/target/linux/mediatek/patches/0052-pinctrl-mediatek-add-ies-smt-control-to-common-code.patch @@ -19,8 +19,6 @@ Signed-off-by: Hongzhou Yang drivers/pinctrl/mediatek/pinctrl-mtk-common.h | 31 +++- 3 files changed, 198 insertions(+), 116 deletions(-) -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8173.c b/drivers/pinctrl/mediatek/pinctrl-mt8173.c -index cc44b27..a7e5b24 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt8173.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt8173.c @@ -18,6 +18,7 @@ @@ -60,7 +58,7 @@ index cc44b27..a7e5b24 100644 static const struct mtk_pin_spec_pupd_set_samereg mt8173_spec_pupd[] = { MTK_PIN_PUPD_SPEC_SR(119, 0xe00, 2, 1, 0), /* KROW0 */ MTK_PIN_PUPD_SPEC_SR(120, 0xe00, 6, 5, 4), /* KROW1 */ -@@ -97,80 +76,114 @@ static int mt8173_spec_pull_set(struct regmap *regmap, unsigned int pin, +@@ -97,80 +76,114 @@ static int mt8173_spec_pull_set(struct r ARRAY_SIZE(mt8173_spec_pupd), pin, align, isup, r1r0); } @@ -165,22 +163,6 @@ index cc44b27..a7e5b24 100644 -{ - unsigned int i, reg_addr, bit; - bool find = false; -- -- for (i = 0; i < ARRAY_SIZE(mt8173_ies_smt_set); i++) { -- if (pin >= mt8173_ies_smt_set[i].start && -- pin <= mt8173_ies_smt_set[i].end) { -- find = true; -- break; -- } -- } -- -- if (!find) -- return -EINVAL; -- -- if (value) -- reg_addr = mt8173_ies_smt_set[i].offset + align; -- else -- reg_addr = mt8173_ies_smt_set[i].offset + (align << 1); +static const struct mtk_pin_ies_smt_set mt8173_ies_set[] = { + MTK_PIN_IES_SMT_SPEC(0, 4, 0x900, 1), + MTK_PIN_IES_SMT_SPEC(5, 9, 0x900, 2), @@ -230,6 +212,22 @@ index cc44b27..a7e5b24 100644 + MTK_PIN_IES_SMT_SPEC(133, 134, 0x910, 8) +}; +- for (i = 0; i < ARRAY_SIZE(mt8173_ies_smt_set); i++) { +- if (pin >= mt8173_ies_smt_set[i].start && +- pin <= mt8173_ies_smt_set[i].end) { +- find = true; +- break; +- } +- } +- +- if (!find) +- return -EINVAL; +- +- if (value) +- reg_addr = mt8173_ies_smt_set[i].offset + align; +- else +- reg_addr = mt8173_ies_smt_set[i].offset + (align << 1); +- - bit = BIT(mt8173_ies_smt_set[i].bit); - regmap_write(regmap, reg_addr, bit); - return 0; @@ -246,7 +244,7 @@ index cc44b27..a7e5b24 100644 } static const struct mtk_drv_group_desc mt8173_drv_grp[] = { -@@ -307,7 +320,7 @@ static const struct mtk_pinctrl_devdata mt8173_pinctrl_data = { +@@ -307,7 +320,7 @@ static const struct mtk_pinctrl_devdata .pin_drv_grp = mt8173_pin_drv, .n_pin_drv_grps = ARRAY_SIZE(mt8173_pin_drv), .spec_pull_set = mt8173_spec_pull_set, @@ -255,11 +253,9 @@ index cc44b27..a7e5b24 100644 .dir_offset = 0x0000, .pullen_offset = 0x0100, .pullsel_offset = 0x0200, -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -index 0d51145..97fe2ab 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -@@ -107,28 +107,38 @@ static void mtk_gpio_set(struct gpio_chip *chip, unsigned offset, int value) +@@ -107,28 +107,38 @@ static void mtk_gpio_set(struct gpio_chi regmap_write(mtk_get_regmap(pctl, offset), reg_addr, bit); } @@ -308,7 +304,7 @@ index 0d51145..97fe2ab 100644 offset = pctl->devdata->ies_offset; else offset = pctl->devdata->smt_offset; -@@ -139,6 +149,33 @@ static void mtk_pconf_set_ies_smt(struct mtk_pinctrl *pctl, unsigned pin, +@@ -139,6 +149,33 @@ static void mtk_pconf_set_ies_smt(struct reg_addr = CLR_ADDR(mtk_get_port(pctl, pin) + offset, pctl); regmap_write(mtk_get_regmap(pctl, pin), reg_addr, bit); @@ -342,7 +338,7 @@ index 0d51145..97fe2ab 100644 } static const struct mtk_pin_drv_grp *mtk_find_pin_drv_grp_by_pin( -@@ -295,36 +332,37 @@ static int mtk_pconf_parse_conf(struct pinctrl_dev *pctldev, +@@ -295,36 +332,37 @@ static int mtk_pconf_parse_conf(struct p unsigned int pin, enum pin_config_param param, enum pin_config_param arg) { @@ -389,7 +385,7 @@ index 0d51145..97fe2ab 100644 } static int mtk_pconf_group_get(struct pinctrl_dev *pctldev, -@@ -343,12 +381,14 @@ static int mtk_pconf_group_set(struct pinctrl_dev *pctldev, unsigned group, +@@ -343,12 +381,14 @@ static int mtk_pconf_group_set(struct pi { struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); struct mtk_pinctrl_group *g = &pctl->groups[group]; @@ -406,8 +402,6 @@ index 0d51145..97fe2ab 100644 g->config = configs[i]; } -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h -index 2a4b7be..c703e7d 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h @@ -17,6 +17,7 @@ @@ -465,7 +459,7 @@ index 2a4b7be..c703e7d 100644 unsigned int dir_offset; unsigned int ies_offset; unsigned int smt_offset; -@@ -251,4 +276,8 @@ int mtk_pctrl_spec_pull_set_samereg(struct regmap *regmap, +@@ -251,4 +276,8 @@ int mtk_pctrl_spec_pull_set_samereg(stru unsigned int info_num, unsigned int pin, unsigned char align, bool isup, unsigned int r1r0); @@ -474,6 +468,3 @@ index 2a4b7be..c703e7d 100644 + unsigned int pin, unsigned char align, int value); + #endif /* __PINCTRL_MTK_COMMON_H */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0053-pinctrl-mediatek-Add-Pinctrl-GPIO-driver-for-mt6397.patch b/target/linux/mediatek/patches/0053-pinctrl-mediatek-Add-Pinctrl-GPIO-driver-for-mt6397.patch index 2813f407d5..aa0f4d30ce 100644 --- a/target/linux/mediatek/patches/0053-pinctrl-mediatek-Add-Pinctrl-GPIO-driver-for-mt6397.patch +++ b/target/linux/mediatek/patches/0053-pinctrl-mediatek-Add-Pinctrl-GPIO-driver-for-mt6397.patch @@ -26,8 +26,6 @@ Signed-off-by: Hongzhou Yang create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt6397.c create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt6397.h -diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig -index 6b3551c..ddae479 100644 --- a/drivers/pinctrl/mediatek/Kconfig +++ b/drivers/pinctrl/mediatek/Kconfig @@ -23,4 +23,10 @@ config PINCTRL_MT8173 @@ -41,18 +39,13 @@ index 6b3551c..ddae479 100644 + select PINCTRL_MTK_COMMON + endif -diff --git a/drivers/pinctrl/mediatek/Makefile b/drivers/pinctrl/mediatek/Makefile -index d8606a2..ad0180c 100644 --- a/drivers/pinctrl/mediatek/Makefile +++ b/drivers/pinctrl/mediatek/Makefile -@@ -4,3 +4,4 @@ obj-$(CONFIG_PINCTRL_MTK_COMMON) += pinctrl-mtk-common.o +@@ -4,3 +4,4 @@ obj-$(CONFIG_PINCTRL_MTK_COMMON) += pinc # SoC Drivers obj-$(CONFIG_PINCTRL_MT8135) += pinctrl-mt8135.o obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o +obj-$(CONFIG_PINCTRL_MT6397) += pinctrl-mt6397.o -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt6397.c b/drivers/pinctrl/mediatek/pinctrl-mt6397.c -new file mode 100644 -index 0000000..767bbdf --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mt6397.c @@ -0,0 +1,78 @@ @@ -134,11 +127,9 @@ index 0000000..767bbdf +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("MediaTek MT6397 Pinctrl Driver"); +MODULE_AUTHOR("Hongzhou Yang "); -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8135.c b/drivers/pinctrl/mediatek/pinctrl-mt8135.c -index 8e6abd5..203bd2a 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt8135.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt8135.c -@@ -342,7 +342,7 @@ static const struct mtk_pinctrl_devdata mt8135_pinctrl_data = { +@@ -342,7 +342,7 @@ static const struct mtk_pinctrl_devdata static int mt8135_pinctrl_probe(struct platform_device *pdev) { @@ -147,11 +138,9 @@ index 8e6abd5..203bd2a 100644 } static const struct of_device_id mt8135_pctrl_match[] = { -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8173.c b/drivers/pinctrl/mediatek/pinctrl-mt8173.c -index a7e5b24..cf4ed6e 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt8173.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt8173.c -@@ -361,7 +361,7 @@ static const struct mtk_pinctrl_devdata mt8173_pinctrl_data = { +@@ -361,7 +361,7 @@ static const struct mtk_pinctrl_devdata static int mt8173_pinctrl_probe(struct platform_device *pdev) { @@ -160,11 +149,9 @@ index a7e5b24..cf4ed6e 100644 } static const struct of_device_id mt8173_pctrl_match[] = { -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -index 97fe2ab..e772cef 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -@@ -1209,7 +1209,8 @@ static struct pinctrl_desc mtk_pctrl_desc = { +@@ -1209,7 +1209,8 @@ static struct pinctrl_desc mtk_pctrl_des }; int mtk_pctrl_init(struct platform_device *pdev, @@ -174,7 +161,7 @@ index 97fe2ab..e772cef 100644 { struct pinctrl_pin_desc *pins; struct mtk_pinctrl *pctl; -@@ -1235,6 +1236,11 @@ int mtk_pctrl_init(struct platform_device *pdev, +@@ -1235,6 +1236,11 @@ int mtk_pctrl_init(struct platform_devic pctl->regmap1 = syscon_node_to_regmap(node); if (IS_ERR(pctl->regmap1)) return PTR_ERR(pctl->regmap1); @@ -186,7 +173,7 @@ index 97fe2ab..e772cef 100644 } /* Only 8135 has two base addr, other SoCs have only one. */ -@@ -1280,7 +1286,7 @@ int mtk_pctrl_init(struct platform_device *pdev, +@@ -1280,7 +1286,7 @@ int mtk_pctrl_init(struct platform_devic pctl->chip->ngpio = pctl->devdata->npins; pctl->chip->label = dev_name(&pdev->dev); pctl->chip->dev = &pdev->dev; @@ -195,7 +182,7 @@ index 97fe2ab..e772cef 100644 ret = gpiochip_add(pctl->chip); if (ret) { -@@ -1296,6 +1302,9 @@ int mtk_pctrl_init(struct platform_device *pdev, +@@ -1296,6 +1302,9 @@ int mtk_pctrl_init(struct platform_devic goto chip_error; } @@ -205,8 +192,6 @@ index 97fe2ab..e772cef 100644 /* Get EINT register base from dts. */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h -index c703e7d..30213e5 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h @@ -269,7 +269,8 @@ struct mtk_pinctrl { @@ -219,9 +204,6 @@ index c703e7d..30213e5 100644 int mtk_pctrl_spec_pull_set_samereg(struct regmap *regmap, const struct mtk_pin_spec_pupd_set_samereg *pupd_infos, -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt6397.h b/drivers/pinctrl/mediatek/pinctrl-mtk-mt6397.h -new file mode 100644 -index 0000000..4eb98dd --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt6397.h @@ -0,0 +1,424 @@ @@ -649,6 +631,3 @@ index 0000000..4eb98dd +}; + +#endif /* __PINCTRL_MTK_MT6397_H */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0054-pinctrl-mediatek-add-pinctrl-GPIO-EINT-driver-for-mt.patch b/target/linux/mediatek/patches/0054-pinctrl-mediatek-add-pinctrl-GPIO-EINT-driver-for-mt.patch index 763037ceaa..412753e1a4 100644 --- a/target/linux/mediatek/patches/0054-pinctrl-mediatek-add-pinctrl-GPIO-EINT-driver-for-mt.patch +++ b/target/linux/mediatek/patches/0054-pinctrl-mediatek-add-pinctrl-GPIO-EINT-driver-for-mt.patch @@ -18,8 +18,6 @@ Signed-off-by: Hongzhou Yang create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt8127.c create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt8127.h -diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig -index ddae479..0bc84fb 100644 --- a/drivers/pinctrl/mediatek/Kconfig +++ b/drivers/pinctrl/mediatek/Kconfig @@ -15,6 +15,12 @@ config PINCTRL_MT8135 @@ -35,20 +33,15 @@ index ddae479..0bc84fb 100644 # For ARMv8 SoCs config PINCTRL_MT8173 bool "Mediatek MT8173 pin control" -diff --git a/drivers/pinctrl/mediatek/Makefile b/drivers/pinctrl/mediatek/Makefile -index ad0180c..eb923d6 100644 --- a/drivers/pinctrl/mediatek/Makefile +++ b/drivers/pinctrl/mediatek/Makefile -@@ -3,5 +3,6 @@ obj-$(CONFIG_PINCTRL_MTK_COMMON) += pinctrl-mtk-common.o +@@ -3,5 +3,6 @@ obj-$(CONFIG_PINCTRL_MTK_COMMON) += pinc # SoC Drivers obj-$(CONFIG_PINCTRL_MT8135) += pinctrl-mt8135.o +obj-$(CONFIG_PINCTRL_MT8127) += pinctrl-mt8127.o obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o obj-$(CONFIG_PINCTRL_MT6397) += pinctrl-mt6397.o -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8127.c b/drivers/pinctrl/mediatek/pinctrl-mt8127.c -new file mode 100644 -index 0000000..6a26cfa --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mt8127.c @@ -0,0 +1,359 @@ @@ -411,9 +404,6 @@ index 0000000..6a26cfa +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("MediaTek MT8127 Pinctrl Driver"); +MODULE_AUTHOR("Yingjoe Chen "); -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt8127.h b/drivers/pinctrl/mediatek/pinctrl-mtk-mt8127.h -new file mode 100644 -index 0000000..212559c --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt8127.h @@ -0,0 +1,1318 @@ @@ -1735,6 +1725,3 @@ index 0000000..212559c +}; + +#endif /* __PINCTRL_MTK_MT8127_H */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0055-mfd-mediatek-Add-GPIO-sub-module-support-into-mfd.patch b/target/linux/mediatek/patches/0055-mfd-mediatek-Add-GPIO-sub-module-support-into-mfd.patch index d9c0676c81..12a74f38af 100644 --- a/target/linux/mediatek/patches/0055-mfd-mediatek-Add-GPIO-sub-module-support-into-mfd.patch +++ b/target/linux/mediatek/patches/0055-mfd-mediatek-Add-GPIO-sub-module-support-into-mfd.patch @@ -11,11 +11,9 @@ Acked-by: Linus Walleij drivers/mfd/mt6397-core.c | 3 +++ 1 file changed, 3 insertions(+) -diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c -index 09bc780..012c620 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c -@@ -34,6 +34,9 @@ static const struct mfd_cell mt6397_devs[] = { +@@ -34,6 +34,9 @@ static const struct mfd_cell mt6397_devs }, { .name = "mt6397-clk", .of_compatible = "mediatek,mt6397-clk", @@ -25,6 +23,3 @@ index 09bc780..012c620 100644 }, }; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0056-ARM-dts-mt8127-add-pinctrl-GPIO-EINT-node-for-mt8127.patch b/target/linux/mediatek/patches/0056-ARM-dts-mt8127-add-pinctrl-GPIO-EINT-node-for-mt8127.patch index a59d2c609b..ad06400077 100644 --- a/target/linux/mediatek/patches/0056-ARM-dts-mt8127-add-pinctrl-GPIO-EINT-node-for-mt8127.patch +++ b/target/linux/mediatek/patches/0056-ARM-dts-mt8127-add-pinctrl-GPIO-EINT-node-for-mt8127.patch @@ -16,9 +16,6 @@ Acked-by: Matthias Brugger 2 files changed, 764 insertions(+) create mode 100644 arch/arm/boot/dts/mt8127-pinfunc.h -diff --git a/arch/arm/boot/dts/mt8127-pinfunc.h b/arch/arm/boot/dts/mt8127-pinfunc.h -new file mode 100644 -index 0000000..9198331 --- /dev/null +++ b/arch/arm/boot/dts/mt8127-pinfunc.h @@ -0,0 +1,742 @@ @@ -764,8 +761,6 @@ index 0000000..9198331 +#define MT8127_PIN_142_EINT21__FUNC_DBG_MON_B_32 (MTK_PIN_NO(142) | 7) + +#endif /* __DTS_MT8127_PINFUNC_H */ -diff --git a/arch/arm/boot/dts/mt8127.dtsi b/arch/arm/boot/dts/mt8127.dtsi -index 7c2090d..1d429ed 100644 --- a/arch/arm/boot/dts/mt8127.dtsi +++ b/arch/arm/boot/dts/mt8127.dtsi @@ -14,6 +14,7 @@ @@ -804,6 +799,3 @@ index 7c2090d..1d429ed 100644 timer: timer@10008000 { compatible = "mediatek,mt8127-timer", "mediatek,mt6577-timer"; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0057-thermal-oops.patch b/target/linux/mediatek/patches/0057-thermal-oops.patch index e7684f155d..cf5b278f4e 100644 --- a/target/linux/mediatek/patches/0057-thermal-oops.patch +++ b/target/linux/mediatek/patches/0057-thermal-oops.patch @@ -8,11 +8,9 @@ Signed-off-by: John Crispin drivers/thermal/mtk_thermal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c -index 27aab12..5fdcbf6 100644 --- a/drivers/thermal/mtk_thermal.c +++ b/drivers/thermal/mtk_thermal.c -@@ -394,7 +394,8 @@ static irqreturn_t mtk_thermal_irq(int irq, void *dev_id) +@@ -394,7 +394,8 @@ static irqreturn_t mtk_thermal_irq(int i for (i = 0; i < MT8173_NUM_BANKS; i++) { if (!(irqstat & (1 << i))) @@ -22,6 +20,3 @@ index 27aab12..5fdcbf6 100644 } return IRQ_HANDLED; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0058-dont-disable-clocks.patch b/target/linux/mediatek/patches/0058-dont-disable-clocks.patch index e30d5dc1aa..f5a97d2902 100644 --- a/target/linux/mediatek/patches/0058-dont-disable-clocks.patch +++ b/target/linux/mediatek/patches/0058-dont-disable-clocks.patch @@ -7,11 +7,9 @@ Subject: [PATCH 58/76] dont disable clocks drivers/clk/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c -index 5b0f418..360e6e4 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -541,7 +541,7 @@ unlock_out: +@@ -542,7 +542,7 @@ unlock_out: clk_enable_unlock(flags); } @@ -20,6 +18,3 @@ index 5b0f418..360e6e4 100644 static int __init clk_ignore_unused_setup(char *__unused) { clk_ignore_unused = true; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0059-arm-mediatek-basic-mt6323-pmic-support.patch b/target/linux/mediatek/patches/0059-arm-mediatek-basic-mt6323-pmic-support.patch index ca28251d2a..cb321f9931 100644 --- a/target/linux/mediatek/patches/0059-arm-mediatek-basic-mt6323-pmic-support.patch +++ b/target/linux/mediatek/patches/0059-arm-mediatek-basic-mt6323-pmic-support.patch @@ -19,8 +19,6 @@ Signed-off-by: John Crispin create mode 100644 include/linux/mfd/mt6323/core.h create mode 100644 include/linux/mfd/mt6323/registers.h -diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig -index d5ad04d..ff2c14e 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -529,6 +529,16 @@ config MFD_MAX8998 @@ -40,8 +38,6 @@ index d5ad04d..ff2c14e 100644 config MFD_MT6397 tristate "MediaTek MT6397 PMIC Support" select MFD_CORE -diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile -index 0e5cfeb..6e91123 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -184,4 +184,5 @@ obj-$(CONFIG_MFD_SKY81452) += sky81452.o @@ -50,9 +46,6 @@ index 0e5cfeb..6e91123 100644 obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o +obj-$(CONFIG_MFD_MT6323) += mt6323-core.o obj-$(CONFIG_MFD_MT6397) += mt6397-core.o -diff --git a/drivers/mfd/mt6323-core.c b/drivers/mfd/mt6323-core.c -new file mode 100644 -index 0000000..012c620 --- /dev/null +++ b/drivers/mfd/mt6323-core.c @@ -0,0 +1,230 @@ @@ -286,8 +279,6 @@ index 0000000..012c620 +MODULE_DESCRIPTION("Driver for MediaTek MT6397 PMIC"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:mt6397"); -diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig -index a6f116a..336d4c6 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -441,6 +441,15 @@ config REGULATOR_MC13892 @@ -306,11 +297,9 @@ index a6f116a..336d4c6 100644 config REGULATOR_MT6397 tristate "MediaTek MT6397 PMIC" depends on MFD_MT6397 -diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile -index 2c4da15..ac6a9da 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile -@@ -59,6 +59,7 @@ obj-$(CONFIG_REGULATOR_MAX77843) += max77843.o +@@ -59,6 +59,7 @@ obj-$(CONFIG_REGULATOR_MAX77843) += max7 obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o @@ -318,9 +307,6 @@ index 2c4da15..ac6a9da 100644 obj-$(CONFIG_REGULATOR_MT6397) += mt6397-regulator.o obj-$(CONFIG_REGULATOR_QCOM_RPM) += qcom_rpm-regulator.o obj-$(CONFIG_REGULATOR_PALMAS) += palmas-regulator.o -diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c -new file mode 100644 -index 0000000..a5b2f47 --- /dev/null +++ b/drivers/regulator/mt6323-regulator.c @@ -0,0 +1,332 @@ @@ -656,9 +642,6 @@ index 0000000..a5b2f47 +MODULE_DESCRIPTION("Regulator Driver for MediaTek MT6397 PMIC"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:mt6397-regulator"); -diff --git a/include/linux/mfd/mt6323/core.h b/include/linux/mfd/mt6323/core.h -new file mode 100644 -index 0000000..cf5265b --- /dev/null +++ b/include/linux/mfd/mt6323/core.h @@ -0,0 +1,64 @@ @@ -726,9 +709,6 @@ index 0000000..cf5265b +}; + +#endif /* __MFD_MT6397_CORE_H__ */ -diff --git a/include/linux/mfd/mt6323/registers.h b/include/linux/mfd/mt6323/registers.h -new file mode 100644 -index 0000000..f23a0a6 --- /dev/null +++ b/include/linux/mfd/mt6323/registers.h @@ -0,0 +1,362 @@ @@ -1094,6 +1074,3 @@ index 0000000..f23a0a6 +#define MT6397_NCP_CLKDIV_CON1 0x0746 + +#endif /* __MFD_MT6397_REGISTERS_H__ */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0060-arm-mediatek-select-the-arm-timer-by-default.patch b/target/linux/mediatek/patches/0060-arm-mediatek-select-the-arm-timer-by-default.patch index 2b6418613d..d0f3719163 100644 --- a/target/linux/mediatek/patches/0060-arm-mediatek-select-the-arm-timer-by-default.patch +++ b/target/linux/mediatek/patches/0060-arm-mediatek-select-the-arm-timer-by-default.patch @@ -10,8 +10,6 @@ Signed-off-by: John Crispin arch/arm/mach-mediatek/Kconfig | 1 + 1 file changed, 1 insertion(+) -diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig -index 9f59e58..7704818 100644 --- a/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig @@ -1,5 +1,6 @@ @@ -21,6 +19,3 @@ index 9f59e58..7704818 100644 select ARM_GIC select PINCTRL select MTK_TIMER --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0061-arm-mediatek-add-mt7623-clock.patch b/target/linux/mediatek/patches/0061-arm-mediatek-add-mt7623-clock.patch index f12ebb14cf..b3ae96ea4a 100644 --- a/target/linux/mediatek/patches/0061-arm-mediatek-add-mt7623-clock.patch +++ b/target/linux/mediatek/patches/0061-arm-mediatek-add-mt7623-clock.patch @@ -12,8 +12,6 @@ Signed-off-by: John Crispin create mode 100644 drivers/clk/mediatek/clk-mt7623.c create mode 100644 include/dt-bindings/clock/mt7623-clk.h -diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile -index 8e4b2a4..19a3763 100644 --- a/drivers/clk/mediatek/Makefile +++ b/drivers/clk/mediatek/Makefile @@ -1,4 +1,5 @@ @@ -22,9 +20,6 @@ index 8e4b2a4..19a3763 100644 +obj-y += clk-mt7623.o obj-y += clk-mt8135.o obj-y += clk-mt8173.o -diff --git a/drivers/clk/mediatek/clk-mt7623.c b/drivers/clk/mediatek/clk-mt7623.c -new file mode 100644 -index 0000000..07843bb --- /dev/null +++ b/drivers/clk/mediatek/clk-mt7623.c @@ -0,0 +1,634 @@ @@ -662,9 +657,6 @@ index 0000000..07843bb +} +CLK_OF_DECLARE(mtk_apmixedsys, "mediatek,mt7623-apmixedsys", + mtk_apmixedsys_init); -diff --git a/include/dt-bindings/clock/mt7623-clk.h b/include/dt-bindings/clock/mt7623-clk.h -new file mode 100644 -index 0000000..cb1e8a9 --- /dev/null +++ b/include/dt-bindings/clock/mt7623-clk.h @@ -0,0 +1,173 @@ @@ -841,6 +833,3 @@ index 0000000..cb1e8a9 + +#endif /* _DT_BINDINGS_CLK_MT7623_H */ + --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0062-arm-mediatek-add-mt7623-pinctrl-supoort.patch b/target/linux/mediatek/patches/0062-arm-mediatek-add-mt7623-pinctrl-supoort.patch index c9ea40eac9..63617c0599 100644 --- a/target/linux/mediatek/patches/0062-arm-mediatek-add-mt7623-pinctrl-supoort.patch +++ b/target/linux/mediatek/patches/0062-arm-mediatek-add-mt7623-pinctrl-supoort.patch @@ -15,8 +15,6 @@ Signed-off-by: John Crispin create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt7623.h create mode 100644 include/dt-bindings/pinctrl/mt7623-pinfunc.h -diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig -index 0bc84fb..27c5673 100644 --- a/drivers/pinctrl/mediatek/Kconfig +++ b/drivers/pinctrl/mediatek/Kconfig @@ -9,6 +9,12 @@ config PINCTRL_MTK_COMMON @@ -32,8 +30,6 @@ index 0bc84fb..27c5673 100644 config PINCTRL_MT8135 bool "Mediatek MT8135 pin control" if COMPILE_TEST && !MACH_MT8135 depends on OF -diff --git a/drivers/pinctrl/mediatek/Makefile b/drivers/pinctrl/mediatek/Makefile -index eb923d6..8998433 100644 --- a/drivers/pinctrl/mediatek/Makefile +++ b/drivers/pinctrl/mediatek/Makefile @@ -2,6 +2,7 @@ @@ -44,9 +40,6 @@ index eb923d6..8998433 100644 obj-$(CONFIG_PINCTRL_MT8135) += pinctrl-mt8135.o obj-$(CONFIG_PINCTRL_MT8127) += pinctrl-mt8127.o obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7623.c b/drivers/pinctrl/mediatek/pinctrl-mt7623.c -new file mode 100644 -index 0000000..77e1a66 --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mt7623.c @@ -0,0 +1,368 @@ @@ -418,9 +411,6 @@ index 0000000..77e1a66 +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("MediaTek Pinctrl Driver"); +MODULE_AUTHOR("John Crispin "); -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt7623.h b/drivers/pinctrl/mediatek/pinctrl-mtk-mt7623.h -new file mode 100644 -index 0000000..4b65668 --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt7623.h @@ -0,0 +1,1926 @@ @@ -2351,9 +2341,6 @@ index 0000000..4b65668 + +#endif /* __PINCTRL_MTK_MT7623_H */ \ No newline at end of file -diff --git a/include/dt-bindings/pinctrl/mt7623-pinfunc.h b/include/dt-bindings/pinctrl/mt7623-pinfunc.h -new file mode 100644 -index 0000000..826835c --- /dev/null +++ b/include/dt-bindings/pinctrl/mt7623-pinfunc.h @@ -0,0 +1,526 @@ @@ -2884,6 +2871,3 @@ index 0000000..826835c + +#endif /* __DTS_MT7623_PINFUNC_H */ \ No newline at end of file --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0063-arm-mediatek-add-SDK-ethernet.patch b/target/linux/mediatek/patches/0063-arm-mediatek-add-SDK-ethernet.patch index 7263bb2181..a9f8b3bb8e 100644 --- a/target/linux/mediatek/patches/0063-arm-mediatek-add-SDK-ethernet.patch +++ b/target/linux/mediatek/patches/0063-arm-mediatek-add-SDK-ethernet.patch @@ -75,8 +75,6 @@ Signed-off-by: John Crispin create mode 100644 drivers/net/ethernet/raeth/smb_nf.c create mode 100644 drivers/net/ethernet/raeth/sync_write.h -diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig -index eadcb05..627e1d4 100644 --- a/drivers/net/ethernet/Kconfig +++ b/drivers/net/ethernet/Kconfig @@ -17,6 +17,7 @@ config MDIO @@ -87,8 +85,6 @@ index eadcb05..627e1d4 100644 source "drivers/net/ethernet/3com/Kconfig" source "drivers/net/ethernet/adaptec/Kconfig" source "drivers/net/ethernet/aeroflex/Kconfig" -diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile -index 1367afc..abdd636 100644 --- a/drivers/net/ethernet/Makefile +++ b/drivers/net/ethernet/Makefile @@ -84,3 +84,4 @@ obj-$(CONFIG_NET_VENDOR_VIA) += via/ @@ -96,9 +92,6 @@ index 1367afc..abdd636 100644 obj-$(CONFIG_NET_VENDOR_XILINX) += xilinx/ obj-$(CONFIG_NET_VENDOR_XIRCOM) += xircom/ +obj-$(CONFIG_RAETH) += raeth/ -diff --git a/drivers/net/ethernet/raeth/Kconfig b/drivers/net/ethernet/raeth/Kconfig -new file mode 100644 -index 0000000..c252c85 --- /dev/null +++ b/drivers/net/ethernet/raeth/Kconfig @@ -0,0 +1,415 @@ @@ -517,9 +510,6 @@ index 0000000..c252c85 +config 100PHY +bool +default y if GE1_MII_AN || GE2_MII_AN -diff --git a/drivers/net/ethernet/raeth/Makefile b/drivers/net/ethernet/raeth/Makefile -new file mode 100644 -index 0000000..563af05 --- /dev/null +++ b/drivers/net/ethernet/raeth/Makefile @@ -0,0 +1,67 @@ @@ -590,9 +580,6 @@ index 0000000..563af05 +ifeq ($(CONFIG_TASKLET_WORKQUEUE_SW),y) +EXTRA_CFLAGS += -DTASKLET_WORKQUEUE_SW +endif -diff --git a/drivers/net/ethernet/raeth/Makefile.release b/drivers/net/ethernet/raeth/Makefile.release -new file mode 100644 -index 0000000..ecdeeda --- /dev/null +++ b/drivers/net/ethernet/raeth/Makefile.release @@ -0,0 +1,60 @@ @@ -656,9 +643,6 @@ index 0000000..ecdeeda +ifeq ($(CONFIG_TASKLET_WORKQUEUE_SW),y) +EXTRA_CFLAGS += -DTASKLET_WORKQUEUE_SW +endif -diff --git a/drivers/net/ethernet/raeth/csr_netlink.h b/drivers/net/ethernet/raeth/csr_netlink.h -new file mode 100644 -index 0000000..add7745 --- /dev/null +++ b/drivers/net/ethernet/raeth/csr_netlink.h @@ -0,0 +1,27 @@ @@ -689,9 +673,6 @@ index 0000000..add7745 +// static CSR_MSG input_csr_msg; + +#endif -diff --git a/drivers/net/ethernet/raeth/dvt/pkt_gen.c b/drivers/net/ethernet/raeth/dvt/pkt_gen.c -new file mode 100755 -index 0000000..b351b21 --- /dev/null +++ b/drivers/net/ethernet/raeth/dvt/pkt_gen.c @@ -0,0 +1,88 @@ @@ -783,9 +764,6 @@ index 0000000..b351b21 +MODULE_LICENSE("Proprietary"); +MODULE_PARM_DESC (ifname, "interface name"); + -diff --git a/drivers/net/ethernet/raeth/dvt/pkt_gen_tcp_frag.c b/drivers/net/ethernet/raeth/dvt/pkt_gen_tcp_frag.c -new file mode 100755 -index 0000000..e78c65a --- /dev/null +++ b/drivers/net/ethernet/raeth/dvt/pkt_gen_tcp_frag.c @@ -0,0 +1,138 @@ @@ -927,9 +905,6 @@ index 0000000..e78c65a +MODULE_LICENSE("Proprietary"); +MODULE_PARM_DESC (ifname, "interface name"); + -diff --git a/drivers/net/ethernet/raeth/dvt/pkt_gen_udp_frag.c b/drivers/net/ethernet/raeth/dvt/pkt_gen_udp_frag.c -new file mode 100755 -index 0000000..917e7ad --- /dev/null +++ b/drivers/net/ethernet/raeth/dvt/pkt_gen_udp_frag.c @@ -0,0 +1,191 @@ @@ -1124,9 +1099,6 @@ index 0000000..917e7ad +MODULE_LICENSE("Proprietary"); +MODULE_PARM_DESC (ifname, "interface name"); + -diff --git a/drivers/net/ethernet/raeth/dvt/raether_pdma_dvt.c b/drivers/net/ethernet/raeth/dvt/raether_pdma_dvt.c -new file mode 100755 -index 0000000..971a821 --- /dev/null +++ b/drivers/net/ethernet/raeth/dvt/raether_pdma_dvt.c @@ -0,0 +1,1527 @@ @@ -2657,9 +2629,6 @@ index 0000000..971a821 +#endif /* CONFIG_RAETH_PDMA_DVT */ +} + -diff --git a/drivers/net/ethernet/raeth/dvt/raether_pdma_dvt.h b/drivers/net/ethernet/raeth/dvt/raether_pdma_dvt.h -new file mode 100755 -index 0000000..600aab7 --- /dev/null +++ b/drivers/net/ethernet/raeth/dvt/raether_pdma_dvt.h @@ -0,0 +1,75 @@ @@ -2738,9 +2707,6 @@ index 0000000..600aab7 +void raeth_pdma_lro_dly_int_dvt(void); +void pdma_dvt_set_dma_mode(void); + -diff --git a/drivers/net/ethernet/raeth/ethtool_readme.txt b/drivers/net/ethernet/raeth/ethtool_readme.txt -new file mode 100644 -index 0000000..10e918b --- /dev/null +++ b/drivers/net/ethernet/raeth/ethtool_readme.txt @@ -0,0 +1,44 @@ @@ -2788,9 +2754,6 @@ index 0000000..10e918b +# ethtool eth2 + + -diff --git a/drivers/net/ethernet/raeth/mcast.c b/drivers/net/ethernet/raeth/mcast.c -new file mode 100644 -index 0000000..d796b03 --- /dev/null +++ b/drivers/net/ethernet/raeth/mcast.c @@ -0,0 +1,187 @@ @@ -2981,9 +2944,6 @@ index 0000000..d796b03 + return 1; +} + -diff --git a/drivers/net/ethernet/raeth/mii_mgr.c b/drivers/net/ethernet/raeth/mii_mgr.c -new file mode 100644 -index 0000000..77a47f1 --- /dev/null +++ b/drivers/net/ethernet/raeth/mii_mgr.c @@ -0,0 +1,603 @@ @@ -3590,9 +3550,6 @@ index 0000000..77a47f1 + +EXPORT_SYMBOL(mii_mgr_write); +EXPORT_SYMBOL(mii_mgr_read); -diff --git a/drivers/net/ethernet/raeth/ra2882ethreg.h b/drivers/net/ethernet/raeth/ra2882ethreg.h -new file mode 100644 -index 0000000..c67a042 --- /dev/null +++ b/drivers/net/ethernet/raeth/ra2882ethreg.h @@ -0,0 +1,1985 @@ @@ -5581,9 +5538,6 @@ index 0000000..c67a042 +#define RAETH_TX_DLY_INT TX_DLY_INT +#define RAETH_TX_DONE_INT0 TX_DONE_INT0 +#define RAETH_DLY_INT_CFG DLY_INT_CFG -diff --git a/drivers/net/ethernet/raeth/ra_ethtool.c b/drivers/net/ethernet/raeth/ra_ethtool.c -new file mode 100644 -index 0000000..ff13e59 --- /dev/null +++ b/drivers/net/ethernet/raeth/ra_ethtool.c @@ -0,0 +1,515 @@ @@ -6102,9 +6056,6 @@ index 0000000..ff13e59 +#endif /* CONFIG_PSEUDO_SUPPORT */ + + -diff --git a/drivers/net/ethernet/raeth/ra_ethtool.h b/drivers/net/ethernet/raeth/ra_ethtool.h -new file mode 100644 -index 0000000..d64a1ab --- /dev/null +++ b/drivers/net/ethernet/raeth/ra_ethtool.h @@ -0,0 +1,13 @@ @@ -6121,9 +6072,6 @@ index 0000000..d64a1ab +void mdio_virt_write(struct net_device *dev, int phy_id, int location, int value); + +#endif -diff --git a/drivers/net/ethernet/raeth/ra_ioctl.h b/drivers/net/ethernet/raeth/ra_ioctl.h -new file mode 100644 -index 0000000..83b806a --- /dev/null +++ b/drivers/net/ethernet/raeth/ra_ioctl.h @@ -0,0 +1,102 @@ @@ -6229,9 +6177,6 @@ index 0000000..83b806a + + +#endif -diff --git a/drivers/net/ethernet/raeth/ra_mac.c b/drivers/net/ethernet/raeth/ra_mac.c -new file mode 100644 -index 0000000..e8e978d --- /dev/null +++ b/drivers/net/ethernet/raeth/ra_mac.c @@ -0,0 +1,2645 @@ @@ -8880,9 +8825,6 @@ index 0000000..e8e978d + printk(KERN_ALERT "proc exit\n"); +} +EXPORT_SYMBOL(procRegDir); -diff --git a/drivers/net/ethernet/raeth/ra_mac.h b/drivers/net/ethernet/raeth/ra_mac.h -new file mode 100644 -index 0000000..66b32d3 --- /dev/null +++ b/drivers/net/ethernet/raeth/ra_mac.h @@ -0,0 +1,57 @@ @@ -8943,9 +8885,6 @@ index 0000000..66b32d3 +typedef int (*PDMA_DBG_FUNC)(int par1, int par2); +#endif //#if defined(CONFIG_RAETH_PDMA_DVT) +#endif -diff --git a/drivers/net/ethernet/raeth/ra_netlink.c b/drivers/net/ethernet/raeth/ra_netlink.c -new file mode 100644 -index 0000000..f7c3650 --- /dev/null +++ b/drivers/net/ethernet/raeth/ra_netlink.c @@ -0,0 +1,142 @@ @@ -9091,9 +9030,6 @@ index 0000000..f7c3650 + printk("Netlink end...\n"); + } +} -diff --git a/drivers/net/ethernet/raeth/ra_netlink.h b/drivers/net/ethernet/raeth/ra_netlink.h -new file mode 100644 -index 0000000..19ca71f --- /dev/null +++ b/drivers/net/ethernet/raeth/ra_netlink.h @@ -0,0 +1,10 @@ @@ -9107,9 +9043,6 @@ index 0000000..19ca71f +void csr_netlink_end(void); + +#endif -diff --git a/drivers/net/ethernet/raeth/ra_qos.c b/drivers/net/ethernet/raeth/ra_qos.c -new file mode 100644 -index 0000000..0a7d9c5 --- /dev/null +++ b/drivers/net/ethernet/raeth/ra_qos.c @@ -0,0 +1,655 @@ @@ -9768,9 +9701,6 @@ index 0000000..0a7d9c5 + (GDMA2_TOKEN_RATE << 0); /* token rate (unit=8B/ms) */ +#endif +} -diff --git a/drivers/net/ethernet/raeth/ra_qos.h b/drivers/net/ethernet/raeth/ra_qos.h -new file mode 100644 -index 0000000..7f2a8a1 --- /dev/null +++ b/drivers/net/ethernet/raeth/ra_qos.h @@ -0,0 +1,18 @@ @@ -9792,9 +9722,6 @@ index 0000000..7f2a8a1 +void set_scheduler_weight(void); +void set_output_shaper(void); +#endif -diff --git a/drivers/net/ethernet/raeth/ra_rfrw.c b/drivers/net/ethernet/raeth/ra_rfrw.c -new file mode 100644 -index 0000000..d73db01 --- /dev/null +++ b/drivers/net/ethernet/raeth/ra_rfrw.c @@ -0,0 +1,66 @@ @@ -9864,9 +9791,6 @@ index 0000000..d73db01 + return 0; +} + -diff --git a/drivers/net/ethernet/raeth/ra_rfrw.h b/drivers/net/ethernet/raeth/ra_rfrw.h -new file mode 100644 -index 0000000..da5a371 --- /dev/null +++ b/drivers/net/ethernet/raeth/ra_rfrw.h @@ -0,0 +1,6 @@ @@ -9876,9 +9800,6 @@ index 0000000..da5a371 +int rw_rf_reg(int write, int reg, int *data); + +#endif -diff --git a/drivers/net/ethernet/raeth/raether.c b/drivers/net/ethernet/raeth/raether.c -new file mode 100644 -index 0000000..328285a --- /dev/null +++ b/drivers/net/ethernet/raeth/raether.c @@ -0,0 +1,6401 @@ @@ -16283,9 +16204,6 @@ index 0000000..328285a + + +MODULE_LICENSE("GPL"); -diff --git a/drivers/net/ethernet/raeth/raether.h b/drivers/net/ethernet/raeth/raether.h -new file mode 100644 -index 0000000..7a97109 --- /dev/null +++ b/drivers/net/ethernet/raeth/raether.h @@ -0,0 +1,126 @@ @@ -16415,9 +16333,6 @@ index 0000000..7a97109 +void fe_sw_init(void); + +#endif -diff --git a/drivers/net/ethernet/raeth/raether_hwlro.c b/drivers/net/ethernet/raeth/raether_hwlro.c -new file mode 100755 -index 0000000..5fc4f36 --- /dev/null +++ b/drivers/net/ethernet/raeth/raether_hwlro.c @@ -0,0 +1,347 @@ @@ -16768,9 +16683,6 @@ index 0000000..5fc4f36 +} +EXPORT_SYMBOL(fe_hw_lro_init); + -diff --git a/drivers/net/ethernet/raeth/raether_pdma.c b/drivers/net/ethernet/raeth/raether_pdma.c -new file mode 100755 -index 0000000..4d47ee2 --- /dev/null +++ b/drivers/net/ethernet/raeth/raether_pdma.c @@ -0,0 +1,1121 @@ @@ -17895,9 +17807,6 @@ index 0000000..4d47ee2 +EXPORT_SYMBOL(ei_xmit_housekeeping); +EXPORT_SYMBOL(fe_dma_init); +EXPORT_SYMBOL(rt2880_eth_send); -diff --git a/drivers/net/ethernet/raeth/raether_qdma.c b/drivers/net/ethernet/raeth/raether_qdma.c -new file mode 100644 -index 0000000..acf8bfe --- /dev/null +++ b/drivers/net/ethernet/raeth/raether_qdma.c @@ -0,0 +1,1407 @@ @@ -19308,9 +19217,6 @@ index 0000000..acf8bfe +EXPORT_SYMBOL(ei_xmit_housekeeping); +EXPORT_SYMBOL(fe_dma_init); +EXPORT_SYMBOL(rt2880_eth_send); -diff --git a/drivers/net/ethernet/raeth/raether_qdma_mt7623.c b/drivers/net/ethernet/raeth/raether_qdma_mt7623.c -new file mode 100644 -index 0000000..b465b75 --- /dev/null +++ b/drivers/net/ethernet/raeth/raether_qdma_mt7623.c @@ -0,0 +1,1020 @@ @@ -20334,9 +20240,6 @@ index 0000000..b465b75 +EXPORT_SYMBOL(ei_xmit_housekeeping); +EXPORT_SYMBOL(fe_dma_init); +EXPORT_SYMBOL(rt2880_eth_send); -diff --git a/drivers/net/ethernet/raeth/smb_hook.c b/drivers/net/ethernet/raeth/smb_hook.c -new file mode 100644 -index 0000000..617139c --- /dev/null +++ b/drivers/net/ethernet/raeth/smb_hook.c @@ -0,0 +1,17 @@ @@ -20357,9 +20260,6 @@ index 0000000..617139c +EXPORT_SYMBOL(smb_nf_post_routing_hook); + + -diff --git a/drivers/net/ethernet/raeth/smb_nf.c b/drivers/net/ethernet/raeth/smb_nf.c -new file mode 100644 -index 0000000..86250eb --- /dev/null +++ b/drivers/net/ethernet/raeth/smb_nf.c @@ -0,0 +1,177 @@ @@ -20540,9 +20440,6 @@ index 0000000..86250eb +module_exit(mtk_smb_hook_cleanup); + +MODULE_LICENSE("GPL"); -diff --git a/drivers/net/ethernet/raeth/sync_write.h b/drivers/net/ethernet/raeth/sync_write.h -new file mode 100644 -index 0000000..8b800e6 --- /dev/null +++ b/drivers/net/ethernet/raeth/sync_write.h @@ -0,0 +1,103 @@ @@ -20649,6 +20546,3 @@ index 0000000..8b800e6 +#endif /* __KERNEL__ */ + +#endif /* !_MT_SYNC_WRITE_H */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0064-arm-mediatek-add-mt7623-pcie-support.patch b/target/linux/mediatek/patches/0064-arm-mediatek-add-mt7623-pcie-support.patch index ee82f9c9d7..e08767310b 100644 --- a/target/linux/mediatek/patches/0064-arm-mediatek-add-mt7623-pcie-support.patch +++ b/target/linux/mediatek/patches/0064-arm-mediatek-add-mt7623-pcie-support.patch @@ -12,8 +12,6 @@ Signed-off-by: John Crispin create mode 100644 arch/arm/mach-mediatek/pcie.c create mode 100644 arch/arm/mach-mediatek/pcie.h -diff --git a/arch/arm/mach-mediatek/Makefile b/arch/arm/mach-mediatek/Makefile -index 2116460..aca28a2 100644 --- a/arch/arm/mach-mediatek/Makefile +++ b/arch/arm/mach-mediatek/Makefile @@ -1,4 +1,4 @@ @@ -22,9 +20,6 @@ index 2116460..aca28a2 100644 endif -obj-$(CONFIG_ARCH_MEDIATEK) += mediatek.o +obj-$(CONFIG_ARCH_MEDIATEK) += mediatek.o pcie.o -diff --git a/arch/arm/mach-mediatek/pcie.c b/arch/arm/mach-mediatek/pcie.c -new file mode 100644 -index 0000000..8394712 --- /dev/null +++ b/arch/arm/mach-mediatek/pcie.c @@ -0,0 +1,383 @@ @@ -411,9 +406,6 @@ index 0000000..8394712 +} + +late_initcall(mtk_pcie_init); -diff --git a/arch/arm/mach-mediatek/pcie.h b/arch/arm/mach-mediatek/pcie.h -new file mode 100644 -index 0000000..400a760e --- /dev/null +++ b/arch/arm/mach-mediatek/pcie.h @@ -0,0 +1,14 @@ @@ -431,6 +423,3 @@ index 0000000..400a760e + + + --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0065-arm-mediatek-add-mt7623-smp-support.patch b/target/linux/mediatek/patches/0065-arm-mediatek-add-mt7623-smp-support.patch index 98f8acb63c..01e9580f8b 100644 --- a/target/linux/mediatek/patches/0065-arm-mediatek-add-mt7623-smp-support.patch +++ b/target/linux/mediatek/patches/0065-arm-mediatek-add-mt7623-smp-support.patch @@ -8,11 +8,9 @@ Signed-off-by: John Crispin arch/arm/mach-mediatek/platsmp.c | 7 +++++++ 1 file changed, 7 insertions(+) -diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c -index e266b3d..81fdcff 100644 --- a/arch/arm/mach-mediatek/platsmp.c +++ b/arch/arm/mach-mediatek/platsmp.c -@@ -45,6 +45,12 @@ static const struct mtk_smp_boot_info mtk_mt6589_boot = { +@@ -45,6 +45,12 @@ static const struct mtk_smp_boot_info mt { 0x38, 0x3c, 0x40 }, }; @@ -25,7 +23,7 @@ index e266b3d..81fdcff 100644 static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = { { .compatible = "mediatek,mt8135", .data = &mtk_mt8135_tz_boot }, { .compatible = "mediatek,mt8127", .data = &mtk_mt8135_tz_boot }, -@@ -52,6 +58,7 @@ static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = { +@@ -52,6 +58,7 @@ static const struct of_device_id mtk_tz_ static const struct of_device_id mtk_smp_boot_infos[] __initconst = { { .compatible = "mediatek,mt6589", .data = &mtk_mt6589_boot }, @@ -33,6 +31,3 @@ index e266b3d..81fdcff 100644 }; static void __iomem *mtk_smp_base; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0066-arm-mediatek-add-m7623-devicetree.patch b/target/linux/mediatek/patches/0066-arm-mediatek-add-m7623-devicetree.patch index 4516561b3f..50e75d9863 100644 --- a/target/linux/mediatek/patches/0066-arm-mediatek-add-m7623-devicetree.patch +++ b/target/linux/mediatek/patches/0066-arm-mediatek-add-m7623-devicetree.patch @@ -12,8 +12,6 @@ Signed-off-by: John Crispin create mode 100644 arch/arm/boot/dts/mt7623-evb.dts create mode 100644 arch/arm/boot/dts/mt7623.dtsi -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 992736b..525392e 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -658,6 +658,7 @@ dtb-$(CONFIG_MACH_DOVE) += \ @@ -24,9 +22,6 @@ index 992736b..525392e 100644 mt8127-moose.dtb \ mt8135-evbp1.dtb endif -diff --git a/arch/arm/boot/dts/mt7623-evb.dts b/arch/arm/boot/dts/mt7623-evb.dts -new file mode 100644 -index 0000000..759142f --- /dev/null +++ b/arch/arm/boot/dts/mt7623-evb.dts @@ -0,0 +1,162 @@ @@ -192,9 +187,6 @@ index 0000000..759142f + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pcie_default>; +}; -diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi -new file mode 100644 -index 0000000..ba74ed9 --- /dev/null +++ b/arch/arm/boot/dts/mt7623.dtsi @@ -0,0 +1,348 @@ @@ -546,6 +538,3 @@ index 0000000..ba74ed9 + status = "disabled"; + }; +}; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0067-arm-mediatek-add-mt7623-support.patch b/target/linux/mediatek/patches/0067-arm-mediatek-add-mt7623-support.patch index 28193cc86c..9d65282beb 100644 --- a/target/linux/mediatek/patches/0067-arm-mediatek-add-mt7623-support.patch +++ b/target/linux/mediatek/patches/0067-arm-mediatek-add-mt7623-support.patch @@ -11,8 +11,6 @@ Signed-off-by: John Crispin 3 files changed, 67 insertions(+) create mode 100644 include/dt-bindings/reset-controller/mt7623-resets.h -diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig -index 7704818..5393d25 100644 --- a/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig @@ -17,6 +17,12 @@ config MACH_MT6592 @@ -28,11 +26,9 @@ index 7704818..5393d25 100644 config MACH_MT8127 bool "MediaTek MT8127 SoCs support" default ARCH_MEDIATEK -diff --git a/arch/arm/mach-mediatek/mediatek.c b/arch/arm/mach-mediatek/mediatek.c -index 6b38d67..ab8cf21 100644 --- a/arch/arm/mach-mediatek/mediatek.c +++ b/arch/arm/mach-mediatek/mediatek.c -@@ -29,6 +29,7 @@ static void __init mediatek_timer_init(void) +@@ -29,6 +29,7 @@ static void __init mediatek_timer_init(v void __iomem *gpt_base = 0; if (of_machine_is_compatible("mediatek,mt6589") || @@ -40,7 +36,7 @@ index 6b38d67..ab8cf21 100644 of_machine_is_compatible("mediatek,mt8135") || of_machine_is_compatible("mediatek,mt8127")) { /* turn on GPT6 which ungates arch timer clocks */ -@@ -48,6 +49,7 @@ static void __init mediatek_timer_init(void) +@@ -48,6 +49,7 @@ static void __init mediatek_timer_init(v static const char * const mediatek_board_dt_compat[] = { "mediatek,mt6589", "mediatek,mt6592", @@ -48,9 +44,6 @@ index 6b38d67..ab8cf21 100644 "mediatek,mt8127", "mediatek,mt8135", NULL, -diff --git a/include/dt-bindings/reset-controller/mt7623-resets.h b/include/dt-bindings/reset-controller/mt7623-resets.h -new file mode 100644 -index 0000000..28a7d69 --- /dev/null +++ b/include/dt-bindings/reset-controller/mt7623-resets.h @@ -0,0 +1,59 @@ @@ -113,6 +106,3 @@ index 0000000..28a7d69 +#define MT7623_PERI_SPI0_SW_RST 33 + +#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT7623 */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0068-SDK_compat.patch b/target/linux/mediatek/patches/0068-SDK_compat.patch index 2800dbd009..a44270310b 100644 --- a/target/linux/mediatek/patches/0068-SDK_compat.patch +++ b/target/linux/mediatek/patches/0068-SDK_compat.patch @@ -21,9 +21,6 @@ Subject: [PATCH 68/76] SDK_compat create mode 100644 arch/arm/mach-mediatek/mt_reg_base.h create mode 100644 arch/arm/mach-mediatek/rt_mmap.h -diff --git a/arch/arm/include/asm/mach/mt_irq.h b/arch/arm/include/asm/mach/mt_irq.h -new file mode 100644 -index 0000000..ff265e0 --- /dev/null +++ b/arch/arm/include/asm/mach/mt_irq.h @@ -0,0 +1,174 @@ @@ -201,9 +198,6 @@ index 0000000..ff265e0 +#endif + +#endif -diff --git a/arch/arm/include/asm/rt2880/mt_irq.h b/arch/arm/include/asm/rt2880/mt_irq.h -new file mode 100644 -index 0000000..ff265e0 --- /dev/null +++ b/arch/arm/include/asm/rt2880/mt_irq.h @@ -0,0 +1,174 @@ @@ -381,9 +375,6 @@ index 0000000..ff265e0 +#endif + +#endif -diff --git a/arch/arm/include/asm/rt2880/rt_mmap.h b/arch/arm/include/asm/rt2880/rt_mmap.h -new file mode 100644 -index 0000000..e86b3bb --- /dev/null +++ b/arch/arm/include/asm/rt2880/rt_mmap.h @@ -0,0 +1,58 @@ @@ -445,9 +436,6 @@ index 0000000..e86b3bb + +//for backward-compatible +#define RALINK_FE_RST RSTCTL_FE_RST -diff --git a/arch/arm/include/asm/rt2880/surfboardint.h b/arch/arm/include/asm/rt2880/surfboardint.h -new file mode 100644 -index 0000000..4581598 --- /dev/null +++ b/arch/arm/include/asm/rt2880/surfboardint.h @@ -0,0 +1,42 @@ @@ -493,9 +481,6 @@ index 0000000..4581598 + + + -diff --git a/arch/arm/include/asm/rt2880/x_define_irq.h b/arch/arm/include/asm/rt2880/x_define_irq.h -new file mode 100644 -index 0000000..4b2e669 --- /dev/null +++ b/arch/arm/include/asm/rt2880/x_define_irq.h @@ -0,0 +1,160 @@ @@ -659,8 +644,6 @@ index 0000000..4b2e669 +X_DEFINE_IRQ(MT_FE_PDMA_IRQ_ID , 230, H,LEVEL) +X_DEFINE_IRQ(MT_FE_QDMA_IRQ_ID , 231, H,LEVEL) +X_DEFINE_IRQ(MT_FE_ORIG_IRQ_ID , 232, H,LEVEL) -diff --git a/arch/arm/mach-mediatek/mediatek.c b/arch/arm/mach-mediatek/mediatek.c -index ab8cf21..c0e373b 100644 --- a/arch/arm/mach-mediatek/mediatek.c +++ b/arch/arm/mach-mediatek/mediatek.c @@ -19,6 +19,186 @@ @@ -850,7 +833,7 @@ index ab8cf21..c0e373b 100644 #define GPT6_CON_MT65xx 0x10008060 -@@ -55,7 +235,13 @@ static const char * const mediatek_board_dt_compat[] = { +@@ -55,7 +235,13 @@ static const char * const mediatek_board NULL, }; @@ -864,9 +847,6 @@ index ab8cf21..c0e373b 100644 .init_time = mediatek_timer_init, + .map_io = mt_map_io, MACHINE_END -diff --git a/arch/arm/mach-mediatek/mt_reg_base.h b/arch/arm/mach-mediatek/mt_reg_base.h -new file mode 100644 -index 0000000..cf2bb9e --- /dev/null +++ b/arch/arm/mach-mediatek/mt_reg_base.h @@ -0,0 +1,640 @@ @@ -1510,9 +1490,6 @@ index 0000000..cf2bb9e +#endif + +#endif -diff --git a/arch/arm/mach-mediatek/rt_mmap.h b/arch/arm/mach-mediatek/rt_mmap.h -new file mode 100644 -index 0000000..e86b3bb --- /dev/null +++ b/arch/arm/mach-mediatek/rt_mmap.h @@ -0,0 +1,58 @@ @@ -1574,6 +1551,3 @@ index 0000000..e86b3bb + +//for backward-compatible +#define RALINK_FE_RST RSTCTL_FE_RST --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0069-arm-mediatek-add-mt7623-support-to-pmic-wrapper.patch b/target/linux/mediatek/patches/0069-arm-mediatek-add-mt7623-support-to-pmic-wrapper.patch index b724682433..315166a954 100644 --- a/target/linux/mediatek/patches/0069-arm-mediatek-add-mt7623-support-to-pmic-wrapper.patch +++ b/target/linux/mediatek/patches/0069-arm-mediatek-add-mt7623-support-to-pmic-wrapper.patch @@ -8,8 +8,6 @@ Signed-off-by: John Crispin drivers/soc/mediatek/mtk-pmic-wrap.c | 345 +++++++++++++++++++++++++++++----- 1 file changed, 296 insertions(+), 49 deletions(-) -diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c -index f432291..9ff02a1 100644 --- a/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c @@ -31,6 +31,13 @@ @@ -335,7 +333,7 @@ index f432291..9ff02a1 100644 static inline int pwrap_is_mt8135(struct pmic_wrapper *wrp) { return wrp->type == PWRAP_MT8135; -@@ -475,6 +677,16 @@ static int pwrap_read(struct pmic_wrapper *wrp, u32 adr, u32 *rdata) +@@ -475,6 +677,16 @@ static int pwrap_read(struct pmic_wrappe return 0; } @@ -352,7 +350,7 @@ index f432291..9ff02a1 100644 static int pwrap_regmap_read(void *context, u32 adr, u32 *rdata) { return pwrap_read(context, adr, rdata); -@@ -535,7 +747,7 @@ static int pwrap_init_sidly(struct pmic_wrapper *wrp) +@@ -535,7 +747,7 @@ static int pwrap_init_sidly(struct pmic_ for (i = 0; i < 4; i++) { pwrap_writel(wrp, i, PWRAP_SIDLY); @@ -361,7 +359,7 @@ index f432291..9ff02a1 100644 if (rdata == PWRAP_DEW_READ_TEST_VAL) { dev_dbg(wrp->dev, "[Read Test] pass, SIDLY=%x\n", i); pass |= 1 << i; -@@ -561,6 +773,14 @@ static int pwrap_init_reg_clock(struct pmic_wrapper *wrp) +@@ -561,6 +773,14 @@ static int pwrap_init_reg_clock(struct p pwrap_writel(wrp, 0x4, PWRAP_CSHEXT_READ); pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_START); pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_END); @@ -376,7 +374,7 @@ index f432291..9ff02a1 100644 } else { pwrap_writel(wrp, 0x0, PWRAP_CSHEXT_WRITE); pwrap_writel(wrp, 0x4, PWRAP_CSHEXT_READ); -@@ -581,7 +801,7 @@ static bool pwrap_is_pmic_cipher_ready(struct pmic_wrapper *wrp) +@@ -581,7 +801,7 @@ static bool pwrap_is_pmic_cipher_ready(s u32 rdata; int ret; @@ -385,7 +383,7 @@ index f432291..9ff02a1 100644 if (ret) return 0; -@@ -606,12 +826,16 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) +@@ -606,12 +826,16 @@ static int pwrap_init_cipher(struct pmic } /* Config cipher mode @PMIC */ @@ -408,7 +406,7 @@ index f432291..9ff02a1 100644 /* wait for cipher data ready@AP */ ret = pwrap_wait_for_state(wrp, pwrap_is_cipher_ready); -@@ -628,7 +852,7 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) +@@ -628,7 +852,7 @@ static int pwrap_init_cipher(struct pmic } /* wait for cipher mode idle */ @@ -417,7 +415,7 @@ index f432291..9ff02a1 100644 ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle_and_sync_idle); if (ret) { dev_err(wrp->dev, "cipher mode idle fail, ret=%d\n", ret); -@@ -638,8 +862,8 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) +@@ -638,8 +862,8 @@ static int pwrap_init_cipher(struct pmic pwrap_writel(wrp, 1, PWRAP_CIPHER_MODE); /* Write Test */ @@ -428,7 +426,7 @@ index f432291..9ff02a1 100644 (rdata != PWRAP_DEW_WRITE_TEST_VAL)) { dev_err(wrp->dev, "rdata=0x%04X\n", rdata); return -EFAULT; -@@ -657,12 +881,17 @@ static int pwrap_init(struct pmic_wrapper *wrp) +@@ -657,12 +881,17 @@ static int pwrap_init(struct pmic_wrappe if (wrp->rstc_bridge) reset_control_reset(wrp->rstc_bridge); @@ -447,7 +445,7 @@ index f432291..9ff02a1 100644 /* Reset SPI slave */ ret = pwrap_reset_spislave(wrp); if (ret) -@@ -674,6 +903,9 @@ static int pwrap_init(struct pmic_wrapper *wrp) +@@ -674,6 +903,9 @@ static int pwrap_init(struct pmic_wrappe pwrap_writel(wrp, 1, PWRAP_WACS2_EN); @@ -457,7 +455,7 @@ index f432291..9ff02a1 100644 ret = pwrap_init_reg_clock(wrp); if (ret) return ret; -@@ -684,7 +916,7 @@ static int pwrap_init(struct pmic_wrapper *wrp) +@@ -684,7 +916,7 @@ static int pwrap_init(struct pmic_wrappe return ret; /* Enable dual IO mode */ @@ -466,7 +464,7 @@ index f432291..9ff02a1 100644 /* Check IDLE & INIT_DONE in advance */ ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle_and_sync_idle); -@@ -696,7 +928,7 @@ static int pwrap_init(struct pmic_wrapper *wrp) +@@ -696,7 +928,7 @@ static int pwrap_init(struct pmic_wrappe pwrap_writel(wrp, 1, PWRAP_DIO_EN); /* Read Test */ @@ -475,7 +473,7 @@ index f432291..9ff02a1 100644 if (rdata != PWRAP_DEW_READ_TEST_VAL) { dev_err(wrp->dev, "Read test failed after switch to DIO mode: 0x%04x != 0x%04x\n", PWRAP_DEW_READ_TEST_VAL, rdata); -@@ -709,12 +941,13 @@ static int pwrap_init(struct pmic_wrapper *wrp) +@@ -709,12 +941,13 @@ static int pwrap_init(struct pmic_wrappe return ret; /* Signature checking - using CRC */ @@ -491,7 +489,7 @@ index f432291..9ff02a1 100644 pwrap_writel(wrp, wrp->arb_en_all, PWRAP_HIPRIO_ARB_EN); if (pwrap_is_mt8135(wrp)) -@@ -728,7 +961,16 @@ static int pwrap_init(struct pmic_wrapper *wrp) +@@ -728,7 +961,16 @@ static int pwrap_init(struct pmic_wrappe pwrap_writel(wrp, 0xf, PWRAP_WDT_UNIT); pwrap_writel(wrp, 0xffffffff, PWRAP_WDT_SRC_EN); pwrap_writel(wrp, 0x1, PWRAP_TIMER_EN); @@ -509,7 +507,7 @@ index f432291..9ff02a1 100644 if (pwrap_is_mt8135(wrp)) { /* enable pwrap events and pwrap bridge in AP side */ -@@ -743,15 +985,15 @@ static int pwrap_init(struct pmic_wrapper *wrp) +@@ -743,15 +985,15 @@ static int pwrap_init(struct pmic_wrappe writel(0x7ff, wrp->bridge_base + PWRAP_MT8135_BRIDGE_INT_EN); /* enable PMIC event out and sources */ @@ -530,7 +528,7 @@ index f432291..9ff02a1 100644 dev_err(wrp->dev, "enable dewrap fail\n"); return -EFAULT; } -@@ -795,6 +1037,9 @@ static const struct regmap_config pwrap_regmap_config = { +@@ -795,6 +1037,9 @@ static const struct regmap_config pwrap_ static struct of_device_id of_pwrap_match_tbl[] = { { @@ -540,7 +538,7 @@ index f432291..9ff02a1 100644 .compatible = "mediatek,mt8135-pwrap", .data = &pwrap_mt8135, }, { -@@ -824,6 +1069,8 @@ static int pwrap_probe(struct platform_device *pdev) +@@ -824,6 +1069,8 @@ static int pwrap_probe(struct platform_d type = of_id->data; wrp->regs = type->regs; @@ -549,6 +547,3 @@ index f432291..9ff02a1 100644 wrp->type = type->type; wrp->arb_en_all = type->arb_en_all; wrp->dev = &pdev->dev; --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0070-clk-mediatek-Export-CPU-mux-clocks-for-CPU-frequency.patch b/target/linux/mediatek/patches/0070-clk-mediatek-Export-CPU-mux-clocks-for-CPU-frequency.patch index 87de0f9436..6b92bf2b2c 100644 --- a/target/linux/mediatek/patches/0070-clk-mediatek-Export-CPU-mux-clocks-for-CPU-frequency.patch +++ b/target/linux/mediatek/patches/0070-clk-mediatek-Export-CPU-mux-clocks-for-CPU-frequency.patch @@ -23,8 +23,6 @@ Signed-off-by: Pi-Cheng Chen create mode 100644 drivers/clk/mediatek/clk-cpumux.c create mode 100644 drivers/clk/mediatek/clk-cpumux.h -diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile -index 19a3763..fe07e26 100644 --- a/drivers/clk/mediatek/Makefile +++ b/drivers/clk/mediatek/Makefile @@ -1,4 +1,4 @@ @@ -33,9 +31,6 @@ index 19a3763..fe07e26 100644 obj-$(CONFIG_RESET_CONTROLLER) += reset.o obj-y += clk-mt7623.o obj-y += clk-mt8135.o -diff --git a/drivers/clk/mediatek/clk-cpumux.c b/drivers/clk/mediatek/clk-cpumux.c -new file mode 100644 -index 0000000..593df45 --- /dev/null +++ b/drivers/clk/mediatek/clk-cpumux.c @@ -0,0 +1,119 @@ @@ -158,9 +153,6 @@ index 0000000..593df45 + + return 0; +} -diff --git a/drivers/clk/mediatek/clk-cpumux.h b/drivers/clk/mediatek/clk-cpumux.h -new file mode 100644 -index 0000000..dddaad5 --- /dev/null +++ b/drivers/clk/mediatek/clk-cpumux.h @@ -0,0 +1,30 @@ @@ -194,6 +186,3 @@ index 0000000..dddaad5 + struct clk_onecell_data *clk_data); + +#endif /* __DRV_CLK_CPUMUX_H */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0071-clk.patch b/target/linux/mediatek/patches/0071-clk.patch index f920dcee43..9bbd78d360 100644 --- a/target/linux/mediatek/patches/0071-clk.patch +++ b/target/linux/mediatek/patches/0071-clk.patch @@ -7,8 +7,6 @@ Subject: [PATCH 71/76] clk drivers/clk/mediatek/clk-mt7623.c | 194 ++++++++++++++++--------------------- 1 file changed, 83 insertions(+), 111 deletions(-) -diff --git a/drivers/clk/mediatek/clk-mt7623.c b/drivers/clk/mediatek/clk-mt7623.c -index 07843bb..d46b2ad 100644 --- a/drivers/clk/mediatek/clk-mt7623.c +++ b/drivers/clk/mediatek/clk-mt7623.c @@ -20,6 +20,7 @@ @@ -19,7 +17,7 @@ index 07843bb..d46b2ad 100644 static DEFINE_SPINLOCK(mt7623_clk_lock); -@@ -37,18 +38,11 @@ static void mtk_clk_enable_critical(void) +@@ -37,18 +38,11 @@ static void mtk_clk_enable_critical(void clk_prepare_enable(mt7623_top_clk_data->clks[CLK_TOP_RTC_SEL]); } @@ -42,7 +40,7 @@ index 07843bb..d46b2ad 100644 FACTOR(CLK_TOP_UNIVPLL_624M, "univpll_624m", "univpll", 1, 2), FACTOR(CLK_TOP_UNIVPLL_416M, "univpll_416m", "univpll", 1, 3), -@@ -61,13 +55,6 @@ static const struct mtk_fixed_factor top_divs[] __initconst = { +@@ -61,13 +55,6 @@ static const struct mtk_fixed_factor top FACTOR(CLK_TOP_AUDPLL_D16, "audpll_d16", "audpll", 1, 16), FACTOR(CLK_TOP_AUDPLL_24, "audpll_d24", "audpll", 1, 24), @@ -56,7 +54,7 @@ index 07843bb..d46b2ad 100644 FACTOR(CLK_TOP_MSDCPLL_D2, "msdcpll_d2", "msdcpll", 1, 2), FACTOR(CLK_TOP_SYSPLL1_D2, "syspll1_d2", "mainpll_650m", 1, 2), -@@ -85,9 +72,6 @@ static const struct mtk_fixed_factor top_divs[] __initconst = { +@@ -85,9 +72,6 @@ static const struct mtk_fixed_factor top FACTOR(CLK_TOP_SYSPLL_D5, "syspll_d5", "mainpll_260m", 1, 1), FACTOR(CLK_TOP_SYSPLL_D7, "syspll_d7", "mainpll_185p6m", 1, 1), @@ -66,7 +64,7 @@ index 07843bb..d46b2ad 100644 FACTOR(CLK_TOP_UNIVPLL1_D2, "univpll1_d2", "univpll_624m", 1, 2), FACTOR(CLK_TOP_UNIVPLL1_D4, "univpll1_d4", "univpll_624m", 1, 4), FACTOR(CLK_TOP_UNIVPLL1_D8, "univpll1_d8", "univpll_624m", 1, 8), -@@ -110,9 +94,6 @@ static const struct mtk_fixed_factor top_divs[] __initconst = { +@@ -110,9 +94,6 @@ static const struct mtk_fixed_factor top FACTOR(CLK_TOP_UNIVPLL_D5, "univpll_d5", "univpll_249p6m", 1, 1), FACTOR(CLK_TOP_UNIVPLL_D26, "univpll_d26", "univpll_48m", 1, 1), @@ -76,7 +74,7 @@ index 07843bb..d46b2ad 100644 }; static const char * const axi_parents[] __initconst = { -@@ -155,18 +136,6 @@ static const char * const pwm_parents[] __initconst = { +@@ -155,18 +136,6 @@ static const char * const pwm_parents[] "univpll1_d4", }; @@ -95,7 +93,7 @@ index 07843bb..d46b2ad 100644 static const char * const mfg_parents[] __initconst = { "clk26m", "mmpll_ck", -@@ -178,17 +147,6 @@ static const char * const mfg_parents[] __initconst = { +@@ -178,17 +147,6 @@ static const char * const mfg_parents[] "univpll1_d2", }; @@ -113,7 +111,7 @@ index 07843bb..d46b2ad 100644 static const char * const uart_parents[] __initconst = { "clk26m", "univpll2_d8", -@@ -277,35 +235,6 @@ static const char * const scp_parents[] __initconst = { +@@ -277,35 +235,6 @@ static const char * const scp_parents[] "dmpll_d4", }; @@ -149,7 +147,7 @@ index 07843bb..d46b2ad 100644 static const char * const apll_parents[] __initconst = { "clk26m", "audpll", -@@ -317,17 +246,6 @@ static const char * const apll_parents[] __initconst = { +@@ -317,17 +246,6 @@ static const char * const apll_parents[] "clk26m", }; @@ -167,7 +165,7 @@ index 07843bb..d46b2ad 100644 static const char * const rtc_parents[] __initconst = { "clk32k", "external_32k", -@@ -367,9 +285,7 @@ static const struct mtk_composite top_muxes[] __initconst = { +@@ -367,9 +285,7 @@ static const struct mtk_composite top_mu 0x0140, 24, 3, INVALID_MUX_GATE_BIT), /* CLK_CFG_1 */ MUX_GATE(CLK_TOP_PWM_SEL, "pwm_sel", pwm_parents, 0x0050, 0, 2, 7), @@ -177,7 +175,7 @@ index 07843bb..d46b2ad 100644 /* CLK_CFG_2 */ MUX_GATE(CLK_TOP_UART_SEL, "uart_sel", uart_parents, 0x0060, 0, 1, 7), MUX_GATE(CLK_TOP_SPI_SEL, "spi_sel", spi_parents, 0x0060, 8, 3, 15), -@@ -384,12 +300,8 @@ static const struct mtk_composite top_muxes[] __initconst = { +@@ -384,12 +300,8 @@ static const struct mtk_composite top_mu /* CLK_CFG_4 */ MUX_GATE(CLK_TOP_PMICSPI_SEL, "pmicspi_sel", pmic_spi_parents, 0x0080, 0, 4, 7), MUX_GATE(CLK_TOP_SCP_SEL, "scp_sel", scp_parents, 0x0080, 8, 2, 15), @@ -190,7 +188,7 @@ index 07843bb..d46b2ad 100644 /* CLK_CFG_6 */ MUX_GATE(CLK_TOP_RTC_SEL, "rtc_sel", rtc_parents, 0x00a0, 0, 2, 7), MUX_GATE(CLK_TOP_NFI2X_SEL, "nfi2x_sel", nfi2x_parents, 0x00a0, 8, 3, 15), -@@ -428,6 +340,17 @@ static const struct mtk_gate infra_clks[] __initconst = { +@@ -428,6 +340,17 @@ static const struct mtk_gate infra_clks[ GATE_ICG(CLK_INFRA_PMIC_WRAP, "pmic_wrap_ck", "axi_sel", 23), }; @@ -208,7 +206,7 @@ index 07843bb..d46b2ad 100644 static const struct mtk_gate_regs peri0_cg_regs = { .set_ofs = 0x0008, .clr_ofs = 0x0010, -@@ -499,6 +422,29 @@ static const struct mtk_gate peri_gates[] __initconst = { +@@ -499,6 +422,29 @@ static const struct mtk_gate peri_gates[ GATE_PERI1(CLK_PERI_NFI_PAD, "nfi_pad_ck", "axi_sel", 2), }; @@ -238,7 +236,7 @@ index 07843bb..d46b2ad 100644 static const char * const uart_ck_sel_parents[] __initconst = { "clk26m", "uart_sel", -@@ -525,10 +471,9 @@ static void __init mtk_topckgen_init(struct device_node *node) +@@ -525,10 +471,9 @@ static void __init mtk_topckgen_init(str mt7623_top_clk_data = clk_data = mtk_alloc_clk_data(CLK_TOP_NR_CLK); @@ -250,7 +248,7 @@ index 07843bb..d46b2ad 100644 r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); if (r) -@@ -547,7 +492,10 @@ static void __init mtk_infrasys_init(struct device_node *node) +@@ -547,7 +492,10 @@ static void __init mtk_infrasys_init(str clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK); mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks), @@ -262,7 +260,7 @@ index 07843bb..d46b2ad 100644 clk_prepare_enable(clk_data->clks[CLK_INFRA_M4U]); -@@ -588,35 +536,59 @@ static void __init mtk_pericfg_init(struct device_node *node) +@@ -588,35 +536,59 @@ static void __init mtk_pericfg_init(stru } CLK_OF_DECLARE(mtk_pericfg, "mediatek,mt7623-pericfg", mtk_pericfg_init); @@ -337,6 +335,3 @@ index 07843bb..d46b2ad 100644 }; static void __init mtk_apmixedsys_init(struct device_node *node) --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0072-mfd.patch b/target/linux/mediatek/patches/0072-mfd.patch index cbcadb7de7..a94b6a1d25 100644 --- a/target/linux/mediatek/patches/0072-mfd.patch +++ b/target/linux/mediatek/patches/0072-mfd.patch @@ -12,8 +12,6 @@ Subject: [PATCH 72/76] mfd 5 files changed, 636 insertions(+), 608 deletions(-) create mode 100644 include/linux/regulator/mt6323-regulator.h -diff --git a/drivers/mfd/mt6323-core.c b/drivers/mfd/mt6323-core.c -index 012c620..9b7f5b9 100644 --- a/drivers/mfd/mt6323-core.c +++ b/drivers/mfd/mt6323-core.c @@ -18,111 +18,99 @@ @@ -166,7 +164,7 @@ index 012c620..9b7f5b9 100644 irq_set_nested_thread(irq, 1); #ifdef CONFIG_ARM set_irq_flags(irq, IRQF_VALID); -@@ -133,98 +121,98 @@ static int mt6397_irq_domain_map(struct irq_domain *d, unsigned int irq, +@@ -133,98 +121,98 @@ static int mt6397_irq_domain_map(struct return 0; } @@ -305,8 +303,6 @@ index 012c620..9b7f5b9 100644 MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:mt6397"); +MODULE_ALIAS("platform:mt6323"); -diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c -index a5b2f47..f5e3f67 100644 --- a/drivers/regulator/mt6323-regulator.c +++ b/drivers/regulator/mt6323-regulator.c @@ -16,15 +16,15 @@ @@ -397,7 +393,7 @@ index a5b2f47..f5e3f67 100644 .owner = THIS_MODULE, \ .n_voltages = 1, \ .enable_reg = enreg, \ -@@ -106,50 +106,34 @@ static const struct regulator_linear_range buck_volt_range1[] = { +@@ -106,50 +106,34 @@ static const struct regulator_linear_ran }; static const struct regulator_linear_range buck_volt_range2[] = { @@ -455,7 +451,7 @@ index a5b2f47..f5e3f67 100644 ret = regmap_read(rdev->regmap, info->desc.enable_reg, ®val); if (ret != 0) { -@@ -160,7 +144,7 @@ static int mt6397_get_status(struct regulator_dev *rdev) +@@ -160,7 +144,7 @@ static int mt6397_get_status(struct regu return (regval & info->qi) ? REGULATOR_STATUS_ON : REGULATOR_STATUS_OFF; } @@ -464,7 +460,7 @@ index a5b2f47..f5e3f67 100644 .list_voltage = regulator_list_voltage_linear_range, .map_voltage = regulator_map_voltage_linear_range, .set_voltage_sel = regulator_set_voltage_sel_regmap, -@@ -169,10 +153,10 @@ static struct regulator_ops mt6397_volt_range_ops = { +@@ -169,10 +153,10 @@ static struct regulator_ops mt6397_volt_ .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, .is_enabled = regulator_is_enabled_regmap, @@ -477,7 +473,7 @@ index a5b2f47..f5e3f67 100644 .list_voltage = regulator_list_voltage_table, .map_voltage = regulator_map_voltage_iterate, .set_voltage_sel = regulator_set_voltage_sel_regmap, -@@ -181,90 +165,68 @@ static struct regulator_ops mt6397_volt_table_ops = { +@@ -181,90 +165,68 @@ static struct regulator_ops mt6397_volt_ .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, .is_enabled = regulator_is_enabled_regmap, @@ -610,7 +606,7 @@ index a5b2f47..f5e3f67 100644 } } } -@@ -272,44 +234,34 @@ static int mt6397_set_buck_vosel_reg(struct platform_device *pdev) +@@ -272,44 +234,34 @@ static int mt6397_set_buck_vosel_reg(str return 0; } @@ -665,7 +661,7 @@ index a5b2f47..f5e3f67 100644 return PTR_ERR(rdev); } } -@@ -317,16 +269,16 @@ static int mt6397_regulator_probe(struct platform_device *pdev) +@@ -317,16 +269,16 @@ static int mt6397_regulator_probe(struct return 0; } @@ -688,8 +684,6 @@ index a5b2f47..f5e3f67 100644 MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:mt6397-regulator"); +MODULE_ALIAS("platform:mt6323-regulator"); -diff --git a/include/linux/mfd/mt6323/core.h b/include/linux/mfd/mt6323/core.h -index cf5265b..5bb2d32 100644 --- a/include/linux/mfd/mt6323/core.h +++ b/include/linux/mfd/mt6323/core.h @@ -12,46 +12,46 @@ @@ -782,8 +776,6 @@ index cf5265b..5bb2d32 100644 -#endif /* __MFD_MT6397_CORE_H__ */ +#endif /* __MFD_MT6323_CORE_H__ */ -diff --git a/include/linux/mfd/mt6323/registers.h b/include/linux/mfd/mt6323/registers.h -index f23a0a6..4ee5e1f0 100644 --- a/include/linux/mfd/mt6323/registers.h +++ b/include/linux/mfd/mt6323/registers.h @@ -1,6 +1,5 @@ @@ -1543,9 +1535,6 @@ index f23a0a6..4ee5e1f0 100644 -#endif /* __MFD_MT6397_REGISTERS_H__ */ +#endif -diff --git a/include/linux/regulator/mt6323-regulator.h b/include/linux/regulator/mt6323-regulator.h -new file mode 100644 -index 0000000..620b0e3 --- /dev/null +++ b/include/linux/regulator/mt6323-regulator.h @@ -0,0 +1,37 @@ @@ -1586,6 +1575,3 @@ index 0000000..620b0e3 +#define MT6323_MAX_REGULATOR MT6323_ID_RG_MAX + +#endif /* __LINUX_REGULATOR_MT6323_H */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0073-clk.patch b/target/linux/mediatek/patches/0073-clk.patch index a3b36a5dae..7624559a48 100644 --- a/target/linux/mediatek/patches/0073-clk.patch +++ b/target/linux/mediatek/patches/0073-clk.patch @@ -7,8 +7,6 @@ Subject: [PATCH 73/76] clk include/dt-bindings/clock/mt7623-clk.h | 158 +++++++++++++++----------------- 1 file changed, 73 insertions(+), 85 deletions(-) -diff --git a/include/dt-bindings/clock/mt7623-clk.h b/include/dt-bindings/clock/mt7623-clk.h -index cb1e8a9..410ef31 100644 --- a/include/dt-bindings/clock/mt7623-clk.h +++ b/include/dt-bindings/clock/mt7623-clk.h @@ -17,96 +17,76 @@ @@ -195,6 +193,3 @@ index cb1e8a9..410ef31 100644 + #endif /* _DT_BINDINGS_CLK_MT7623_H */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0075-sd.patch b/target/linux/mediatek/patches/0075-sd.patch index 1dcfae397f..1eff10bbef 100644 --- a/target/linux/mediatek/patches/0075-sd.patch +++ b/target/linux/mediatek/patches/0075-sd.patch @@ -7,8 +7,6 @@ Subject: [PATCH 75/76] sd drivers/mmc/host/mtk-sd.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c -index 7c20f28..be2b00c 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -227,11 +227,13 @@ struct mt_gpdma_desc { @@ -41,7 +39,7 @@ index 7c20f28..be2b00c 100644 }; struct msdc_dma { -@@ -1115,7 +1119,7 @@ static void msdc_init_hw(struct msdc_host *host) +@@ -1115,7 +1119,7 @@ static void msdc_init_hw(struct msdc_hos sdr_set_field(host->base + MSDC_IOCON, MSDC_IOCON_DDLSEL, 1); writel(0x403c004f, host->base + MSDC_PATCH_BIT); sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1); @@ -50,6 +48,3 @@ index 7c20f28..be2b00c 100644 /* Configure to enable SDIO mode. * it's must otherwise sdio cmd5 failed */ --- -1.7.10.4 - diff --git a/target/linux/mediatek/patches/0076-reset.patch b/target/linux/mediatek/patches/0076-reset.patch index 615777920c..fd61635f65 100644 --- a/target/linux/mediatek/patches/0076-reset.patch +++ b/target/linux/mediatek/patches/0076-reset.patch @@ -7,8 +7,6 @@ Subject: [PATCH 76/76] reset include/dt-bindings/reset-controller/mt7623-resets.h | 9 +++++++++ 1 file changed, 9 insertions(+) -diff --git a/include/dt-bindings/reset-controller/mt7623-resets.h b/include/dt-bindings/reset-controller/mt7623-resets.h -index 28a7d69..3e0f39a 100644 --- a/include/dt-bindings/reset-controller/mt7623-resets.h +++ b/include/dt-bindings/reset-controller/mt7623-resets.h @@ -56,4 +56,13 @@ @@ -25,6 +23,3 @@ index 28a7d69..3e0f39a 100644 +#define MT7623_HIFSYS_PCIE0_SW_RST 26 + #endif /* _DT_BINDINGS_RESET_CONTROLLER_MT7623 */ --- -1.7.10.4 - diff --git a/target/linux/sunxi/patches-4.1/141-dt-sunxi-raise-minimum-cpu-voltage.patch b/target/linux/sunxi/patches-4.1/141-dt-sunxi-raise-minimum-cpu-voltage.patch deleted file mode 100644 index f2f799e734..0000000000 --- a/target/linux/sunxi/patches-4.1/141-dt-sunxi-raise-minimum-cpu-voltage.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/arch/arm/boot/dts/sun7i-a20.dtsi -+++ b/arch/arm/boot/dts/sun7i-a20.dtsi -@@ -111,7 +111,7 @@ - 720000 1200000 - 528000 1100000 - 312000 1000000 -- 144000 900000 -+ 144000 1000000 - >; - #cooling-cells = <2>; - cooling-min-level = <0>;