diff options
author | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2019-11-06 17:19:11 +0100 |
---|---|---|
committer | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2019-11-12 10:15:01 +0100 |
commit | 6589de9af79f58175e4af22a98122e62896aba8a (patch) | |
tree | 40e8b738f55403142982fb6680835cf284526f5d /target | |
parent | ecfe552f9915eb6bf10fce473b4a4ea9e6c07840 (diff) | |
download | upstream-6589de9af79f58175e4af22a98122e62896aba8a.tar.gz upstream-6589de9af79f58175e4af22a98122e62896aba8a.tar.bz2 upstream-6589de9af79f58175e4af22a98122e62896aba8a.zip |
kernel: bump 4.19 to 4.19.82
Refreshed all patches.
Remove upstreamed:
- 950-0295-sc16is7xx-Fix-for-Unexpected-interrupt-8.patch
Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'target')
12 files changed, 45 insertions, 258 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0040-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-4.19/950-0040-Add-dwc_otg-driver.patch index d5d9867d90..fe8f9fb66b 100644 --- a/target/linux/brcm2708/patches-4.19/950-0040-Add-dwc_otg-driver.patch +++ b/target/linux/brcm2708/patches-4.19/950-0040-Add-dwc_otg-driver.patch @@ -917,7 +917,7 @@ Fixes https://github.com/raspberrypi/linux/issues/2408 } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5214,7 +5214,7 @@ static void port_event(struct usb_hub *h +@@ -5221,7 +5221,7 @@ static void port_event(struct usb_hub *h u16 status = 0, unused; port_dev->over_current_count++; diff --git a/target/linux/brcm2708/patches-4.19/950-0100-ARM64-Force-hardware-emulation-of-deprecated-instruc.patch b/target/linux/brcm2708/patches-4.19/950-0100-ARM64-Force-hardware-emulation-of-deprecated-instruc.patch index ee60dfe62c..912ab3fc09 100644 --- a/target/linux/brcm2708/patches-4.19/950-0100-ARM64-Force-hardware-emulation-of-deprecated-instruc.patch +++ b/target/linux/brcm2708/patches-4.19/950-0100-ARM64-Force-hardware-emulation-of-deprecated-instruc.patch @@ -10,7 +10,7 @@ Subject: [PATCH 100/806] ARM64: Force hardware emulation of deprecated --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c -@@ -182,10 +182,15 @@ static void __init register_insn_emulati +@@ -185,10 +185,15 @@ static void __init register_insn_emulati switch (ops->status) { case INSN_DEPRECATED: diff --git a/target/linux/brcm2708/patches-4.19/950-0149-sc16is7xx-Don-t-spin-if-no-data-received.patch b/target/linux/brcm2708/patches-4.19/950-0149-sc16is7xx-Don-t-spin-if-no-data-received.patch index 2d6c86e8a0..cfbc59e619 100644 --- a/target/linux/brcm2708/patches-4.19/950-0149-sc16is7xx-Don-t-spin-if-no-data-received.patch +++ b/target/linux/brcm2708/patches-4.19/950-0149-sc16is7xx-Don-t-spin-if-no-data-received.patch @@ -12,7 +12,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org> --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c -@@ -678,6 +678,8 @@ static bool sc16is7xx_port_irq(struct sc +@@ -696,6 +696,8 @@ static bool sc16is7xx_port_irq(struct sc rxlen = sc16is7xx_port_read(port, SC16IS7XX_RXLVL_REG); if (rxlen) sc16is7xx_handle_rx(port, rxlen, iir); diff --git a/target/linux/brcm2708/patches-4.19/950-0181-Revert-rtc-pcf8523-properly-handle-oscillator-stop-b.patch b/target/linux/brcm2708/patches-4.19/950-0181-Revert-rtc-pcf8523-properly-handle-oscillator-stop-b.patch index 690345497d..3809a7a9cb 100644 --- a/target/linux/brcm2708/patches-4.19/950-0181-Revert-rtc-pcf8523-properly-handle-oscillator-stop-b.patch +++ b/target/linux/brcm2708/patches-4.19/950-0181-Revert-rtc-pcf8523-properly-handle-oscillator-stop-b.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org> --- a/drivers/rtc/rtc-pcf8523.c +++ b/drivers/rtc/rtc-pcf8523.c -@@ -201,8 +201,28 @@ static int pcf8523_rtc_read_time(struct +@@ -212,8 +212,28 @@ static int pcf8523_rtc_read_time(struct if (err < 0) return err; @@ -46,7 +46,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org> tm->tm_sec = bcd2bin(regs[0] & 0x7f); tm->tm_min = bcd2bin(regs[1] & 0x7f); -@@ -238,7 +258,6 @@ static int pcf8523_rtc_set_time(struct d +@@ -249,7 +269,6 @@ static int pcf8523_rtc_set_time(struct d return err; regs[0] = REG_SECONDS; diff --git a/target/linux/brcm2708/patches-4.19/950-0295-sc16is7xx-Fix-for-Unexpected-interrupt-8.patch b/target/linux/brcm2708/patches-4.19/950-0295-sc16is7xx-Fix-for-Unexpected-interrupt-8.patch deleted file mode 100644 index 614e1e9e24..0000000000 --- a/target/linux/brcm2708/patches-4.19/950-0295-sc16is7xx-Fix-for-Unexpected-interrupt-8.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 53fc43d7a369bab50b4d3dce73adf7d522f0ee20 Mon Sep 17 00:00:00 2001 -From: Phil Elwell <phil@raspberrypi.org> -Date: Fri, 18 May 2018 10:26:59 +0100 -Subject: [PATCH 295/806] sc16is7xx: Fix for "Unexpected interrupt: 8" - -The SC16IS752 has an Enhanced Feature Register which is aliased at the -same address as the Interrupt Identification Register; accessing it -requires that a magic value is written to the Line Configuration -Register. If an interrupt is raised while the EFR is mapped in then -the ISR won't be able to access the IIR, leading to the "Unexpected -interrupt" error messages. - -Avoid the problem by claiming a mutex around accesses to the EFR -register, also claiming the mutex in the interrupt handler work -item (this is equivalent to disabling interrupts to interlock against -a non-threaded interrupt handler). - -See: https://github.com/raspberrypi/linux/issues/2529 - -Signed-off-by: Phil Elwell <phil@raspberrypi.org> ---- - drivers/tty/serial/sc16is7xx.c | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - ---- a/drivers/tty/serial/sc16is7xx.c -+++ b/drivers/tty/serial/sc16is7xx.c -@@ -328,6 +328,7 @@ struct sc16is7xx_port { - struct kthread_worker kworker; - struct task_struct *kworker_task; - struct kthread_work irq_work; -+ struct mutex efr_lock; - struct sc16is7xx_one p[0]; - }; - -@@ -499,6 +500,21 @@ static int sc16is7xx_set_baud(struct uar - div /= 4; - } - -+ /* In an amazing feat of design, the Enhanced Features Register shares -+ * the address of the Interrupt Identification Register, and is -+ * switched in by writing a magic value (0xbf) to the Line Control -+ * Register. Any interrupt firing during this time will see the EFR -+ * where it expects the IIR to be, leading to "Unexpected interrupt" -+ * messages. -+ * -+ * Prevent this possibility by claiming a mutex while accessing the -+ * EFR, and claiming the same mutex from within the interrupt handler. -+ * This is similar to disabling the interrupt, but that doesn't work -+ * because the bulk of the interrupt processing is run as a workqueue -+ * job in thread context. -+ */ -+ mutex_lock(&s->efr_lock); -+ - lcr = sc16is7xx_port_read(port, SC16IS7XX_LCR_REG); - - /* Open the LCR divisors for configuration */ -@@ -514,6 +530,8 @@ static int sc16is7xx_set_baud(struct uar - /* Put LCR back to the normal mode */ - sc16is7xx_port_write(port, SC16IS7XX_LCR_REG, lcr); - -+ mutex_unlock(&s->efr_lock); -+ - sc16is7xx_port_update(port, SC16IS7XX_MCR_REG, - SC16IS7XX_MCR_CLKSEL_BIT, - prescaler); -@@ -698,6 +716,8 @@ static void sc16is7xx_ist(struct kthread - { - struct sc16is7xx_port *s = to_sc16is7xx_port(ws, irq_work); - -+ mutex_lock(&s->efr_lock); -+ - while (1) { - bool keep_polling = false; - int i; -@@ -707,6 +727,8 @@ static void sc16is7xx_ist(struct kthread - if (!keep_polling) - break; - } -+ -+ mutex_unlock(&s->efr_lock); - } - - static irqreturn_t sc16is7xx_irq(int irq, void *dev_id) -@@ -901,6 +923,9 @@ static void sc16is7xx_set_termios(struct - if (!(termios->c_cflag & CREAD)) - port->ignore_status_mask |= SC16IS7XX_LSR_BRK_ERROR_MASK; - -+ /* As above, claim the mutex while accessing the EFR. */ -+ mutex_lock(&s->efr_lock); -+ - sc16is7xx_port_write(port, SC16IS7XX_LCR_REG, - SC16IS7XX_LCR_CONF_MODE_B); - -@@ -922,6 +947,8 @@ static void sc16is7xx_set_termios(struct - /* Update LCR register */ - sc16is7xx_port_write(port, SC16IS7XX_LCR_REG, lcr); - -+ mutex_unlock(&s->efr_lock); -+ - /* Get baud rate generator configuration */ - baud = uart_get_baud_rate(port, termios, old, - port->uartclk / 16 / 4 / 0xffff, -@@ -1187,6 +1214,7 @@ static int sc16is7xx_probe(struct device - s->regmap = regmap; - s->devtype = devtype; - dev_set_drvdata(dev, s); -+ mutex_init(&s->efr_lock); - - kthread_init_worker(&s->kworker); - kthread_init_work(&s->irq_work, sc16is7xx_ist); diff --git a/target/linux/brcm2708/patches-4.19/950-0730-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/brcm2708/patches-4.19/950-0730-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 9e9c79280d..fd3f2c749e 100644 --- a/target/linux/brcm2708/patches-4.19/950-0730-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/brcm2708/patches-4.19/950-0730-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org> #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1189,6 +1192,9 @@ +@@ -1190,6 +1193,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 diff --git a/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch index 16d8f5d67c..806e0f3c21 100644 --- a/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch +++ b/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h -@@ -481,12 +481,13 @@ extern struct Qdisc_ops noop_qdisc_ops; +@@ -486,12 +486,13 @@ extern struct Qdisc_ops noop_qdisc_ops; extern struct Qdisc_ops pfifo_fast_ops; extern struct Qdisc_ops mq_qdisc_ops; extern struct Qdisc_ops noqueue_qdisc_ops; diff --git a/target/linux/mediatek/patches-4.19/0002-Revert-ARM-mediatek-add-MT7623a-smp-bringup-code.patch b/target/linux/mediatek/patches-4.19/0002-Revert-ARM-mediatek-add-MT7623a-smp-bringup-code.patch index 5c48ae19fc..fcbe09dde7 100644 --- a/target/linux/mediatek/patches-4.19/0002-Revert-ARM-mediatek-add-MT7623a-smp-bringup-code.patch +++ b/target/linux/mediatek/patches-4.19/0002-Revert-ARM-mediatek-add-MT7623a-smp-bringup-code.patch @@ -14,11 +14,9 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> arch/arm/mach-mediatek/platsmp.c | 1 - 2 files changed, 3 deletions(-) -diff --git a/arch/arm/mach-mediatek/mediatek.c b/arch/arm/mach-mediatek/mediatek.c -index 6910b4e0d913..c3cf215773b2 100644 --- a/arch/arm/mach-mediatek/mediatek.c +++ b/arch/arm/mach-mediatek/mediatek.c -@@ -30,7 +30,6 @@ static void __init mediatek_timer_init(void) +@@ -30,7 +30,6 @@ static void __init mediatek_timer_init(v if (of_machine_is_compatible("mediatek,mt6589") || of_machine_is_compatible("mediatek,mt7623") || @@ -26,7 +24,7 @@ index 6910b4e0d913..c3cf215773b2 100644 of_machine_is_compatible("mediatek,mt8135") || of_machine_is_compatible("mediatek,mt8127")) { /* turn on GPT6 which ungates arch timer clocks */ -@@ -50,7 +49,6 @@ static const char * const mediatek_board_dt_compat[] = { +@@ -50,7 +49,6 @@ static const char * const mediatek_board "mediatek,mt6589", "mediatek,mt6592", "mediatek,mt7623", @@ -34,11 +32,9 @@ index 6910b4e0d913..c3cf215773b2 100644 "mediatek,mt8127", "mediatek,mt8135", NULL, -diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c -index 6882ff07aaa6..51e85562098c 100644 --- a/arch/arm/mach-mediatek/platsmp.c +++ b/arch/arm/mach-mediatek/platsmp.c -@@ -60,7 +60,6 @@ static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = { +@@ -60,7 +60,6 @@ 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 }, { .compatible = "mediatek,mt7623", .data = &mtk_mt7623_boot }, @@ -46,6 +42,3 @@ index 6882ff07aaa6..51e85562098c 100644 {}, }; --- -2.21.0 - diff --git a/target/linux/mediatek/patches-4.19/0003-arm-mediatek-add-MT7629-smp-bring-up-code.patch b/target/linux/mediatek/patches-4.19/0003-arm-mediatek-add-MT7629-smp-bring-up-code.patch index 898488ef1e..73de655c5f 100644 --- a/target/linux/mediatek/patches-4.19/0003-arm-mediatek-add-MT7629-smp-bring-up-code.patch +++ b/target/linux/mediatek/patches-4.19/0003-arm-mediatek-add-MT7629-smp-bring-up-code.patch @@ -13,8 +13,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> arch/arm/mach-mediatek/platsmp.c | 1 + 3 files changed, 6 insertions(+) -diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig -index 91cc461f7b04..11ed264f0731 100644 --- a/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig @@ -26,6 +26,10 @@ config MACH_MT7623 @@ -28,11 +26,9 @@ index 91cc461f7b04..11ed264f0731 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 c3cf215773b2..b6a81ba1ce32 100644 --- a/arch/arm/mach-mediatek/mediatek.c +++ b/arch/arm/mach-mediatek/mediatek.c -@@ -49,6 +49,7 @@ static const char * const mediatek_board_dt_compat[] = { +@@ -49,6 +49,7 @@ static const char * const mediatek_board "mediatek,mt6589", "mediatek,mt6592", "mediatek,mt7623", @@ -40,11 +36,9 @@ index c3cf215773b2..b6a81ba1ce32 100644 "mediatek,mt8127", "mediatek,mt8135", NULL, -diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c -index 51e85562098c..c9d7c0458452 100644 --- a/arch/arm/mach-mediatek/platsmp.c +++ b/arch/arm/mach-mediatek/platsmp.c -@@ -60,6 +60,7 @@ static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = { +@@ -60,6 +60,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 }, { .compatible = "mediatek,mt7623", .data = &mtk_mt7623_boot }, @@ -52,6 +46,3 @@ index 51e85562098c..c9d7c0458452 100644 {}, }; --- -2.21.0 - diff --git a/target/linux/mediatek/patches-4.19/0004-clk-mediatek-add-clock-support-for-MT7629-SoC.patch b/target/linux/mediatek/patches-4.19/0004-clk-mediatek-add-clock-support-for-MT7629-SoC.patch index 87aa5a82ef..4944573591 100644 --- a/target/linux/mediatek/patches-4.19/0004-clk-mediatek-add-clock-support-for-MT7629-SoC.patch +++ b/target/linux/mediatek/patches-4.19/0004-clk-mediatek-add-clock-support-for-MT7629-SoC.patch @@ -22,8 +22,6 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org> create mode 100644 drivers/clk/mediatek/clk-mt7629.c create mode 100644 include/dt-bindings/clock/mt7629-clk.h -diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig -index 3dd1dab92223..53edade25a1d 100644 --- a/drivers/clk/mediatek/Kconfig +++ b/drivers/clk/mediatek/Kconfig @@ -178,6 +178,29 @@ config COMMON_CLK_MT7622_AUDSYS @@ -56,11 +54,9 @@ index 3dd1dab92223..53edade25a1d 100644 config COMMON_CLK_MT8135 bool "Clock driver for MediaTek MT8135" depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST -diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile -index 844b55d2770d..ee4410ff43ab 100644 --- a/drivers/clk/mediatek/Makefile +++ b/drivers/clk/mediatek/Makefile -@@ -26,5 +26,8 @@ obj-$(CONFIG_COMMON_CLK_MT7622) += clk-mt7622.o +@@ -26,5 +26,8 @@ obj-$(CONFIG_COMMON_CLK_MT7622) += clk-m obj-$(CONFIG_COMMON_CLK_MT7622_ETHSYS) += clk-mt7622-eth.o obj-$(CONFIG_COMMON_CLK_MT7622_HIFSYS) += clk-mt7622-hif.o obj-$(CONFIG_COMMON_CLK_MT7622_AUDSYS) += clk-mt7622-aud.o @@ -69,9 +65,6 @@ index 844b55d2770d..ee4410ff43ab 100644 +obj-$(CONFIG_COMMON_CLK_MT7629_HIFSYS) += clk-mt7629-hif.o obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o -diff --git a/drivers/clk/mediatek/clk-mt7629-eth.c b/drivers/clk/mediatek/clk-mt7629-eth.c -new file mode 100644 -index 000000000000..88279d0ea1a7 --- /dev/null +++ b/drivers/clk/mediatek/clk-mt7629-eth.c @@ -0,0 +1,159 @@ @@ -234,9 +227,6 @@ index 000000000000..88279d0ea1a7 +}; + +builtin_platform_driver(clk_mt7629_eth_drv); -diff --git a/drivers/clk/mediatek/clk-mt7629-hif.c b/drivers/clk/mediatek/clk-mt7629-hif.c -new file mode 100644 -index 000000000000..5c5b37207afb --- /dev/null +++ b/drivers/clk/mediatek/clk-mt7629-hif.c @@ -0,0 +1,156 @@ @@ -396,9 +386,6 @@ index 000000000000..5c5b37207afb +}; + +builtin_platform_driver(clk_mt7629_hif_drv); -diff --git a/drivers/clk/mediatek/clk-mt7629.c b/drivers/clk/mediatek/clk-mt7629.c -new file mode 100644 -index 000000000000..200ba147bbc6 --- /dev/null +++ b/drivers/clk/mediatek/clk-mt7629.c @@ -0,0 +1,723 @@ @@ -1125,9 +1112,6 @@ index 000000000000..200ba147bbc6 +} + +arch_initcall(clk_mt7629_init); -diff --git a/include/dt-bindings/clock/mt7629-clk.h b/include/dt-bindings/clock/mt7629-clk.h -new file mode 100644 -index 000000000000..ad8e6d7f0154 --- /dev/null +++ b/include/dt-bindings/clock/mt7629-clk.h @@ -0,0 +1,203 @@ @@ -1334,6 +1318,3 @@ index 000000000000..ad8e6d7f0154 +#define CLK_SGMII_NR_CLK 4 + +#endif /* _DT_BINDINGS_CLK_MT7629_H */ --- -2.21.0 - diff --git a/target/linux/mediatek/patches-4.19/0005-pinctrl-mediatek-sync-with-5.3.patch b/target/linux/mediatek/patches-4.19/0005-pinctrl-mediatek-sync-with-5.3.patch index 129b48dfce..56c2dcfdb7 100644 --- a/target/linux/mediatek/patches-4.19/0005-pinctrl-mediatek-sync-with-5.3.patch +++ b/target/linux/mediatek/patches-4.19/0005-pinctrl-mediatek-sync-with-5.3.patch @@ -53,8 +53,6 @@ a1a503a8c332 pinctrl: mediatek: add pinctrl-mtk-common-v2 for all MediaTek pinct 1c5fb66afa2a pinctrl: Include <linux/gpio/driver.h> nothing else 94f4e54cecaf pinctrl: Convert to using %pOFn instead of device_node.name -diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig -index 9905dc672f6b..26ed5dca1460 100644 --- a/drivers/pinctrl/mediatek/Kconfig +++ b/drivers/pinctrl/mediatek/Kconfig @@ -3,7 +3,8 @@ menu "MediaTek pinctrl drivers" @@ -113,7 +111,7 @@ index 9905dc672f6b..26ed5dca1460 100644 config PINCTRL_MT8135 bool "Mediatek MT8135 pin control" depends on MACH_MT8135 || COMPILE_TEST -@@ -45,15 +78,26 @@ config PINCTRL_MT2712 +@@ -45,21 +78,46 @@ config PINCTRL_MT2712 default ARM64 && ARCH_MEDIATEK select PINCTRL_MTK @@ -145,10 +143,11 @@ index 9905dc672f6b..26ed5dca1460 100644 config PINCTRL_MT8173 bool "Mediatek MT8173 pin control" -@@ -62,6 +106,20 @@ config PINCTRL_MT8173 + depends on OF + depends on ARM64 || COMPILE_TEST default ARM64 && ARCH_MEDIATEK - select PINCTRL_MTK - ++ select PINCTRL_MTK ++ +config PINCTRL_MT8183 + bool "Mediatek MT8183 pin control" + depends on OF @@ -161,13 +160,9 @@ index 9905dc672f6b..26ed5dca1460 100644 + depends on OF + depends on ARM64 || COMPILE_TEST + default ARM64 && ARCH_MEDIATEK -+ select PINCTRL_MTK -+ + select PINCTRL_MTK + # For PMIC - config PINCTRL_MT6397 - bool "Mediatek MT6397 pin control" -diff --git a/drivers/pinctrl/mediatek/Makefile b/drivers/pinctrl/mediatek/Makefile -index 3de7156df345..a74325abd877 100644 --- a/drivers/pinctrl/mediatek/Makefile +++ b/drivers/pinctrl/mediatek/Makefile @@ -2,12 +2,20 @@ @@ -191,8 +186,6 @@ index 3de7156df345..a74325abd877 100644 +obj-$(CONFIG_PINCTRL_MT8183) += pinctrl-mt8183.o +obj-$(CONFIG_PINCTRL_MT8516) += pinctrl-mt8516.o obj-$(CONFIG_PINCTRL_MT6397) += pinctrl-mt6397.o -diff --git a/drivers/pinctrl/mediatek/mtk-eint.c b/drivers/pinctrl/mediatek/mtk-eint.c -index a613e546717a..f464f8cd274b 100644 --- a/drivers/pinctrl/mediatek/mtk-eint.c +++ b/drivers/pinctrl/mediatek/mtk-eint.c @@ -11,7 +11,7 @@ @@ -204,11 +197,9 @@ index a613e546717a..f464f8cd274b 100644 #include <linux/io.h> #include <linux/irqchip/chained_irq.h> #include <linux/irqdomain.h> -diff --git a/drivers/pinctrl/mediatek/mtk-eint.h b/drivers/pinctrl/mediatek/mtk-eint.h -index c286a9b940f2..48468d0fae68 100644 --- a/drivers/pinctrl/mediatek/mtk-eint.h +++ b/drivers/pinctrl/mediatek/mtk-eint.h -@@ -92,13 +92,13 @@ static inline int mtk_eint_do_resume(struct mtk_eint *eint) +@@ -92,13 +92,13 @@ static inline int mtk_eint_do_resume(str return -EOPNOTSUPP; } @@ -224,9 +215,6 @@ index c286a9b940f2..48468d0fae68 100644 { return -EOPNOTSUPP; } -diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.c b/drivers/pinctrl/mediatek/pinctrl-moore.c -new file mode 100644 -index 000000000000..aa1068d2867f --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-moore.c @@ -0,0 +1,690 @@ @@ -920,9 +908,6 @@ index 000000000000..aa1068d2867f + + return 0; +} -diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.h b/drivers/pinctrl/mediatek/pinctrl-moore.h -new file mode 100644 -index 000000000000..e1b4b82b9d3d --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-moore.h @@ -0,0 +1,51 @@ @@ -977,9 +962,6 @@ index 000000000000..e1b4b82b9d3d + const struct mtk_pin_soc *soc); + +#endif /* __PINCTRL_MOORE_H */ -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt6765.c b/drivers/pinctrl/mediatek/pinctrl-mt6765.c -new file mode 100644 -index 000000000000..32451e8693be --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mt6765.c @@ -0,0 +1,1108 @@ @@ -2091,9 +2073,6 @@ index 000000000000..32451e8693be + return platform_driver_register(&mt6765_pinctrl_driver); +} +arch_initcall(mt6765_pinctrl_init); -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt6797.c b/drivers/pinctrl/mediatek/pinctrl-mt6797.c -new file mode 100644 -index 000000000000..adebe4333ed9 --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mt6797.c @@ -0,0 +1,82 @@ @@ -2179,8 +2158,6 @@ index 000000000000..adebe4333ed9 + return platform_driver_register(&mt6797_pinctrl_driver); +} +arch_initcall(mt6797_pinctrl_init); -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c -index 6f931b85701b..ce4a8a0cc19c 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c @@ -1,297 +1,140 @@ @@ -2266,14 +2243,14 @@ index 6f931b85701b..ce4a8a0cc19c 100644 - * @bitpos: the start bit relative to the register - * @next: the indication that the field would be extended to the - next register - */ +- */ -struct mtk_pin_field { - u32 offset; - u32 mask; - u8 bitpos; - u8 next; -}; - +- -/* struct mtk_pin_field_calc - the structure that holds the range providing - * the guide used to look up the relevant field - * @s_pin: the start pin within the range @@ -2293,19 +2270,18 @@ index 6f931b85701b..ce4a8a0cc19c 100644 - u8 s_bit; - u8 x_bits; -}; -+#include "pinctrl-moore.h" - +- -/* struct mtk_pin_reg_calc - the structure that holds all ranges used to - * determine which register the pin would make use of - * for certain pin attribute. - * @range: the start address for the range - * @nranges: the number of items in the range -- */ + */ -struct mtk_pin_reg_calc { - const struct mtk_pin_field_calc *range; - unsigned int nranges; -}; -- + -/* struct mtk_pin_soc - the structure that holds SoC-specific data */ -struct mtk_pin_soc { - const struct mtk_pin_reg_calc *reg_cal; @@ -2318,7 +2294,8 @@ index 6f931b85701b..ce4a8a0cc19c 100644 - const struct mtk_eint_regs *eint_regs; - const struct mtk_eint_hw *eint_hw; -}; -- ++#include "pinctrl-moore.h" + -struct mtk_pinctrl { - struct pinctrl_dev *pctrl; - void __iomem *base; @@ -2577,7 +2554,7 @@ index 6f931b85701b..ce4a8a0cc19c 100644 }; static const struct mtk_pin_reg_calc mt7622_reg_cals[PINCTRL_PIN_REG_MAX] = { -@@ -309,110 +152,110 @@ static const struct mtk_pin_reg_calc mt7622_reg_cals[PINCTRL_PIN_REG_MAX] = { +@@ -309,110 +152,110 @@ static const struct mtk_pin_reg_calc mt7 [PINCTRL_PIN_REG_RDSEL] = MTK_RANGE(mt7622_pin_rdsel_range), }; @@ -2792,7 +2769,7 @@ index 6f931b85701b..ce4a8a0cc19c 100644 }; /* List all groups consisting of these pins dedicated to the enablement of -@@ -906,18 +749,6 @@ static const struct function_desc mt7622_functions[] = { +@@ -906,18 +749,6 @@ static const struct function_desc mt7622 {"watchdog", mt7622_wdt_groups, ARRAY_SIZE(mt7622_wdt_groups)}, }; @@ -2811,12 +2788,22 @@ index 6f931b85701b..ce4a8a0cc19c 100644 static const struct mtk_eint_hw mt7622_eint_hw = { .port_mask = 7, .ports = 7, -@@ -934,830 +765,38 @@ static const struct mtk_pin_soc mt7622_data = { +@@ -934,830 +765,38 @@ static const struct mtk_pin_soc mt7622_d .funcs = mt7622_functions, .nfuncs = ARRAY_SIZE(mt7622_functions), .eint_hw = &mt7622_eint_hw, --}; -- ++ .gpio_m = 1, ++ .ies_present = false, ++ .base_names = mtk_default_register_base_names, ++ .nbase_names = ARRAY_SIZE(mtk_default_register_base_names), ++ .bias_disable_set = mtk_pinconf_bias_disable_set, ++ .bias_disable_get = mtk_pinconf_bias_disable_get, ++ .bias_set = mtk_pinconf_bias_set, ++ .bias_get = mtk_pinconf_bias_get, ++ .drive_set = mtk_pinconf_drive_set, ++ .drive_get = mtk_pinconf_drive_get, + }; + -static void mtk_w32(struct mtk_pinctrl *pctl, u32 reg, u32 val) -{ - writel_relaxed(val, pctl->base + reg); @@ -3549,18 +3536,6 @@ index 6f931b85701b..ce4a8a0cc19c 100644 - -static const struct of_device_id mtk_pinctrl_of_match[] = { - { .compatible = "mediatek,mt7622-pinctrl", .data = &mt7622_data}, -+ .gpio_m = 1, -+ .ies_present = false, -+ .base_names = mtk_default_register_base_names, -+ .nbase_names = ARRAY_SIZE(mtk_default_register_base_names), -+ .bias_disable_set = mtk_pinconf_bias_disable_set, -+ .bias_disable_get = mtk_pinconf_bias_disable_get, -+ .bias_set = mtk_pinconf_bias_set, -+ .bias_get = mtk_pinconf_bias_get, -+ .drive_set = mtk_pinconf_drive_set, -+ .drive_get = mtk_pinconf_drive_get, -+}; -+ +static const struct of_device_id mt7622_pinctrl_of_match[] = { + { .compatible = "mediatek,mt7622-pinctrl", }, { } @@ -3665,9 +3640,6 @@ index 6f931b85701b..ce4a8a0cc19c 100644 } -arch_initcall(mtk_pinctrl_init); +arch_initcall(mt7622_pinctrl_init); -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7623.c b/drivers/pinctrl/mediatek/pinctrl-mt7623.c -new file mode 100644 -index 000000000000..b8d9d31db74f --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mt7623.c @@ -0,0 +1,1441 @@ @@ -5112,9 +5084,6 @@ index 000000000000..b8d9d31db74f + return platform_driver_register(&mtk_pinctrl_driver); +} +arch_initcall(mtk_pinctrl_init); -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7629.c b/drivers/pinctrl/mediatek/pinctrl-mt7629.c -new file mode 100644 -index 000000000000..b5f0fa43245f --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mt7629.c @@ -0,0 +1,450 @@ @@ -5568,9 +5537,6 @@ index 000000000000..b5f0fa43245f + return platform_driver_register(&mt7629_pinctrl_driver); +} +arch_initcall(mt7629_pinctrl_init); -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8183.c b/drivers/pinctrl/mediatek/pinctrl-mt8183.c -new file mode 100644 -index 000000000000..9a74d5025be6 --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mt8183.c @@ -0,0 +1,595 @@ @@ -6169,9 +6135,6 @@ index 000000000000..9a74d5025be6 + return platform_driver_register(&mt8183_pinctrl_driver); +} +arch_initcall(mt8183_pinctrl_init); -diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8516.c b/drivers/pinctrl/mediatek/pinctrl-mt8516.c -new file mode 100644 -index 000000000000..b375426aa61e --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mt8516.c @@ -0,0 +1,362 @@ @@ -6537,9 +6500,6 @@ index 000000000000..b375426aa61e + return platform_driver_register(&mtk_pinctrl_driver); +} +arch_initcall(mtk_pinctrl_init); -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c -new file mode 100644 -index 000000000000..20e1c890e73b --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c @@ -0,0 +1,725 @@ @@ -7268,9 +7228,6 @@ index 000000000000..20e1c890e73b + + return 0; +} -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h -new file mode 100644 -index 000000000000..1b7da42aa1d5 --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h @@ -0,0 +1,302 @@ @@ -7576,11 +7533,9 @@ index 000000000000..1b7da42aa1d5 + const struct mtk_pin_desc *desc, u32 *val); + +#endif /* __PINCTRL_MTK_COMMON_V2_H */ -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -index 16ff56f93501..071623873ca5 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -@@ -514,8 +514,8 @@ static int mtk_pctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev, +@@ -514,8 +514,8 @@ static int mtk_pctrl_dt_subnode_to_map(s pins = of_find_property(node, "pinmux", NULL); if (!pins) { @@ -7591,9 +7546,6 @@ index 16ff56f93501..071623873ca5 100644 return -EINVAL; } -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt6765.h b/drivers/pinctrl/mediatek/pinctrl-mtk-mt6765.h -new file mode 100644 -index 000000000000..772563720461 --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt6765.h @@ -0,0 +1,1754 @@ @@ -9351,9 +9303,6 @@ index 000000000000..772563720461 +}; + +#endif /* __PINCTRL_MTK_MT6765_H */ -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt6797.h b/drivers/pinctrl/mediatek/pinctrl-mtk-mt6797.h -new file mode 100644 -index 000000000000..86ab78e80326 --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt6797.h @@ -0,0 +1,2429 @@ @@ -11786,9 +11735,6 @@ index 000000000000..86ab78e80326 +}; + +#endif /* __PINCTRL_MTK_MT6797_H */ -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt8183.h b/drivers/pinctrl/mediatek/pinctrl-mtk-mt8183.h -new file mode 100644 -index 000000000000..79adf5b8a186 --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt8183.h @@ -0,0 +1,1916 @@ @@ -13708,9 +13654,6 @@ index 000000000000..79adf5b8a186 +}; + +#endif /* __PINCTRL_MTK_MT8183_H */ -diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt8516.h b/drivers/pinctrl/mediatek/pinctrl-mtk-mt8516.h -new file mode 100644 -index 000000000000..f7a4c6e4a026 --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt8516.h @@ -0,0 +1,1182 @@ @@ -14896,9 +14839,6 @@ index 000000000000..f7a4c6e4a026 +}; + +#endif /* __PINCTRL_MTK_MT8516_H */ -diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c -new file mode 100644 -index 000000000000..923264d0e9ef --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -0,0 +1,947 @@ @@ -15849,9 +15789,6 @@ index 000000000000..923264d0e9ef + .suspend_noirq = mtk_paris_pinctrl_suspend, + .resume_noirq = mtk_paris_pinctrl_resume, +}; -diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.h b/drivers/pinctrl/mediatek/pinctrl-paris.h -new file mode 100644 -index 000000000000..3d43771074e6 --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-paris.h @@ -0,0 +1,65 @@ diff --git a/target/linux/mediatek/patches-4.19/0006-mtd-spi-nor-mtk-quadspi-add-SNOR_HWCAPS_READ-to-spi_.patch b/target/linux/mediatek/patches-4.19/0006-mtd-spi-nor-mtk-quadspi-add-SNOR_HWCAPS_READ-to-spi_.patch index 6164d68756..d0f74f3dcb 100644 --- a/target/linux/mediatek/patches-4.19/0006-mtd-spi-nor-mtk-quadspi-add-SNOR_HWCAPS_READ-to-spi_.patch +++ b/target/linux/mediatek/patches-4.19/0006-mtd-spi-nor-mtk-quadspi-add-SNOR_HWCAPS_READ-to-spi_.patch @@ -15,11 +15,9 @@ Signed-off-by: Boris Brezillon <bbrezillon@kernel.org> drivers/mtd/spi-nor/mtk-quadspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/drivers/mtd/spi-nor/mtk-quadspi.c b/drivers/mtd/spi-nor/mtk-quadspi.c -index 5442993b71ff..d9eed6844ba1 100644 --- a/drivers/mtd/spi-nor/mtk-quadspi.c +++ b/drivers/mtd/spi-nor/mtk-quadspi.c -@@ -431,7 +431,8 @@ static int mtk_nor_init(struct mtk_nor *mtk_nor, +@@ -431,7 +431,8 @@ static int mtk_nor_init(struct mtk_nor * struct device_node *flash_node) { const struct spi_nor_hwcaps hwcaps = { @@ -29,6 +27,3 @@ index 5442993b71ff..d9eed6844ba1 100644 SNOR_HWCAPS_READ_1_1_2 | SNOR_HWCAPS_PP, }; --- -2.21.0 - |