diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 58eee28f9..a1f646d84 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,13 +6,13 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-4.9 = .214 -LINUX_VERSION-4.14 = .171 -LINUX_VERSION-4.19 = .106 +LINUX_VERSION-4.9 = .212 +LINUX_VERSION-4.14 = .169 +LINUX_VERSION-4.19 = .101 -LINUX_KERNEL_HASH-4.9.214 = b47f093dac7034c7c4722e80042c05e4ef53c14a4f28aa992117a127d2b1e483 -LINUX_KERNEL_HASH-4.14.171 = 4fe02489e4b4a187eccf0ef87df6100534c9d485e76d876b1fa247c7635332a0 -LINUX_KERNEL_HASH-4.19.106 = 63c8bd76a9b282e18112f8ff9e3fd41e3d1df9f9b7248ea1a370b05a827e9cda +LINUX_KERNEL_HASH-4.9.212 = ade738a606c9b52ecf764e94b4e77116caa3a2b8abd30f4534d220ac6894be30 +LINUX_KERNEL_HASH-4.14.169 = d88ea97993c56b1fa0b0a05061bcde476c6be4fc3bb2de8bd97a8f8ff7278249 +LINUX_KERNEL_HASH-4.19.101 = be26156abdb38ac0576a34a235ef456bb8ca67fbbe56fc6649b8d069159f8bc4 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/ar71xx/patches-4.14/450-gpio-nxp-74hc153-gpio-chip-driver.patch b/target/linux/ar71xx/patches-4.14/450-gpio-nxp-74hc153-gpio-chip-driver.patch index 48a36cc4e..0902773ff 100644 --- a/target/linux/ar71xx/patches-4.14/450-gpio-nxp-74hc153-gpio-chip-driver.patch +++ b/target/linux/ar71xx/patches-4.14/450-gpio-nxp-74hc153-gpio-chip-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -1300,4 +1300,12 @@ config GPIO_VIPERBOARD +@@ -1299,4 +1299,12 @@ config GPIO_VIPERBOARD endmenu diff --git a/target/linux/ar71xx/patches-4.14/451-gpio-74x164-improve-platform-device-support.patch b/target/linux/ar71xx/patches-4.14/451-gpio-74x164-improve-platform-device-support.patch index b3c990cce..8039a7168 100644 --- a/target/linux/ar71xx/patches-4.14/451-gpio-74x164-improve-platform-device-support.patch +++ b/target/linux/ar71xx/patches-4.14/451-gpio-74x164-improve-platform-device-support.patch @@ -109,7 +109,7 @@ +#endif --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -1252,7 +1252,6 @@ menu "SPI GPIO expanders" +@@ -1251,7 +1251,6 @@ menu "SPI GPIO expanders" config GPIO_74X164 tristate "74x164 serial-in/parallel-out 8-bits shift register" diff --git a/target/linux/ar71xx/patches-4.14/452-gpio-add-gpio-latch-driver.patch b/target/linux/ar71xx/patches-4.14/452-gpio-add-gpio-latch-driver.patch index 98e9123ce..13c5781de 100644 --- a/target/linux/ar71xx/patches-4.14/452-gpio-add-gpio-latch-driver.patch +++ b/target/linux/ar71xx/patches-4.14/452-gpio-add-gpio-latch-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -1307,4 +1307,9 @@ config GPIO_NXP_74HC153 +@@ -1306,4 +1306,9 @@ config GPIO_NXP_74HC153 Platform driver for NXP 74HC153 Dual 4-input Multiplexer. This provides a GPIO interface supporting input mode only. diff --git a/target/linux/ar71xx/patches-4.14/525-MIPS-ath79-enable-qca-usb-quirks.patch b/target/linux/ar71xx/patches-4.14/525-MIPS-ath79-enable-qca-usb-quirks.patch index 3cafbe290..0e33674ad 100644 --- a/target/linux/ar71xx/patches-4.14/525-MIPS-ath79-enable-qca-usb-quirks.patch +++ b/target/linux/ar71xx/patches-4.14/525-MIPS-ath79-enable-qca-usb-quirks.patch @@ -77,7 +77,7 @@ + + switch (pdev->id) { + case 0: -+ base = 0x18116d94; ++ base = 0x18116c94; + break; + + case 1: diff --git a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch index 6c216712b..f2732ebb2 100644 --- a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch @@ -831,7 +831,7 @@ * No flags defined yet. --- a/net/core/utils.c +++ b/net/core/utils.c -@@ -441,8 +441,14 @@ void inet_proto_csum_replace16(__sum16 * +@@ -424,8 +424,14 @@ void inet_proto_csum_replace16(__sum16 * bool pseudohdr) { __be32 diff[] = { diff --git a/target/linux/ar71xx/patches-4.14/953-qca955x-pci-reset-fixes.patch b/target/linux/ar71xx/patches-4.14/953-qca955x-pci-reset-fixes.patch deleted file mode 100644 index 0acca2a08..000000000 --- a/target/linux/ar71xx/patches-4.14/953-qca955x-pci-reset-fixes.patch +++ /dev/null @@ -1,120 +0,0 @@ ---- a/arch/mips/ath79/common.c -+++ b/arch/mips/ath79/common.c -@@ -153,6 +153,24 @@ void ath79_device_reset_clear(u32 mask) - } - EXPORT_SYMBOL_GPL(ath79_device_reset_clear); - -+void ath79_device_reset2_clear(u32 mask) -+{ -+ unsigned long flags; -+ u32 reg; -+ u32 t; -+ -+ if (soc_is_qca955x()) -+ reg = QCA955X_RESET_REG_RESET2_MODULE; -+ else -+ panic("Reset register not defined for this SOC"); -+ -+ spin_lock_irqsave(&ath79_device_reset_lock, flags); -+ t = ath79_reset_rr(reg); -+ ath79_reset_wr(reg, t & ~mask); -+ spin_unlock_irqrestore(&ath79_device_reset_lock, flags); -+} -+EXPORT_SYMBOL_GPL(ath79_device_reset2_clear); -+ - u32 ath79_device_reset_get(u32 mask) - { - unsigned long flags; ---- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -@@ -411,6 +411,7 @@ - #define QCA955X_PLL_CPU_CONFIG_REG 0x00 - #define QCA955X_PLL_DDR_CONFIG_REG 0x04 - #define QCA955X_PLL_CLK_CTRL_REG 0x08 -+#define QCA955X_PLL_PCIE_CONFIG_REG 0x0c - #define QCA955X_PLL_ETH_XMII_CONTROL_REG 0x28 - #define QCA955X_PLL_ETH_SGMII_CONTROL_REG 0x48 - #define QCA955X_PLL_ETH_SGMII_SERDES_REG 0x4c -@@ -565,6 +566,7 @@ - #define QCA953X_RESET_REG_PCIE_WMAC_INT_STATUS 0xac - - #define QCA955X_RESET_REG_RESET_MODULE 0x1c -+#define QCA955X_RESET_REG_RESET2_MODULE 0xc4 - #define QCA955X_RESET_REG_BOOTSTRAP 0xb0 - #define QCA955X_RESET_REG_EXT_INT_STATUS 0xac - ---- a/arch/mips/include/asm/mach-ath79/ath79.h -+++ b/arch/mips/include/asm/mach-ath79/ath79.h -@@ -178,6 +178,7 @@ static inline u32 ath79_reset_rr(unsigne - - void ath79_device_reset_set(u32 mask); - void ath79_device_reset_clear(u32 mask); -+void ath79_device_reset2_clear(u32 mask); - u32 ath79_device_reset_get(u32 mask); - - void ath79_cpu_irq_init(unsigned irq_wb_chan2, unsigned irq_wb_chan3); ---- a/arch/mips/pci/pci-ar724x.c -+++ b/arch/mips/pci/pci-ar724x.c -@@ -335,18 +335,37 @@ static void ar724x_pci_hw_init(struct ar - int wait = 0; - - /* deassert PCIe host controller and PCIe PHY reset */ -- ath79_device_reset_clear(AR724X_RESET_PCIE); -- ath79_device_reset_clear(AR724X_RESET_PCIE_PHY); -+ if (soc_is_qca955x()) { -+ ath79_device_reset_clear(QCA955X_RESET_PCIE); -+ mdelay(10); -+ ath79_device_reset_clear(QCA955X_RESET_PCIE_PHY); -+ mdelay(10); -+ ath79_device_reset2_clear(QCA955X_RESET_PCIE); -+ mdelay(10); -+ ath79_device_reset2_clear(QCA955X_RESET_PCIE_PHY); -+ mdelay(10); -+ } else { -+ ath79_device_reset_clear(AR724X_RESET_PCIE); -+ ath79_device_reset_clear(AR724X_RESET_PCIE_PHY); -+ } - - /* remove the reset of the PCIE PLL */ -- ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG); -- ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_RESET; -- ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl); -+ if (!soc_is_qca955x()) { -+ ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG); -+ ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_RESET; -+ ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl); -+ } - - /* deassert bypass for the PCIE PLL */ -- ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG); -- ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_BYPASS; -- ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl); -+ if (soc_is_qca955x()) { -+ ppl = ath79_pll_rr(QCA955X_PLL_PCIE_CONFIG_REG); -+ ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_BYPASS; -+ ath79_pll_wr(QCA955X_PLL_PCIE_CONFIG_REG, ppl); -+ } else { -+ ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG); -+ ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_BYPASS; -+ ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl); -+ } - - /* set PCIE Application Control to ready */ - app = __raw_readl(apc->ctrl_base + AR724X_PCI_REG_APP); -@@ -422,8 +441,14 @@ static int ar724x_pci_probe(struct platf - * Do the full PCIE Root Complex Initialization Sequence if the PCIe - * host controller is in reset. - */ -- if (ath79_reset_rr(AR724X_RESET_REG_RESET_MODULE) & AR724X_RESET_PCIE) -- ar724x_pci_hw_init(apc); -+ if (soc_is_qca955x()) { -+ if (ath79_reset_rr(QCA955X_RESET_REG_RESET_MODULE) & QCA955X_RESET_PCIE || -+ ath79_reset_rr(QCA955X_RESET_REG_RESET2_MODULE) & QCA955X_RESET_PCIE) -+ ar724x_pci_hw_init(apc); -+ } else { -+ if (ath79_reset_rr(AR724X_RESET_REG_RESET_MODULE) & AR724X_RESET_PCIE) -+ ar724x_pci_hw_init(apc); -+ } - - apc->link_up = ar724x_pci_check_link(apc); - if (!apc->link_up) diff --git a/target/linux/ar71xx/patches-4.14/955-qca953x-fix-potential-missing-irq-dispatch.patch b/target/linux/ar71xx/patches-4.14/955-qca953x-fix-potential-missing-irq-dispatch.patch deleted file mode 100644 index 517402998..000000000 --- a/target/linux/ar71xx/patches-4.14/955-qca953x-fix-potential-missing-irq-dispatch.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/arch/mips/ath79/irq.c -+++ b/arch/mips/ath79/irq.c -@@ -69,15 +69,21 @@ static void qca953x_ip2_irq_dispatch(str - u32 status; - - status = ath79_reset_rr(QCA953X_RESET_REG_PCIE_WMAC_INT_STATUS); -+ status &= QCA953X_PCIE_WMAC_INT_PCIE_ALL | QCA953X_PCIE_WMAC_INT_WMAC_ALL; -+ -+ if (status == 0) { -+ spurious_interrupt(); -+ return; -+ } - - if (status & QCA953X_PCIE_WMAC_INT_PCIE_ALL) { - ath79_ddr_wb_flush(3); - generic_handle_irq(ATH79_IP2_IRQ(0)); -- } else if (status & QCA953X_PCIE_WMAC_INT_WMAC_ALL) { -+ } -+ -+ if (status & QCA953X_PCIE_WMAC_INT_WMAC_ALL) { - ath79_ddr_wb_flush(4); - generic_handle_irq(ATH79_IP2_IRQ(1)); -- } else { -- spurious_interrupt(); - } - } - diff --git a/target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch b/target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch index c9008adc1..30d7b2f6b 100644 --- a/target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch +++ b/target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -1215,4 +1215,12 @@ config GPIO_VIPERBOARD +@@ -1214,4 +1214,12 @@ config GPIO_VIPERBOARD endmenu diff --git a/target/linux/ar71xx/patches-4.9/451-gpio-74x164-improve-platform-device-support.patch b/target/linux/ar71xx/patches-4.9/451-gpio-74x164-improve-platform-device-support.patch index 11a2196cf..87cdcc8d0 100644 --- a/target/linux/ar71xx/patches-4.9/451-gpio-74x164-improve-platform-device-support.patch +++ b/target/linux/ar71xx/patches-4.9/451-gpio-74x164-improve-platform-device-support.patch @@ -109,7 +109,7 @@ +#endif --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -1156,7 +1156,6 @@ menu "SPI GPIO expanders" +@@ -1155,7 +1155,6 @@ menu "SPI GPIO expanders" config GPIO_74X164 tristate "74x164 serial-in/parallel-out 8-bits shift register" diff --git a/target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch b/target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch index 98a4885d0..feb5ab43a 100644 --- a/target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch +++ b/target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -1222,4 +1222,9 @@ config GPIO_NXP_74HC153 +@@ -1221,4 +1221,9 @@ config GPIO_NXP_74HC153 Platform driver for NXP 74HC153 Dual 4-input Multiplexer. This provides a GPIO interface supporting input mode only. diff --git a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch index 37aaf92e6..5e03ad321 100644 --- a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch @@ -869,7 +869,7 @@ * No flags defined yet. --- a/net/core/utils.c +++ b/net/core/utils.c -@@ -338,8 +338,14 @@ void inet_proto_csum_replace16(__sum16 * +@@ -321,8 +321,14 @@ void inet_proto_csum_replace16(__sum16 * bool pseudohdr) { __be32 diff[] = { diff --git a/target/linux/ath25/patches-4.14/130-watchdog.patch b/target/linux/ath25/patches-4.14/130-watchdog.patch index 01904d69a..890d7ad49 100644 --- a/target/linux/ath25/patches-4.14/130-watchdog.patch +++ b/target/linux/ath25/patches-4.14/130-watchdog.patch @@ -212,7 +212,7 @@ +MODULE_ALIAS("platform:" DRIVER_NAME); --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig -@@ -1647,6 +1647,13 @@ config PIC32_DMT +@@ -1646,6 +1646,13 @@ config PIC32_DMT To compile this driver as a loadable module, choose M here. The module will be called pic32-dmt. diff --git a/target/linux/ath79/config-4.19 b/target/linux/ath79/config-4.19 index d92da1fbe..be5e46ac7 100644 --- a/target/linux/ath79/config-4.19 +++ b/target/linux/ath79/config-4.19 @@ -211,7 +211,6 @@ CONFIG_SERIAL_AR933X_CONSOLE=y CONFIG_SERIAL_AR933X_NR_UARTS=2 CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SPI=y -CONFIG_SPI_AR934X=y CONFIG_SPI_ATH79=y CONFIG_SPI_BITBANG=y CONFIG_SPI_GPIO=y diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700-v2.dts b/target/linux/ath79/dts/ar7161_netgear_wndr3700-v2.dts index 96573bdf1..f3d27f2bd 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndr3700-v2.dts +++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700-v2.dts @@ -18,6 +18,7 @@ partition@50000 { label = "u-boot-env"; reg = <0x050000 0x020000>; + read-only; }; partition@70000 { diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dts b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dts index 75c68d83c..ac6f2362e 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dts +++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dts @@ -18,6 +18,7 @@ partition@50000 { label = "u-boot-env"; reg = <0x050000 0x020000>; + read-only; }; partition@70000 { diff --git a/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts b/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts deleted file mode 100644 index 8e0a80cb3..000000000 --- a/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts +++ /dev/null @@ -1,186 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "ar7100.dtsi" - -/ { - compatible = "siemens,ws-ap3610", "qca,ar7161"; - model = "Siemens WS-AP3610"; - - chosen { - bootargs = "console=ttyS0,115200"; - }; - - aliases { - led-boot = &led_power_green; - led-failsafe = &led_power_red; - led-running = &led_power_green; - led-upgrade = &led_power_red; - label-mac-device = ð0; - }; - - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - - leds { - compatible = "gpio-leds"; - - led_power_green: led_power_green { - label = "ws-ap3610:green:power"; - gpios = <&gpio 7 GPIO_ACTIVE_LOW>; - }; - - led_power_red: led_power_red { - label = "ws-ap3610:red:power"; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - }; - - led_wlan5_blue { - label = "ws-ap3610:blue:wlan5"; - gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - - led_wlan5_green { - label = "ws-ap3610:green:wlan5"; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - }; - - led_wlan2_blue { - label = "ws-ap3610:blue:wlan2"; - gpios = <&gpio 4 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy1tpt"; - }; - - led_wlan2_green { - label = "ws-ap3610:green:wlan2"; - gpios = <&gpio 5 GPIO_ACTIVE_LOW>; - }; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - linux,code = ; - gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&pcie0 { - status = "okay"; -}; - -&uart { - status = "okay"; -}; - -&mdio0 { - status = "okay"; - - phy0: ethernet-phy@0 { - /* - * When the compatible-is missing, PHY autodetection - * is performed, but the PHY-ID reads all 0xff. - * - * Linux does not create the device in this case, - * and the reset is never even de-asserted. - */ - compatible = "ethernet-phy-id0143.bca2", - "ethernet-phy-ieee802.3-c22"; - reg = <0>; - - resets = <&rst 8>; - reset-names = "phy"; - reset-assert-us = <10000>; - reset-deassert-us = <10000>; - }; -}; - -ð0 { - status = "okay"; - - phy-mode = "rgmii-id"; - phy-handle = <&phy0>; -}; - -&spi { - status = "okay"; - - num-cs = <1>; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x40000>; - read-only; - }; - - partition@40000 { - label = "u-boot-bak"; - reg = <0x40000 0x40000>; - read-only; - }; - - partition@80000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x80000 0xe00000>; - }; - - partition@e80000 { - label = "cfg1"; - reg = <0xe80000 0x40000>; - read-only; - }; - - partition@ec0000 { - label = "cfg2"; - reg = <0xec0000 0x40000>; - read-only; - }; - - partition@f00000 { - label = "nvram1"; - reg = <0xf00000 0x40000>; - read-only; - }; - - partition@f40000 { - label = "nvram2"; - reg = <0xf40000 0x40000>; - read-only; - }; - - partition@f80000 { - label = "rsvd1"; - reg = <0xf80000 0x40000>; - read-only; - }; - - partition@fc0000 { - label = "rsvd2"; - reg = <0xfc0000 0x40000>; - read-only; - }; - }; - }; -}; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi deleted file mode 100644 index ac5a4d5ee..000000000 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include "ar7240_tplink.dtsi" - -&leds { - lan { - label = "tp-link:green:lan"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - }; -}; - -ð1 { - mtd-mac-address = <&uboot 0x1fc00>; -}; - -&ath9k { - compatible = "pci168c,002a"; -}; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa701nd-v1.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wa701nd-v1.dts deleted file mode 100644 index 6dd50018b..000000000 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wa701nd-v1.dts +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar7240_tplink_tl-wa.dtsi" - -/ { - model = "TP-Link TL-WA701ND v1"; - compatible = "tplink,tl-wa701nd-v1", "qca,ar7240"; -}; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa730re-v1.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wa730re-v1.dts deleted file mode 100644 index e1277a812..000000000 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wa730re-v1.dts +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar7240_tplink_tl-wa.dtsi" - -/ { - model = "TP-Link TL-WA730RE v1"; - compatible = "tplink,tl-wa730re-v1", "qca,ar7240"; -}; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa801nd-v1.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wa801nd-v1.dts deleted file mode 100644 index 2db22c0e2..000000000 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wa801nd-v1.dts +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar7240_tplink_tl-wa.dtsi" - -/ { - model = "TP-Link TL-WA801ND v1"; - compatible = "tplink,tl-wa801nd-v1", "qca,ar7240"; -}; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa830re-v1.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wa830re-v1.dts deleted file mode 100644 index f74ddc04e..000000000 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wa830re-v1.dts +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar7240_tplink_tl-wa.dtsi" - -/ { - model = "TP-Link TL-WA830RE v1"; - compatible = "tplink,tl-wa830re-v1", "qca,ar7240"; -}; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa901nd-v1.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wa901nd-v1.dts deleted file mode 100644 index 5422e5c60..000000000 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wa901nd-v1.dts +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar7240_tplink_tl-wa.dtsi" - -/ { - model = "TP-Link TL-WA901ND v1"; - compatible = "tplink,tl-wa901nd-v1", "qca,ar7240"; -}; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi deleted file mode 100644 index 7621b1d53..000000000 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include "ar7240_tplink.dtsi" - -&leds { - lan1 { - label = "tp-link:green:lan1"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - }; - - lan2 { - label = "tp-link:green:lan2"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - }; - - lan3 { - label = "tp-link:green:lan3"; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - }; - - lan4 { - label = "tp-link:green:lan4"; - gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - }; - - wan { - label = "tp-link:green:wan"; - gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - }; -}; - -ð0 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; -}; - -ð1 { - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; -}; - -&ath9k { - compatible = "pci168c,002b"; -}; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v1.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v1.dts index c49272bcb..be18fdd05 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v1.dts +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v1.dts @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "ar7240_tplink_tl-wr.dtsi" +#include "ar7240_tplink_tl-wr74xn-v1.dtsi" / { model = "TP-Link TL-WR740N v1/v2"; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v3.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v3.dts index 23867a252..d0addda44 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v3.dts +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v3.dts @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "ar7240_tplink_tl-wr.dtsi" +#include "ar7240_tplink_tl-wr74xn-v1.dtsi" / { model = "TP-Link TL-WR740N v3"; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr741-v1.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr741-v1.dts index 38d7f2af6..af9c90755 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr741-v1.dts +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr741-v1.dts @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "ar7240_tplink_tl-wr.dtsi" +#include "ar7240_tplink_tl-wr74xn-v1.dtsi" / { model = "TP-Link TL-WR741N/ND v1/v2"; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr743nd-v1.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr743nd-v1.dts index 6cfaa9905..2c55dff97 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr743nd-v1.dts +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr743nd-v1.dts @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "ar7240_tplink_tl-wr.dtsi" +#include "ar7240_tplink_tl-wr74xn-v1.dtsi" / { model = "TP-Link TL-WR743ND v1"; diff --git a/target/linux/ath79/dts/ar7240_tplink.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi similarity index 71% rename from target/linux/ath79/dts/ar7240_tplink.dtsi rename to target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi index de0b36bbf..147fcad66 100644 --- a/target/linux/ath79/dts/ar7240_tplink.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi @@ -32,11 +32,10 @@ }; }; - leds: leds { + leds { compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&pinmux_switch_led_pins>; + pinctrl-0 = <&switch_led_pins>; led_system: system { label = "tp-link:green:system"; @@ -47,6 +46,31 @@ label = "tp-link:green:qss"; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; + + lan1 { + label = "tp-link:green:lan1"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + lan2 { + label = "tp-link:green:lan2"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + lan3 { + label = "tp-link:green:lan3"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + lan4 { + label = "tp-link:green:lan4"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "tp-link:green:wan"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; }; ath9k-leds { @@ -81,7 +105,7 @@ read-only; }; - partition@20000 { + firmware: partition@20000 { compatible = "tplink,firmware"; reg = <0x20000 0x3d0000>; label = "firmware"; @@ -96,14 +120,25 @@ }; }; +ð0 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <(-1)>; +}; + ð1 { status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <1>; }; &pcie { status = "okay"; ath9k: wifi@0,0 { + compatible = "pci168c,002b"; reg = <0x0000 0 0 0 0>; qca,no-eeprom; mtd-mac-address = <&uboot 0x1fc00>; @@ -113,7 +148,7 @@ }; &pinmux { - pinmux_switch_led_pins: switch_led_pins { + switch_led_pins: pinmux_switch_led_pins { pinctrl-single,bits = <0x0 0x0 0xf8>; }; }; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr841-v5.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr841-v5.dts index c030342d2..e881821d6 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr841-v5.dts +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr841-v5.dts @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "ar7240_tplink_tl-wr.dtsi" +#include "ar7240_tplink_tl-wr74xn-v1.dtsi" / { model = "TP-Link TL-WR841N/ND v5/v6"; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr941-v4.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr941-v4.dts index c8fe835e7..8d844d54f 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr941-v4.dts +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr941-v4.dts @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "ar7240_tplink_tl-wr.dtsi" +#include "ar7240_tplink_tl-wr74xn-v1.dtsi" / { model = "TP-Link TL-WR941N/ND v4"; diff --git a/target/linux/ath79/dts/ar7241_ubnt_nanostation-loco-m.dts b/target/linux/ath79/dts/ar7241_ubnt_nanostation-loco-m.dts deleted file mode 100644 index 386b7c707..000000000 --- a/target/linux/ath79/dts/ar7241_ubnt_nanostation-loco-m.dts +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar7241_ubnt_xm_outdoor.dtsi" - -/ { - compatible = "ubnt,nanostation-loco-m", "ubnt,xm", "qca,ar7241"; - model = "Ubiquiti Nanostation Loco M"; -}; - -ð1 { - compatible = "syscon", "simple-mfd"; -}; diff --git a/target/linux/ath79/dts/ar7241_ubnt_picostation-m.dts b/target/linux/ath79/dts/ar7241_ubnt_picostation-m.dts deleted file mode 100644 index e2376a1b9..000000000 --- a/target/linux/ath79/dts/ar7241_ubnt_picostation-m.dts +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar7241_ubnt_xm_outdoor.dtsi" - -/ { - compatible = "ubnt,picostation-m", "ubnt,xm", "qca,ar7241"; - model = "Ubiquiti Picostation M"; -}; - -ð1 { - compatible = "syscon", "simple-mfd"; -}; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts index 6542ce9e4..e55affdf2 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts @@ -113,12 +113,6 @@ phy12: ethernet-phy@c { reg = <0xc>; phy-mode = "mii"; - - resets = <&rst 8>; - reset-names = "phy"; - - reset-assert-us = <10000>; - reset-deassert-us = <10000>; }; }; diff --git a/target/linux/ath79/dts/ar9330.dtsi b/target/linux/ath79/dts/ar9330.dtsi index 8e52ae8fd..042b70e0b 100644 --- a/target/linux/ath79/dts/ar9330.dtsi +++ b/target/linux/ath79/dts/ar9330.dtsi @@ -119,10 +119,11 @@ }; spi: spi@1f000000 { - compatible = "qca,ar934x-spi"; - reg = <0x1f000000 0x1c>; + compatible = "qca,ar7100-spi"; + reg = <0x1f000000 0x10>; clocks = <&pll ATH79_CLK_AHB>; + clock-names = "ahb"; #address-cells = <1>; #size-cells = <0>; diff --git a/target/linux/ath79/dts/ar9341_tplink.dtsi b/target/linux/ath79/dts/ar9341_tplink.dtsi index 6bd7c3409..0a950bd1a 100644 --- a/target/linux/ath79/dts/ar9341_tplink.dtsi +++ b/target/linux/ath79/dts/ar9341_tplink.dtsi @@ -18,6 +18,9 @@ keys: keys { compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins>; + rfkill { label = "WiFi"; linux,code = ; @@ -82,14 +85,7 @@ }; &gpio { - pinctrl-names = "default"; - pinctrl-0 = <&jtag_disable_pins &pmx_usb_power>; -}; - -&pinmux { - pmx_usb_power: usb_power { - pinctrl-single,bits = <0x4 0x0 0xff>; - }; + status = "okay"; }; ð0 { diff --git a/target/linux/ath79/dts/ar9342_ubnt_bullet-m-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_bullet-m-xw.dts index a636ce727..b483fdddb 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_bullet-m-xw.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_bullet-m-xw.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; +#include +#include + #include "ar9342_ubnt_xw.dtsi" / { diff --git a/target/linux/ath79/dts/ar9342_ubnt_lap-120.dts b/target/linux/ath79/dts/ar9342_ubnt_lap-120.dts index 9ea607926..757654eae 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_lap-120.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_lap-120.dts @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 /dts-v1/; +#include + #include "ar9342_ubnt_wa.dtsi" / { diff --git a/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts b/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts index 3c7050753..d7eacf44d 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 /dts-v1/; +#include +#include + #include "ar9342_ubnt_wa.dtsi" / { diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanobeam-ac.dts b/target/linux/ath79/dts/ar9342_ubnt_nanobeam-ac.dts index 08c73ff36..30d054dfe 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanobeam-ac.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanobeam-ac.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 /dts-v1/; +#include +#include + #include "ar9342_ubnt_wa.dtsi" / { diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts index 1a3875570..89904721c 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 /dts-v1/; +#include +#include + #include "ar9342_ubnt_wa.dtsi" / { diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts index 0e3c6b5c9..97597e5f1 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 /dts-v1/; +#include +#include + #include "ar9342_ubnt_wa.dtsi" / { diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-loco-m-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-loco-m-xw.dts index fe28c14bb..8fb05eda2 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-loco-m-xw.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-loco-m-xw.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; +#include +#include + #include "ar9342_ubnt_xw.dtsi" / { @@ -16,7 +19,6 @@ phy1: ethernet-phy@1 { reg = <1>; phy-mode = "mii"; - reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts index 70758644d..7ca61fe27 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; +#include +#include + #include "ar9342_ubnt_xw.dtsi" / { diff --git a/target/linux/ath79/dts/ar9344_qihoo_c301.dts b/target/linux/ath79/dts/ar9344_qihoo_c301.dts index 46d1f4c4c..746c7f588 100644 --- a/target/linux/ath79/dts/ar9344_qihoo_c301.dts +++ b/target/linux/ath79/dts/ar9344_qihoo_c301.dts @@ -110,6 +110,7 @@ status = "okay"; num-cs = <2>; + cs-gpios= <0>, <0>; flash@0 { #address-cells = <1>; diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut955.dts b/target/linux/ath79/dts/ar9344_teltonika_rut955.dts deleted file mode 100644 index a8aeef0fa..000000000 --- a/target/linux/ath79/dts/ar9344_teltonika_rut955.dts +++ /dev/null @@ -1,346 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "ar9344.dtsi" - -/ { - model = "Teltonika RUT955"; - compatible = "teltonika,rut955", "qca,ar9344"; - - aliases { - serial0 = &uart; - serial1 = &hs_uart; - led-boot = &led_system_green; - led-failsafe = &led_system_red; - led-running = &led_system_green; - led-upgrade = &led_system_red; - label-mac-device = ð1; - }; - - i2c { - compatible = "i2c-gpio"; - scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; - sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; - #address-cells = <1>; - #size-cells = <0>; - - hwmon@4d { - compatible = "microchip,mcp3221"; - reg = <0x4d>; - }; - }; - - leds { - compatible = "gpio-leds"; - - signal1 { - label = "rut955:green:signal1"; - gpios = <&gpio_ext 0 GPIO_ACTIVE_HIGH>; - }; - - signal2 { - label = "rut955:green:signal2"; - gpios = <&gpio_ext 1 GPIO_ACTIVE_HIGH>; - }; - - signal3 { - label = "rut955:green:signal3"; - gpios = <&gpio_ext 2 GPIO_ACTIVE_HIGH>; - }; - - signal4 { - label = "rut955:green:signal4"; - gpios = <&gpio_ext 3 GPIO_ACTIVE_HIGH>; - }; - - signal5 { - label = "rut955:green:signal5"; - gpios = <&gpio_ext 4 GPIO_ACTIVE_HIGH>; - }; - - led_system_red: system_red { - label = "rut955:red:system"; - gpios = <&gpio_ext 5 GPIO_ACTIVE_HIGH>; - }; - - led_system_green: system_green { - label = "rut955:green:system"; - gpios = <&gpio_ext 6 GPIO_ACTIVE_HIGH>; - default-state = "on"; - }; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - linux,code = ; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; -}; - -&gpio { - pinctrl-names = "default"; - pinctrl-0 = <&jtag_disable_pins>; - - gpio-line-names = "RS485_D", "led_wan", "DIN3", "mmc_cs", - "ext_sck", "", "", "", - "", "", "", "", - "ext_mosi", "led_lan2", "led_lan1", "", - "i2c_scl", "i2c_sda", "", "DIN2", - "ext_cs", "DIN1", "led_lan3", "", - "", "", "", "", - "", "", "", ""; - - ext_sck { - gpio-hog; - gpios = <4 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "rut955:ext:sck"; - }; - - ext_mosi { - gpio-hog; - gpios = <12 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "rut955:ext:mosi"; - }; - - ext_cs { - gpio-hog; - gpios = <20 GPIO_ACTIVE_HIGH>; - output-low; - line-name = "rut955:ext:cs"; - }; - - mmc_cs { - gpio-hog; - gpios = <3 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "rut955:mmc:cs"; - }; - - uart1_td { - gpio-hog; - gpios = <18 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "rut955:uart1:td"; - }; - - uart1_rd { - gpio-hog; - gpios = <11 GPIO_ACTIVE_LOW>; - input; - line-name = "rut955:uart1:rd"; - }; - - led_wan { - gpio-hog; - gpios = <1 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "rut955:led:wan"; - }; - - led_lan2 { - gpio-hog; - gpios = <13 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "rut955:led:lan2"; - }; - - led_lan1 { - gpio-hog; - gpios = <14 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "rut955:led:lan1"; - }; - - led_lan3 { - gpio-hog; - gpios = <22 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "rut955:led:lan3"; - }; -}; - -&ref { - clock-frequency = <40000000>; -}; - -&uart { - status = "okay"; -}; - -&hs_uart { - status = "okay"; - - pinctrl-names = "default"; - pinctrl-0 = <&pmx_uart2>; - - rts-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; - rs485-rts-active-low; - linux,rs485-enabled-at-boot-time; -}; - -&spi { - status = "okay"; - - num-cs = <3>; - pinctrl-names = "default"; - pinctrl-0 = <&pmx_spi>; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x20000>; - read-only; - }; - - config: partition@20000 { - label = "config"; - reg = <0x20000 0x10000>; - read-only; - }; - - art: partition@30000 { - label = "art"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - label = "firmware"; - reg = <0x40000 0xf30000>; - compatible = "tplink,firmware"; - }; - - partition@f70000 { - label = "event-log"; - reg = <0xf70000 0x90000>; - read-only; - }; - }; - }; - - microsd@1 { - status = "disabled"; - - compatible = "mmc-spi-slot"; - spi-max-frequency = <25000000>; - reg = <1>; - voltage-ranges = <3200 3400>; - broken-cd; - }; - - gpio_ext: gpio_ext@2 { - compatible = "fairchild,74hc595"; - reg = <2>; - gpio-controller; - #gpio-cells = <2>; - registers-number = <2>; - spi-max-frequency = <10000000>; - gpio-line-names = "led_signal_bar1", "led_signal_bar2", "led_signal_bar3", "led_signal_bar4", - "led_signal_bar5", "led_status_red", "led_status_green", "sim_sel", - "DOUT1", "DOUT2", "modem_vbus", "modem_rst", - "DOUT3", "RS485_R", "SDCS", "HWRST"; - }; -}; - -&usb { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - port@1 { - #address-cells = <1>; - #size-cells = <0>; - reg = <1>; - - port@1 { - compatible = "usb-a-connector"; - reg = <1>; - }; - - port@3 { - label = "RS-232 serial adapter"; - reg = <3>; - }; - - port@4 { - label = "internal wwan modem"; - reg = <4>; - }; - }; -}; - -&usb_phy { - status = "okay"; -}; - -&wmac { - status = "okay"; - - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&config 0x0>; - mtd-mac-address-increment = <2>; -}; - -ð0 { - status = "okay"; - - phy-handle = <&swphy4>; - - mtd-mac-address = <&config 0x0>; - mtd-mac-address-increment = <1>; -}; - -ð1 { - status = "okay"; - - mtd-mac-address = <&config 0x0>; -}; - -&builtin_switch { - pinctrl-names = "default"; - pinctrl-0 = <&pmx_leds_switch>; -}; - -&pinmux { - pmx_spi: spi { - // SPI_CS1 on GPIO 3, 2nd SCK on GPIO 4 - // 2nd MOSI on GPIO 12, SPI_CS2 on GPIO 20 - pinctrl-single,bits = <0x0 0x07000000 0xff000000>, - <0x4 0x0a 0xff>, - <0xc 0x0b 0xff>, - <0x14 0x08 0xff>; - }; - - pmx_leds_switch: leds_switch { - // switch port LEDs on GPIO 1, GPIO 13, GPIO 14 and GPIO 22 - pinctrl-single,bits = <0x0 0x00002d00 0x0000ff00>, - <0xc 0x002c2b00 0x00ffff00>, - <0x14 0x002a0000 0x00ff0000>; - }; - - pmx_uart2: uart2 { - // UART1_DTR on GPIO 0, UART1_RD on GPIO 11, UART1_TD on GPIO 18 - pinctrl-single,bits = <0x0 0x0 0xff>, - <0x10 0x4f000000 0xff000000>, - <0x3c 0x000b0000 0x00ff0000>; - }; -}; diff --git a/target/linux/ath79/dts/ar934x.dtsi b/target/linux/ath79/dts/ar934x.dtsi index e8c21fb71..8cd0b4e08 100644 --- a/target/linux/ath79/dts/ar934x.dtsi +++ b/target/linux/ath79/dts/ar934x.dtsi @@ -133,19 +133,6 @@ #reset-cells = <1>; }; - - hs_uart: uart@18500000 { - compatible = "qca,ar9330-uart"; - reg = <0x18500000 0x14>; - - interrupts = <6>; - interrupt-parent = <&miscintc>; - - clocks = <&pll ATH79_CLK_UART1>; - clock-names = "uart"; - - status = "disabled"; - }; }; nand: nand@1b000200 { @@ -196,10 +183,11 @@ }; spi: spi@1f000000 { - compatible = "qca,ar934x-spi"; + compatible = "qca,ar9340-spi", "qca,ar7100-spi"; reg = <0x1f000000 0x1c>; clocks = <&pll ATH79_CLK_AHB>; + clock-names = "ahb"; #address-cells = <1>; #size-cells = <0>; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi index d769225fd..8b90f0205 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi @@ -1,4 +1,3 @@ - #include #include @@ -76,6 +75,7 @@ status = "okay"; num-cs = <2>; + cs-gpios = <0>, <0>; flash@0 { compatible = "jedec,spi-nor"; diff --git a/target/linux/ath79/dts/qca953x.dtsi b/target/linux/ath79/dts/qca953x.dtsi index e359badd2..73a6ad91e 100644 --- a/target/linux/ath79/dts/qca953x.dtsi +++ b/target/linux/ath79/dts/qca953x.dtsi @@ -201,10 +201,11 @@ }; spi: spi@1f000000 { - compatible = "qca,ar934x-spi"; - reg = <0x1f000000 0x1c>; + compatible = "qca,ar9530-spi", "qca,ar7100-spi"; + reg = <0x1f000000 0x10>; clocks = <&pll ATH79_CLK_AHB>; + clock-names = "ahb"; status = "disabled"; diff --git a/target/linux/ath79/dts/qca9557.dtsi b/target/linux/ath79/dts/qca9557.dtsi index 69ea63980..d5d3f0254 100644 --- a/target/linux/ath79/dts/qca9557.dtsi +++ b/target/linux/ath79/dts/qca9557.dtsi @@ -292,10 +292,11 @@ }; spi: spi@1f000000 { - compatible = "qca,ar934x-spi"; - reg = <0x1f000000 0x1c>; + compatible = "qca,ar9557-spi", "qca,ar7100-spi"; + reg = <0x1f000000 0x10>; clocks = <&pll ATH79_CLK_AHB>; + clock-names = "ahb"; status = "disabled"; diff --git a/target/linux/ath79/dts/qca9557_iodata_wn-ac1167dgr.dts b/target/linux/ath79/dts/qca9557_iodata_wn-ac1167dgr.dts index 3dd84f142..c2fc7abcb 100644 --- a/target/linux/ath79/dts/qca9557_iodata_wn-ac1167dgr.dts +++ b/target/linux/ath79/dts/qca9557_iodata_wn-ac1167dgr.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; +#include +#include + #include "qca9557_iodata_wn-ac-dgr.dtsi" / { diff --git a/target/linux/ath79/dts/qca9557_iodata_wn-ac1600dgr.dts b/target/linux/ath79/dts/qca9557_iodata_wn-ac1600dgr.dts index 12da5a24f..ef47e1e41 100644 --- a/target/linux/ath79/dts/qca9557_iodata_wn-ac1600dgr.dts +++ b/target/linux/ath79/dts/qca9557_iodata_wn-ac1600dgr.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; +#include +#include + #include "qca9557_iodata_wn-ac-dgr.dtsi" / { diff --git a/target/linux/ath79/dts/qca9557_iodata_wn-ac1600dgr2.dts b/target/linux/ath79/dts/qca9557_iodata_wn-ac1600dgr2.dts index 771e55b41..c8cde8b81 100644 --- a/target/linux/ath79/dts/qca9557_iodata_wn-ac1600dgr2.dts +++ b/target/linux/ath79/dts/qca9557_iodata_wn-ac1600dgr2.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; +#include +#include + #include "qca9557_iodata_wn-ac-dgr.dtsi" / { diff --git a/target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v1.dts b/target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v1.dts index c87e350e6..045806fa6 100644 --- a/target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v1.dts +++ b/target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v1.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; +#include +#include + #include "qca9558_comfast_cf-wr650ac.dtsi" / { diff --git a/target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v2.dts b/target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v2.dts index 47eb4063e..67ed1f886 100644 --- a/target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v2.dts +++ b/target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v2.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; +#include +#include + #include "qca9558_comfast_cf-wr650ac.dtsi" / { diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v2.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v2.dts index 21256ea16..f49f143d1 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v2.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v2.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; +#include +#include + #include "qca9558_tplink_tl-wr1043nd.dtsi" / { diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v3.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v3.dts index 7b1ca788f..5efa41721 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v3.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v3.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; +#include +#include + #include "qca9558_tplink_tl-wr1043nd.dtsi" / { diff --git a/target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts b/target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts index 01a8c2133..0152f62cd 100644 --- a/target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts +++ b/target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; +#include +#include + #include "qca9563_elecom_wrc-ghbk2-i.dtsi" / { diff --git a/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts b/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts index df926ebe3..7ebd15342 100644 --- a/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts +++ b/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; +#include +#include + #include "qca9563_elecom_wrc-ghbk2-i.dtsi" / { diff --git a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi index 8a00029c6..3e30a0fd0 100644 --- a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi +++ b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi @@ -75,6 +75,7 @@ status = "okay"; num-cs = <2>; + cs-gpios = <0>, <0>; flash_nor: flash@0 { compatible = "jedec,spi-nor"; diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi index 29b422536..bc06c5bd9 100644 --- a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi +++ b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi @@ -100,6 +100,7 @@ status = "okay"; num-cs = <2>; + cs-gpios = <0>, <0>; flash@0 { compatible = "jedec,spi-nor"; diff --git a/target/linux/ath79/dts/qca956x.dtsi b/target/linux/ath79/dts/qca956x.dtsi index d0ce952ef..03541b86f 100644 --- a/target/linux/ath79/dts/qca956x.dtsi +++ b/target/linux/ath79/dts/qca956x.dtsi @@ -215,10 +215,11 @@ }; spi: spi@1f000000 { - compatible = "qca,ar934x-spi"; - reg = <0x1f000000 0x1c>; + compatible = "qca,qca9560-spi", "qca,ar7100-spi"; + reg = <0x1f000000 0x10>; clocks = <&pll ATH79_CLK_AHB>; + clock-names = "ahb"; status = "disabled"; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts deleted file mode 100644 index 31f0c14af..000000000 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "tp9343_tplink_tl-wr94x.dtsi" - -/ { - compatible = "tplink,tl-wr940n-v6", "qca,tp9343"; - model = "TP-Link TL-WR940N v6"; - - aliases { - led-boot = &led_diag_orange; - led-failsafe = &led_diag_orange; - led-running = &led_diag_orange; - led-upgrade = &led_diag_orange; - }; - - leds { - compatible = "gpio-leds"; - - wan_blue { - label = "tp-link:blue:wan"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - }; - - led_diag_orange: diag_orange { - label = "tp-link:orange:diag"; - gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; - default-state = "on"; - }; - }; -}; - -ð1 { - mtd-mac-address = <&uboot 0x1fc00>; -}; diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index 2394ccc90..6123a26f2 100644 --- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -1214,22 +1214,14 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit) unsigned int offset = ag->rx_buf_offset; int ring_mask = BIT(ring->order) - 1; int ring_size = BIT(ring->order); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) - struct list_head rx_list; - struct sk_buff *next; -#else struct sk_buff_head queue; -#endif struct sk_buff *skb; int done = 0; DBG("%s: rx packets, limit=%d, curr=%u, dirty=%u\n", dev->name, limit, ring->curr, ring->dirty); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) - INIT_LIST_HEAD(&rx_list); -#else + skb_queue_head_init(&queue); -#endif while (done < limit) { unsigned int i = ring->curr & ring_mask; @@ -1271,11 +1263,7 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit) } else { skb->dev = dev; skb->ip_summed = CHECKSUM_NONE; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) - list_add_tail(&skb->list, &rx_list); -#else __skb_queue_tail(&queue, skb); -#endif } next: @@ -1287,16 +1275,10 @@ next: ag71xx_ring_rx_refill(ag); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) - list_for_each_entry_safe(skb, next, &rx_list, list) - skb->protocol = eth_type_trans(skb, dev); - netif_receive_skb_list(&rx_list); -#else while ((skb = __skb_dequeue(&queue)) != NULL) { skb->protocol = eth_type_trans(skb, dev); netif_receive_skb(skb); } -#endif DBG("%s: rx finish, curr=%u, dirty=%u, done=%d\n", dev->name, ring->curr, ring->dirty, done); diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 6668e15a7..55d677252 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -219,7 +219,6 @@ tplink,cpe510-v3) tplink,cpe610-v1|\ tplink,tl-wr902ac-v1) ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" - ucidef_set_led_netdev "internet" "Internet" "tp-link:green:internet" "eth0" ;; tplink,re355-v1|\ tplink,re450-v1|\ @@ -244,11 +243,9 @@ trendnet,tew-823dru) ;; ubnt,bullet-m|\ ubnt,bullet-m-xw|\ -ubnt,nanostation-loco-m|\ ubnt,nanostation-loco-m-xw|\ ubnt,nanostation-m|\ ubnt,nanostation-m-xw|\ -ubnt,picostation-m|\ ubnt,rocket-m) ucidef_set_rssimon "wlan0" "200000" "1" ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:red:link1" "wlan0" "1" "100" diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index ef58d9e12..a3fcf3571 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -30,7 +30,6 @@ ath79_setup_interfaces() pisen,ts-d084|\ pisen,wmb001n|\ pisen,wmm003n|\ - siemens,ws-ap3610|\ tplink,cpe210-v2|\ tplink,cpe210-v3|\ tplink,cpe510-v2|\ @@ -47,9 +46,7 @@ ath79_setup_interfaces() ubnt,litebeam-ac-gen2|\ ubnt,nanobeam-ac|\ ubnt,nanostation-ac-loco|\ - ubnt,nanostation-loco-m|\ ubnt,nanostation-loco-m-xw|\ - ubnt,picostation-m|\ ubnt,rocket-m|\ ubnt,unifiac-lite|\ ubnt,unifiac-lr|\ @@ -220,11 +217,6 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:lan" "3:wan" ;; - teltonika,rut955) - ucidef_set_interface_wan "eth1" - ucidef_add_switch "switch0" \ - "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" - ;; tplink,archer-a7-v5|\ tplink,archer-c6-v2|\ tplink,archer-c6-v2-us|\ @@ -433,9 +425,7 @@ ath79_setup_macs() ;; ubnt,airrouter|\ ubnt,bullet-m|\ - ubnt,nanostation-loco-m|\ ubnt,nanostation-m|\ - ubnt,picostation-m|\ ubnt,rocket-m|\ ubnt,unifi) label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) diff --git a/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches b/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches index b5b46f16b..967e2c768 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches @@ -38,14 +38,6 @@ dlink,dir-835-a1) librerouter,librerouter-v1) ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "1" "0" ;; -teltonika,rut955) - ucidef_add_gpio_switch "sim_sel" "SIM select" "503" "1" - ucidef_add_gpio_switch "DOUT1" "DOUT1 (OC)" "504" "0" - ucidef_add_gpio_switch "DOUT2" "DOUT2 (Relay)" "505" "0" - ucidef_add_gpio_switch "modem_vbus" "Modem enable" "506" "1" - ucidef_add_gpio_switch "modem_rst" "Modem reset" "507" "0" - ucidef_add_gpio_switch "DOUT3" "DOUT3" "508" "0" - ;; tplink,archer-c25-v1) ucidef_add_gpio_switch "led_control" "LED control" "21" "0" ucidef_add_gpio_switch "led_reset" "LED reset" "19" "1" diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 6ccdbafc7..b43146ca3 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -163,9 +163,7 @@ case "$FIRMWARE" in tplink,tl-wr842n-v1|\ ubnt,airrouter|\ ubnt,bullet-m|\ - ubnt,nanostation-loco-m|\ ubnt,nanostation-m|\ - ubnt,picostation-m|\ ubnt,rocket-m) ath9k_eeprom_extract "art" 0x1000 0x1000 ;; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index f814bd46a..8c8b7932b 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -34,9 +34,6 @@ case "$board" in [ "$PHYNBR" -eq 1 ] && \ k2t_get_mac "lan_mac" > /sys${DEVPATH}/macaddress ;; - siemens,ws-ap3610) - mtd_get_mac_ascii cfg1 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress - ;; trendnet,tew-823dru) # set the 2.4G interface mac address to LAN MAC [ "$PHYNBR" -eq 1 ] && \ diff --git a/target/linux/ath79/base-files/lib/functions/mikrotik-caldata.sh b/target/linux/ath79/generic/base-files/lib/functions/mikrotik-caldata.sh similarity index 100% rename from target/linux/ath79/base-files/lib/functions/mikrotik-caldata.sh rename to target/linux/ath79/generic/base-files/lib/functions/mikrotik-caldata.sh diff --git a/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh deleted file mode 100644 index a0fb9fc71..000000000 --- a/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh - -preinit_set_mac_address() { - case $(board_name) in - siemens,ws-ap3610) - ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr) - ;; - esac -} - -boot_hook_add preinit_main preinit_set_mac_address diff --git a/target/linux/ath79/generic/config-default b/target/linux/ath79/generic/config-default index 6cd1518e3..2d8f7f20c 100644 --- a/target/linux/ath79/generic/config-default +++ b/target/linux/ath79/generic/config-default @@ -1,5 +1,4 @@ CONFIG_AT803X_PHY=y -CONFIG_BROADCOM_PHY=y CONFIG_GPIO_WATCHDOG=y CONFIG_GPIO_WATCHDOG_ARCH_INITCALL=y CONFIG_INTEL_XWAY_PHY=y diff --git a/target/linux/ath79/generic/target.mk b/target/linux/ath79/generic/target.mk index 488aa6df1..15841ff2c 100644 --- a/target/linux/ath79/generic/target.mk +++ b/target/linux/ath79/generic/target.mk @@ -1,7 +1,7 @@ BOARDNAME:=Generic FEATURES += minor squashfs -DEFAULT_PACKAGES += wpad-basic +DEFAULT_PACKAGES += wpad define Target/Description Build firmware images for generic Atheros AR71xx/AR913x/AR934x based boards. diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk index 5b27390c1..cfc574e4f 100644 --- a/target/linux/ath79/image/common-tp-link.mk +++ b/target/linux/ath79/image/common-tp-link.mk @@ -11,7 +11,6 @@ endef define Device/tplink-v1 DEVICE_VENDOR := TP-Link - TPLINK_HWID := 0x0 TPLINK_HWREV := 0x1 TPLINK_HEADER_VERSION := 1 LOADER_TYPE := gz @@ -24,7 +23,6 @@ endef define Device/tplink-v2 DEVICE_VENDOR := TP-Link - TPLINK_HWID := 0x0 TPLINK_HWREV := 0x1 TPLINK_HWREVADD := 0x0 TPLINK_HVERSION := 3 @@ -76,10 +74,9 @@ endef define Device/tplink-safeloader $(Device/tplink-v1) - TPLINK_HWREV := 0x0 KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size $$$$(IMAGE_SIZE) IMAGE/factory.bin := append-rootfs | tplink-safeloader factory endef diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index 33a8ee3f4..2a2384762 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -320,6 +320,8 @@ define Device/tplink_re350k-v1 DEVICE_VARIANT := v1 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct TPLINK_BOARD_ID := RE350K-V1 + TPLINK_HWID := 0x0 + TPLINK_HWREV := 0 endef TARGET_DEVICES += tplink_re350k-v1 @@ -328,6 +330,8 @@ define Device/tplink_rex5x-v1 SOC := qca9558 IMAGE_SIZE := 6016k DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct + TPLINK_HWID := 0x0 + TPLINK_HWREV := 0 endef define Device/tplink_re355-v1 @@ -355,6 +359,8 @@ define Device/tplink_re450-v2 DEVICE_MODEL := RE450 DEVICE_VARIANT := v2 DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct + TPLINK_HWID := 0x0 + TPLINK_HWREV := 0 TPLINK_BOARD_ID := RE450-V2 LOADER_TYPE := elf endef @@ -579,6 +585,8 @@ define Device/tplink_tl-wr902ac-v1 -swconfig -uboot-envtools TPLINK_BOARD_ID := TL-WR902AC-V1 IMAGE_SIZE := 7360k + TPLINK_HWID := 0x0 + TPLINK_HWREV := 0 SUPPORTED_DEVICES += tl-wr902ac-v1 endef TARGET_DEVICES += tplink_tl-wr902ac-v1 diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index a4aff09fe..ffae83eda 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -179,14 +179,6 @@ define Device/ubnt_nanostation-ac-loco endef TARGET_DEVICES += ubnt_nanostation-ac-loco -define Device/ubnt_nanostation-loco-m - $(Device/ubnt-xm) - DEVICE_MODEL := Nanostation Loco M - DEVICE_PACKAGES += rssileds - SUPPORTED_DEVICES += bullet-m -endef -TARGET_DEVICES += ubnt_nanostation-loco-m - define Device/ubnt_nanostation-loco-m-xw $(Device/ubnt-xw) DEVICE_MODEL := Nanostation Loco M @@ -211,14 +203,6 @@ define Device/ubnt_nanostation-m-xw endef TARGET_DEVICES += ubnt_nanostation-m-xw -define Device/ubnt_picostation-m - $(Device/ubnt-xm) - DEVICE_MODEL := Picostation M - DEVICE_PACKAGES += rssileds - SUPPORTED_DEVICES += bullet-m -endef -TARGET_DEVICES += ubnt_picostation-m - define Device/ubnt_rocket-m $(Device/ubnt-xm) DEVICE_MODEL := Rocket-M diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 3c0aa2ee4..98ba520a5 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -36,11 +36,6 @@ define Build/addpattern -mv "$@.new" "$@" endef -define Build/append-md5sum-bin - $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | sed 's/../\\\\x&/g' |\ - xargs echo -ne >> $@ -endef - define Build/cybertan-trx @echo -n '' > $@-empty.bin -$(STAGING_DIR_HOST)/bin/trx -o $@.new \ @@ -78,17 +73,6 @@ define Build/pisen_wmb001n-factory rm -rf "$@.tmp" endef -define Build/teltonika-fw-fake-checksum - # Teltonika U-Boot web based firmware upgrade/recovery routine compares - # 16 bytes from md5sum1[16] field in TP-Link v1 header (offset: 76 bytes - # from begin of the firmware file) with 16 bytes stored just before - # 0xdeadc0de marker. Values are only compared, MD5 sum is not verified. - let \ - offs="$$(stat -c%s $@) - 20"; \ - dd if=$@ bs=1 count=16 skip=76 |\ - dd of=$@ bs=1 count=16 seek=$$offs conv=notrunc -endef - define Device/seama KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma KERNEL_INITRAMFS := $$(KERNEL) | seama @@ -174,7 +158,6 @@ define Device/avm_fritz300e append-squashfs-fakeroot-be | pad-to 256 | append-rootfs | pad-rootfs | \ append-metadata | check-size $$$$(IMAGE_SIZE) DEVICE_PACKAGES := fritz-tffs rssileds -swconfig - SUPPORTED_DEVICES += fritz300e endef TARGET_DEVICES += avm_fritz300e @@ -675,7 +658,7 @@ define Device/iodata_etg3-r DEVICE_VENDOR := I-O DATA DEVICE_MODEL := ETG3-R IMAGE_SIZE := 7680k - DEVICE_PACKAGES := -iwinfo -kmod-ath9k -wpad-basic + DEVICE_PACKAGES := -iwinfo -kmod-ath9k -wpad endef TARGET_DEVICES += iodata_etg3-r @@ -1057,21 +1040,6 @@ define Device/rosinson_wr818 endef TARGET_DEVICES += rosinson_wr818 -define Device/siemens_ws-ap3610 - SOC := ar7161 - DEVICE_VENDOR := Siemens - DEVICE_MODEL := WS-AP3610 - IMAGE_SIZE := 14336k - BLOCKSIZE := 256k - LOADER_TYPE := bin - LOADER_FLASH_OFFS := 0x82000 - COMPILE := loader-$(1).bin - COMPILE/loader-$(1).bin := loader-okli-compile - KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 8128 | uImage none - KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none -endef -TARGET_DEVICES += siemens_ws-ap3610 - define Device/sitecom_wlr-7100 SOC := ar1022 DEVICE_VENDOR := Sitecom @@ -1086,28 +1054,6 @@ define Device/sitecom_wlr-7100 endef TARGET_DEVICES += sitecom_wlr-7100 -define Device/teltonika_rut955 - SOC := ar9344 - DEVICE_VENDOR := Teltonika - DEVICE_MODEL := RUT955 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-acm kmod-usb-net-qmi-wwan \ - kmod-usb-serial-option kmod-hwmon-mcp3021 uqmi -uboot-envtools - IMAGE_SIZE := 15552k - TPLINK_HWID := 0x35000001 - TPLINK_HWREV := 0x1 - TPLINK_HEADER_VERSION := 1 - KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header - KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma - IMAGES += factory.bin - IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs |\ - pad-rootfs | teltonika-fw-fake-checksum | append-string master |\ - append-md5sum-bin | check-size $$$$(IMAGE_SIZE) - IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\ - append-rootfs | pad-rootfs | append-metadata |\ - check-size $$$$(IMAGE_SIZE) -endef -TARGET_DEVICES += teltonika_rut955 - define Device/trendnet_tew-823dru SOC := qca9558 DEVICE_VENDOR := Trendnet diff --git a/target/linux/ath79/image/tiny-tp-link.mk b/target/linux/ath79/image/tiny-tp-link.mk index 29fdfec1e..2107e47cc 100644 --- a/target/linux/ath79/image/tiny-tp-link.mk +++ b/target/linux/ath79/image/tiny-tp-link.mk @@ -66,46 +66,6 @@ define Device/tplink_tl-mr3420-v2 endef TARGET_DEVICES += tplink_tl-mr3420-v2 -define Device/tplink_tl-wa701nd-v1 - $(Device/tplink-4m) - SOC := ar7240 - DEVICE_MODEL := TL-WA701ND - DEVICE_VARIANT := v1 - TPLINK_HWID := 0x07010001 - SUPPORTED_DEVICES += tl-wa901nd -endef -TARGET_DEVICES += tplink_tl-wa701nd-v1 - -define Device/tplink_tl-wa730re-v1 - $(Device/tplink-4m) - SOC := ar7240 - DEVICE_MODEL := TL-WA730RE - DEVICE_VARIANT := v1 - TPLINK_HWID := 0x07300001 - SUPPORTED_DEVICES += tl-wa901nd -endef -TARGET_DEVICES += tplink_tl-wa730re-v1 - -define Device/tplink_tl-wa801nd-v1 - $(Device/tplink-4m) - SOC := ar7240 - DEVICE_MODEL := TL-WA801ND - DEVICE_VARIANT := v1 - TPLINK_HWID := 0x08010001 - SUPPORTED_DEVICES += tl-wa901nd -endef -TARGET_DEVICES += tplink_tl-wa801nd-v1 - -define Device/tplink_tl-wa830re-v1 - $(Device/tplink-4m) - SOC := ar7240 - DEVICE_MODEL := TL-WA830RE - DEVICE_VARIANT := v1 - TPLINK_HWID := 0x08300010 - SUPPORTED_DEVICES += tl-wa901nd -endef -TARGET_DEVICES += tplink_tl-wa830re-v1 - define Device/tplink_tl-wa850re-v1 $(Device/tplink-4mlzma) SOC := ar9341 @@ -125,21 +85,12 @@ define Device/tplink_tl-wa850re-v2 DEVICE_VARIANT := v2 TPLINK_BOARD_ID := TLWA850REV2 TPLINK_HWID := 0x08500002 + TPLINK_HWREV := 0x0 DEVICE_PACKAGES := rssileds SUPPORTED_DEVICES += tl-wa850re-v2 endef TARGET_DEVICES += tplink_tl-wa850re-v2 -define Device/tplink_tl-wa901nd-v1 - $(Device/tplink-4m) - SOC := ar7240 - DEVICE_MODEL := TL-WA901ND - DEVICE_VARIANT := v1 - TPLINK_HWID := 0x09010001 - SUPPORTED_DEVICES += tl-wa901nd -endef -TARGET_DEVICES += tplink_tl-wa901nd-v1 - define Device/tplink_tl-wa901nd-v2 $(Device/tplink-4m) SOC := ar9132 @@ -313,20 +264,6 @@ define Device/tplink_tl-wr940n-v4 endef TARGET_DEVICES += tplink_tl-wr940n-v4 -define Device/tplink_tl-wr940n-v6 - $(Device/tplink-4mlzma) - SOC := tp9343 - DEVICE_MODEL := TL-WR940N - DEVICE_VARIANT := v6 - TPLINK_HWID := 0x09400006 - SUPPORTED_DEVICES += tl-wr940n-v6 - IMAGES += factory-us.bin factory-eu.bin factory-br.bin - IMAGE/factory-us.bin := tplink-v1-image factory -C US - IMAGE/factory-eu.bin := tplink-v1-image factory -C EU - IMAGE/factory-br.bin := tplink-v1-image factory -C BR -endef -TARGET_DEVICES += tplink_tl-wr940n-v6 - define Device/tplink_tl-wr941-v2 $(Device/tplink-4m) SOC := ar9132 diff --git a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch index cff52e5ad..6234ba470 100644 --- a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch @@ -811,7 +811,7 @@ * No flags defined yet. --- a/net/core/utils.c +++ b/net/core/utils.c -@@ -441,8 +441,14 @@ void inet_proto_csum_replace16(__sum16 * +@@ -424,8 +424,14 @@ void inet_proto_csum_replace16(__sum16 * bool pseudohdr) { __be32 diff[] = { diff --git a/target/linux/ath79/patches-4.19/0039-MIPS-ath79-export-UART1-reference-clock.patch b/target/linux/ath79/patches-4.19/0039-MIPS-ath79-export-UART1-reference-clock.patch deleted file mode 100644 index 8656fafe0..000000000 --- a/target/linux/ath79/patches-4.19/0039-MIPS-ath79-export-UART1-reference-clock.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- a/arch/mips/ath79/clock.c -+++ b/arch/mips/ath79/clock.c -@@ -42,6 +42,7 @@ static const char * const clk_names[ATH7 - [ATH79_CLK_AHB] = "ahb", - [ATH79_CLK_REF] = "ref", - [ATH79_CLK_MDIO] = "mdio", -+ [ATH79_CLK_UART1] = "uart1", - }; - - static const char * __init ath79_clk_name(int type) -@@ -346,6 +347,9 @@ static void __init ar934x_clocks_init(vo - if (clk_ctrl & AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL) - ath79_set_clk(ATH79_CLK_MDIO, 100 * 1000 * 1000); - -+ if (clk_ctrl & AR934X_PLL_SWITCH_CLOCK_CONTROL_UART1_CLK_SEL) -+ ath79_set_clk(ATH79_CLK_UART1, 100 * 1000 * 1000); -+ - iounmap(dpll_base); - } - -@@ -651,6 +655,9 @@ static void __init ath79_clocks_init_dt( - if (!clks[ATH79_CLK_MDIO]) - clks[ATH79_CLK_MDIO] = clks[ATH79_CLK_REF]; - -+ if (!clks[ATH79_CLK_UART1]) -+ clks[ATH79_CLK_UART1] = clks[ATH79_CLK_REF]; -+ - if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) { - pr_err("%pOF: could not register clk provider\n", np); - goto err_iounmap; ---- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -@@ -351,6 +351,7 @@ - #define AR934X_PLL_CPU_DDR_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24) - - #define AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL BIT(6) -+#define AR934X_PLL_SWITCH_CLOCK_CONTROL_UART1_CLK_SEL BIT(7) - - #define QCA953X_PLL_CPU_CONFIG_REG 0x00 - #define QCA953X_PLL_DDR_CONFIG_REG 0x04 ---- a/include/dt-bindings/clock/ath79-clk.h -+++ b/include/dt-bindings/clock/ath79-clk.h -@@ -15,7 +15,8 @@ - #define ATH79_CLK_AHB 2 - #define ATH79_CLK_REF 3 - #define ATH79_CLK_MDIO 4 -+#define ATH79_CLK_UART1 5 - --#define ATH79_CLK_END 5 -+#define ATH79_CLK_END 6 - - #endif /* __DT_BINDINGS_ATH79_CLK_H */ diff --git a/target/linux/ath79/patches-4.19/0050-v5.1-drivers-provide-devm_platform_ioremap_resource.patch b/target/linux/ath79/patches-4.19/0050-v5.1-drivers-provide-devm_platform_ioremap_resource.patch deleted file mode 100644 index 32c960f32..000000000 --- a/target/linux/ath79/patches-4.19/0050-v5.1-drivers-provide-devm_platform_ioremap_resource.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 7945f929f1a77a1c8887a97ca07f87626858ff42 Mon Sep 17 00:00:00 2001 -From: Bartosz Golaszewski -Date: Wed, 20 Feb 2019 11:12:39 +0000 -Subject: [PATCH] drivers: provide devm_platform_ioremap_resource() - -There are currently 1200+ instances of using platform_get_resource() -and devm_ioremap_resource() together in the kernel tree. - -This patch wraps these two calls in a single helper. Thanks to that -we don't have to declare a local variable for struct resource * and can -omit the redundant argument for resource type. We also have one -function call less. - -Signed-off-by: Bartosz Golaszewski -Acked-by: Greg Kroah-Hartman -Reviewed-by: Andy Shevchenko -Signed-off-by: Linus Walleij ---- - drivers/base/platform.c | 18 ++++++++++++++++++ - include/linux/platform_device.h | 3 +++ - 2 files changed, 21 insertions(+) - ---- a/drivers/base/platform.c -+++ b/drivers/base/platform.c -@@ -81,6 +81,24 @@ struct resource *platform_get_resource(s - EXPORT_SYMBOL_GPL(platform_get_resource); - - /** -+ * devm_platform_ioremap_resource - call devm_ioremap_resource() for a platform -+ * device -+ * -+ * @pdev: platform device to use both for memory resource lookup as well as -+ * resource managemend -+ * @index: resource index -+ */ -+void __iomem *devm_platform_ioremap_resource(struct platform_device *pdev, -+ unsigned int index) -+{ -+ struct resource *res; -+ -+ res = platform_get_resource(pdev, IORESOURCE_MEM, index); -+ return devm_ioremap_resource(&pdev->dev, res); -+} -+EXPORT_SYMBOL_GPL(devm_platform_ioremap_resource); -+ -+/** - * platform_get_irq - get an IRQ for a device - * @dev: platform device - * @num: IRQ number index ---- a/include/linux/platform_device.h -+++ b/include/linux/platform_device.h -@@ -51,6 +51,9 @@ extern struct device platform_bus; - extern void arch_setup_pdev_archdata(struct platform_device *); - extern struct resource *platform_get_resource(struct platform_device *, - unsigned int, unsigned int); -+extern void __iomem * -+devm_platform_ioremap_resource(struct platform_device *pdev, -+ unsigned int index); - extern int platform_get_irq(struct platform_device *, unsigned int); - extern int platform_irq_count(struct platform_device *); - extern struct resource *platform_get_resource_byname(struct platform_device *, diff --git a/target/linux/ath79/patches-4.19/0051-spi-add-driver-for-ar934x-spi-controller.patch b/target/linux/ath79/patches-4.19/0051-spi-add-driver-for-ar934x-spi-controller.patch deleted file mode 100644 index 9feea723f..000000000 --- a/target/linux/ath79/patches-4.19/0051-spi-add-driver-for-ar934x-spi-controller.patch +++ /dev/null @@ -1,283 +0,0 @@ -From 7e161c423a232ef7ddf6c11b09ebe471dd5a23cf Mon Sep 17 00:00:00 2001 -From: Chuanhong Guo -Date: Wed, 5 Feb 2020 18:25:37 +0800 -Subject: [PATCH v4 1/2] spi: add driver for ar934x spi controller - -This patch adds driver for SPI controller found in Qualcomm Atheros -AR934x/QCA95xx SoCs. -This controller is a superset of the already supported qca,ar7100-spi. -Besides the bit-bang mode in spi-ath79.c, this new controller added -a new "shift register" mode, allowing faster spi operations. - -Signed-off-by: Chuanhong Guo ---- - drivers/spi/Kconfig | 7 ++ - drivers/spi/Makefile | 1 + - drivers/spi/spi-ar934x.c | 235 +++++++++++++++++++++++++++++++++++++++ - 3 files changed, 243 insertions(+) - create mode 100644 drivers/spi/spi-ar934x.c - ---- a/drivers/spi/Kconfig -+++ b/drivers/spi/Kconfig -@@ -61,6 +61,13 @@ config SPI_ALTERA - help - This is the driver for the Altera SPI Controller. - -+config SPI_AR934X -+ tristate "Qualcomm Atheros AR934X/QCA95XX SPI controller driver" -+ depends on ATH79 || COMPILE_TEST -+ help -+ This enables support for the SPI controller present on the -+ Qualcomm Atheros AR934X/QCA95XX SoCs. -+ - config SPI_ATH79 - tristate "Atheros AR71XX/AR724X/AR913X SPI controller driver" - depends on ATH79 && GPIOLIB ---- a/drivers/spi/Makefile -+++ b/drivers/spi/Makefile -@@ -14,6 +14,7 @@ obj-$(CONFIG_SPI_LOOPBACK_TEST) += spi- - - # SPI master controller drivers (bus) - obj-$(CONFIG_SPI_ALTERA) += spi-altera.o -+obj-$(CONFIG_SPI_AR934X) += spi-ar934x.o - obj-$(CONFIG_SPI_ARMADA_3700) += spi-armada-3700.o - obj-$(CONFIG_SPI_ATMEL) += spi-atmel.o - obj-$(CONFIG_SPI_ATH79) += spi-ath79.o ---- /dev/null -+++ b/drivers/spi/spi-ar934x.c -@@ -0,0 +1,235 @@ -+// SPDX-License-Identifier: GPL-2.0 -+// -+// SPI controller driver for Qualcomm Atheros AR934x/QCA95xx SoCs -+// -+// Copyright (C) 2020 Chuanhong Guo -+// -+// Based on spi-mt7621.c: -+// Copyright (C) 2011 Sergiy -+// Copyright (C) 2011-2013 Gabor Juhos -+// Copyright (C) 2014-2015 Felix Fietkau -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define DRIVER_NAME "spi-ar934x" -+ -+#define AR934X_SPI_REG_FS 0x00 -+#define AR934X_SPI_ENABLE BIT(0) -+ -+#define AR934X_SPI_REG_IOC 0x08 -+#define AR934X_SPI_IOC_INITVAL 0x70000 -+ -+#define AR934X_SPI_REG_CTRL 0x04 -+#define AR934X_SPI_CLK_MASK GENMASK(5, 0) -+ -+#define AR934X_SPI_DATAOUT 0x10 -+ -+#define AR934X_SPI_REG_SHIFT_CTRL 0x14 -+#define AR934X_SPI_SHIFT_EN BIT(31) -+#define AR934X_SPI_SHIFT_CS(n) BIT(28 + (n)) -+#define AR934X_SPI_SHIFT_TERM 26 -+#define AR934X_SPI_SHIFT_VAL(cs, term, count) \ -+ (AR934X_SPI_SHIFT_EN | AR934X_SPI_SHIFT_CS(cs) | \ -+ (term) << AR934X_SPI_SHIFT_TERM | (count)) -+ -+#define AR934X_SPI_DATAIN 0x18 -+ -+struct ar934x_spi { -+ struct spi_controller *ctlr; -+ void __iomem *base; -+ struct clk *clk; -+ unsigned int clk_freq; -+}; -+ -+static inline int ar934x_spi_clk_div(struct ar934x_spi *sp, unsigned int freq) -+{ -+ int div = DIV_ROUND_UP(sp->clk_freq, freq * 2) - 1; -+ -+ if (div < 0) -+ return 0; -+ else if (div > AR934X_SPI_CLK_MASK) -+ return -EINVAL; -+ else -+ return div; -+} -+ -+static int ar934x_spi_setup(struct spi_device *spi) -+{ -+ struct ar934x_spi *sp = spi_controller_get_devdata(spi->master); -+ -+ if ((spi->max_speed_hz == 0) || -+ (spi->max_speed_hz > (sp->clk_freq / 2))) { -+ spi->max_speed_hz = sp->clk_freq / 2; -+ } else if (spi->max_speed_hz < (sp->clk_freq / 128)) { -+ dev_err(&spi->dev, "spi clock is too low\n"); -+ return -EINVAL; -+ } -+ -+ return 0; -+} -+ -+static int ar934x_spi_transfer_one_message(struct spi_controller *master, -+ struct spi_message *m) -+{ -+ struct ar934x_spi *sp = spi_controller_get_devdata(master); -+ struct spi_transfer *t = NULL; -+ struct spi_device *spi = m->spi; -+ unsigned long trx_done, trx_cur; -+ int stat = 0; -+ u8 term = 0; -+ int div, i; -+ u32 reg; -+ const u8 *tx_buf; -+ u8 *buf; -+ -+ m->actual_length = 0; -+ list_for_each_entry(t, &m->transfers, transfer_list) { -+ if (t->speed_hz) -+ div = ar934x_spi_clk_div(sp, t->speed_hz); -+ else -+ div = ar934x_spi_clk_div(sp, spi->max_speed_hz); -+ if (div < 0) { -+ stat = -EIO; -+ goto msg_done; -+ } -+ -+ reg = ioread32(sp->base + AR934X_SPI_REG_CTRL); -+ reg &= ~AR934X_SPI_CLK_MASK; -+ reg |= div; -+ iowrite32(reg, sp->base + AR934X_SPI_REG_CTRL); -+ iowrite32(0, sp->base + AR934X_SPI_DATAOUT); -+ -+ for (trx_done = 0; trx_done < t->len; trx_done += 4) { -+ trx_cur = t->len - trx_done; -+ if (trx_cur > 4) -+ trx_cur = 4; -+ else if (list_is_last(&t->transfer_list, &m->transfers)) -+ term = 1; -+ -+ if (t->tx_buf) { -+ tx_buf = t->tx_buf + trx_done; -+ reg = tx_buf[0]; -+ for (i = 1; i < trx_cur; i++) -+ reg = reg << 8 | tx_buf[i]; -+ iowrite32(reg, sp->base + AR934X_SPI_DATAOUT); -+ } -+ -+ reg = AR934X_SPI_SHIFT_VAL(spi->chip_select, term, -+ trx_cur * 8); -+ iowrite32(reg, sp->base + AR934X_SPI_REG_SHIFT_CTRL); -+ stat = readl_poll_timeout( -+ sp->base + AR934X_SPI_REG_SHIFT_CTRL, reg, -+ !(reg & AR934X_SPI_SHIFT_EN), 0, 5); -+ if (stat < 0) -+ goto msg_done; -+ -+ if (t->rx_buf) { -+ reg = ioread32(sp->base + AR934X_SPI_DATAIN); -+ buf = t->rx_buf + trx_done; -+ for (i = 0; i < trx_cur; i++) { -+ buf[trx_cur - i - 1] = reg & 0xff; -+ reg >>= 8; -+ } -+ } -+ } -+ m->actual_length += t->len; -+ } -+ -+msg_done: -+ m->status = stat; -+ spi_finalize_current_message(master); -+ -+ return 0; -+} -+ -+static const struct of_device_id ar934x_spi_match[] = { -+ { .compatible = "qca,ar934x-spi" }, -+ {}, -+}; -+MODULE_DEVICE_TABLE(of, ar934x_spi_match); -+ -+static int ar934x_spi_probe(struct platform_device *pdev) -+{ -+ struct spi_controller *ctlr; -+ struct ar934x_spi *sp; -+ void __iomem *base; -+ struct clk *clk; -+ int ret; -+ -+ base = devm_platform_ioremap_resource(pdev, 0); -+ if (IS_ERR(base)) -+ return PTR_ERR(base); -+ -+ clk = devm_clk_get(&pdev->dev, NULL); -+ if (IS_ERR(clk)) { -+ dev_err(&pdev->dev, "failed to get clock\n"); -+ return PTR_ERR(clk); -+ } -+ -+ ret = clk_prepare_enable(clk); -+ if (ret) -+ return ret; -+ -+ ctlr = spi_alloc_master(&pdev->dev, sizeof(*sp)); -+ if (!ctlr) { -+ dev_info(&pdev->dev, "failed to allocate spi controller\n"); -+ return -ENOMEM; -+ } -+ -+ /* disable flash mapping and expose spi controller registers */ -+ iowrite32(AR934X_SPI_ENABLE, base + AR934X_SPI_REG_FS); -+ /* restore pins to default state: CSn=1 DO=CLK=0 */ -+ iowrite32(AR934X_SPI_IOC_INITVAL, base + AR934X_SPI_REG_IOC); -+ -+ ctlr->mode_bits = SPI_LSB_FIRST; -+ ctlr->setup = ar934x_spi_setup; -+ ctlr->transfer_one_message = ar934x_spi_transfer_one_message; -+ ctlr->bits_per_word_mask = SPI_BPW_MASK(8); -+ ctlr->dev.of_node = pdev->dev.of_node; -+ ctlr->num_chipselect = 3; -+ -+ dev_set_drvdata(&pdev->dev, ctlr); -+ -+ sp = spi_controller_get_devdata(ctlr); -+ sp->base = base; -+ sp->clk = clk; -+ sp->clk_freq = clk_get_rate(clk); -+ sp->ctlr = ctlr; -+ -+ return devm_spi_register_controller(&pdev->dev, ctlr); -+} -+ -+static int ar934x_spi_remove(struct platform_device *pdev) -+{ -+ struct spi_controller *ctlr; -+ struct ar934x_spi *sp; -+ -+ ctlr = dev_get_drvdata(&pdev->dev); -+ sp = spi_controller_get_devdata(ctlr); -+ -+ clk_disable_unprepare(sp->clk); -+ -+ return 0; -+} -+ -+static struct platform_driver ar934x_spi_driver = { -+ .driver = { -+ .name = DRIVER_NAME, -+ .of_match_table = ar934x_spi_match, -+ }, -+ .probe = ar934x_spi_probe, -+ .remove = ar934x_spi_remove, -+}; -+ -+module_platform_driver(ar934x_spi_driver); -+ -+MODULE_DESCRIPTION("SPI controller driver for Qualcomm Atheros AR934x/QCA95xx"); -+MODULE_AUTHOR("Chuanhong Guo "); -+MODULE_LICENSE("GPL v2"); -+MODULE_ALIAS("platform:" DRIVER_NAME); diff --git a/target/linux/ath79/patches-4.19/0060-serial-ar933x_uart-set-UART_CS_-RX-TX-_READY_ORIDE.patch b/target/linux/ath79/patches-4.19/0060-serial-ar933x_uart-set-UART_CS_-RX-TX-_READY_ORIDE.patch deleted file mode 100644 index 485aadcbb..000000000 --- a/target/linux/ath79/patches-4.19/0060-serial-ar933x_uart-set-UART_CS_-RX-TX-_READY_ORIDE.patch +++ /dev/null @@ -1,64 +0,0 @@ -From patchwork Fri Feb 7 09:53:35 2020 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Daniel Golle -X-Patchwork-Id: 1190470 -Date: Fri, 7 Feb 2020 11:53:35 +0200 -From: Daniel Golle -To: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org -Cc: Greg Kroah-Hartman , - Jiri Slaby , - Chuanhong Guo , - Eitan Cohen , - Ori Gofen -Subject: [PATCH] serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE -Message-ID: <20200207095335.GA179836@makrotopia.org> -MIME-Version: 1.0 -Content-Disposition: inline -Sender: linux-kernel-owner@vger.kernel.org -Precedence: bulk -List-ID: -X-Mailing-List: linux-kernel@vger.kernel.org - -On AR934x this UART is usually not initialized by the bootloader -as it is only used as a secondary serial port while the primary -UART is a newly introduced NS16550-compatible. -In order to make use of the ar933x-uart on AR934x without RTS/CTS -hardware flow control, one needs to set the -UART_CS_{RX,TX}_READY_ORIDE bits as other than on AR933x where this -UART is used as primary/console, the bootloader on AR934x typically -doesn't set those bits. -Setting them explicitely on AR933x should not do any harm, so just -set them unconditionally. - -Tested-by: Chuanhong Guo -Signed-off-by: Daniel Golle ---- - drivers/tty/serial/ar933x_uart.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - ---- a/drivers/tty/serial/ar933x_uart.c -+++ b/drivers/tty/serial/ar933x_uart.c -@@ -286,6 +286,10 @@ static void ar933x_uart_set_termios(stru - ar933x_uart_rmw_set(up, AR933X_UART_CS_REG, - AR933X_UART_CS_HOST_INT_EN); - -+ /* enable RX and TX ready overide */ -+ ar933x_uart_rmw_set(up, AR933X_UART_CS_REG, -+ AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE); -+ - /* reenable the UART */ - ar933x_uart_rmw(up, AR933X_UART_CS_REG, - AR933X_UART_CS_IF_MODE_M << AR933X_UART_CS_IF_MODE_S, -@@ -418,6 +422,10 @@ static int ar933x_uart_startup(struct ua - ar933x_uart_rmw_set(up, AR933X_UART_CS_REG, - AR933X_UART_CS_HOST_INT_EN); - -+ /* enable RX and TX ready overide */ -+ ar933x_uart_rmw_set(up, AR933X_UART_CS_REG, -+ AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE); -+ - /* Enable RX interrupts */ - up->ier = AR933X_UART_INT_RX_VALID; - ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier); diff --git a/target/linux/ath79/patches-4.19/0061-tty-serial-ar933x-uart-rs485-gpio.patch b/target/linux/ath79/patches-4.19/0061-tty-serial-ar933x-uart-rs485-gpio.patch deleted file mode 100644 index 7bbcaa08a..000000000 --- a/target/linux/ath79/patches-4.19/0061-tty-serial-ar933x-uart-rs485-gpio.patch +++ /dev/null @@ -1,267 +0,0 @@ -From patchwork Fri Feb 21 21:23:31 2020 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Daniel Golle -X-Patchwork-Id: 1198835 -Date: Fri, 21 Feb 2020 22:23:31 +0100 -From: Daniel Golle -To: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org -Cc: Greg Kroah-Hartman , - Jiri Slaby , Petr =?utf-8?q?=C5=A0tetiar?= , - Chuanhong Guo , Piotr Dymacz -Subject: [PATCH v2] serial: ar933x_uart: add RS485 support -Message-ID: <20200221212331.GA21467@makrotopia.org> -MIME-Version: 1.0 -Content-Disposition: inline -Sender: linux-kernel-owner@vger.kernel.org -Precedence: bulk -List-ID: -X-Mailing-List: linux-kernel@vger.kernel.org - -Emulate half-duplex operation and use mctrl_gpio to add support for -RS485 tranceiver with transmit/receive switch hooked to RTS GPIO line. -This is needed to make use of the RS485 port found on Teltonika RUT955. - -Signed-off-by: Daniel Golle ---- -v2: use bool to indicate ongoing half-duplex send, use it afterwards - to decide whether we've just been in a send operation. - - drivers/tty/serial/Kconfig | 1 + - drivers/tty/serial/ar933x_uart.c | 113 +++++++++++++++++++++++++++++-- - 2 files changed, 108 insertions(+), 6 deletions(-) - ---- a/drivers/tty/serial/Kconfig -+++ b/drivers/tty/serial/Kconfig -@@ -1296,6 +1296,7 @@ config SERIAL_AR933X - tristate "AR933X serial port support" - depends on HAVE_CLK && ATH79 - select SERIAL_CORE -+ select SERIAL_MCTRL_GPIO if GPIOLIB - help - If you have an Atheros AR933X SOC based board and want to use the - built-in UART of the SoC, say Y to this option. ---- a/drivers/tty/serial/ar933x_uart.c -+++ b/drivers/tty/serial/ar933x_uart.c -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -29,6 +30,8 @@ - - #include - -+#include "serial_mctrl_gpio.h" -+ - #define DRIVER_NAME "ar933x-uart" - - #define AR933X_UART_MAX_SCALE 0xff -@@ -47,6 +50,8 @@ struct ar933x_uart_port { - unsigned int min_baud; - unsigned int max_baud; - struct clk *clk; -+ struct mctrl_gpios *gpios; -+ struct gpio_desc *rts_gpiod; - }; - - static inline unsigned int ar933x_uart_read(struct ar933x_uart_port *up, -@@ -100,6 +105,18 @@ static inline void ar933x_uart_stop_tx_i - ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier); - } - -+static inline void ar933x_uart_start_rx_interrupt(struct ar933x_uart_port *up) -+{ -+ up->ier |= AR933X_UART_INT_RX_VALID; -+ ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier); -+} -+ -+static inline void ar933x_uart_stop_rx_interrupt(struct ar933x_uart_port *up) -+{ -+ up->ier &= ~AR933X_UART_INT_RX_VALID; -+ ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier); -+} -+ - static inline void ar933x_uart_putc(struct ar933x_uart_port *up, int ch) - { - unsigned int rdata; -@@ -125,11 +142,21 @@ static unsigned int ar933x_uart_tx_empty - - static unsigned int ar933x_uart_get_mctrl(struct uart_port *port) - { -- return TIOCM_CAR; -+ struct ar933x_uart_port *up = -+ container_of(port, struct ar933x_uart_port, port); -+ int ret = TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; -+ -+ mctrl_gpio_get(up->gpios, &ret); -+ -+ return ret; - } - - static void ar933x_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) - { -+ struct ar933x_uart_port *up = -+ container_of(port, struct ar933x_uart_port, port); -+ -+ mctrl_gpio_set(up->gpios, mctrl); - } - - static void ar933x_uart_start_tx(struct uart_port *port) -@@ -140,6 +167,37 @@ static void ar933x_uart_start_tx(struct - ar933x_uart_start_tx_interrupt(up); - } - -+static void ar933x_uart_wait_tx_complete(struct ar933x_uart_port *up) -+{ -+ unsigned int status; -+ unsigned int timeout = 60000; -+ -+ /* Wait up to 60ms for the character(s) to be sent. */ -+ do { -+ status = ar933x_uart_read(up, AR933X_UART_CS_REG); -+ if (--timeout == 0) -+ break; -+ udelay(1); -+ } while (status & AR933X_UART_CS_TX_BUSY); -+ -+ if (timeout == 0) -+ dev_err(up->port.dev, "waiting for TX timed out\n"); -+} -+ -+static void ar933x_uart_rx_flush(struct ar933x_uart_port *up) -+{ -+ unsigned int status; -+ -+ /* clear RX_VALID interrupt */ -+ ar933x_uart_write(up, AR933X_UART_INT_REG, AR933X_UART_INT_RX_VALID); -+ -+ /* remove characters from the RX FIFO */ -+ do { -+ ar933x_uart_write(up, AR933X_UART_DATA_REG, AR933X_UART_DATA_RX_CSR); -+ status = ar933x_uart_read(up, AR933X_UART_DATA_REG); -+ } while (status & AR933X_UART_DATA_RX_CSR); -+} -+ - static void ar933x_uart_stop_tx(struct uart_port *port) - { - struct ar933x_uart_port *up = -@@ -153,8 +211,7 @@ static void ar933x_uart_stop_rx(struct u - struct ar933x_uart_port *up = - container_of(port, struct ar933x_uart_port, port); - -- up->ier &= ~AR933X_UART_INT_RX_VALID; -- ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier); -+ ar933x_uart_stop_rx_interrupt(up); - } - - static void ar933x_uart_break_ctl(struct uart_port *port, int break_state) -@@ -336,11 +393,20 @@ static void ar933x_uart_rx_chars(struct - static void ar933x_uart_tx_chars(struct ar933x_uart_port *up) - { - struct circ_buf *xmit = &up->port.state->xmit; -+ struct serial_rs485 *rs485conf = &up->port.rs485; - int count; -+ bool half_duplex_send = false; - - if (uart_tx_stopped(&up->port)) - return; - -+ if ((rs485conf->flags & SER_RS485_ENABLED) && -+ (up->port.x_char || !uart_circ_empty(xmit))) { -+ ar933x_uart_stop_rx_interrupt(up); -+ gpiod_set_value(up->rts_gpiod, !!(rs485conf->flags & SER_RS485_RTS_ON_SEND)); -+ half_duplex_send = true; -+ } -+ - count = up->port.fifosize; - do { - unsigned int rdata; -@@ -368,8 +434,14 @@ static void ar933x_uart_tx_chars(struct - if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) - uart_write_wakeup(&up->port); - -- if (!uart_circ_empty(xmit)) -+ if (!uart_circ_empty(xmit)) { - ar933x_uart_start_tx_interrupt(up); -+ } else if (half_duplex_send) { -+ ar933x_uart_wait_tx_complete(up); -+ ar933x_uart_rx_flush(up); -+ ar933x_uart_start_rx_interrupt(up); -+ gpiod_set_value(up->rts_gpiod, !!(rs485conf->flags & SER_RS485_RTS_AFTER_SEND)); -+ } - } - - static irqreturn_t ar933x_uart_interrupt(int irq, void *dev_id) -@@ -427,8 +499,7 @@ static int ar933x_uart_startup(struct ua - AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE); - - /* Enable RX interrupts */ -- up->ier = AR933X_UART_INT_RX_VALID; -- ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier); -+ ar933x_uart_start_rx_interrupt(up); - - spin_unlock_irqrestore(&up->port.lock, flags); - -@@ -511,6 +582,21 @@ static const struct uart_ops ar933x_uart - .verify_port = ar933x_uart_verify_port, - }; - -+static int ar933x_config_rs485(struct uart_port *port, -+ struct serial_rs485 *rs485conf) -+{ -+ struct ar933x_uart_port *up = -+ container_of(port, struct ar933x_uart_port, port); -+ -+ if ((rs485conf->flags & SER_RS485_ENABLED) && -+ !up->rts_gpiod) { -+ dev_err(port->dev, "RS485 needs rts-gpio\n"); -+ return 1; -+ } -+ port->rs485 = *rs485conf; -+ return 0; -+} -+ - #ifdef CONFIG_SERIAL_AR933X_CONSOLE - static struct ar933x_uart_port * - ar933x_console_ports[CONFIG_SERIAL_AR933X_NR_UARTS]; -@@ -680,6 +766,8 @@ static int ar933x_uart_probe(struct plat - goto err_disable_clk; - } - -+ uart_get_rs485_mode(&pdev->dev, &port->rs485); -+ - port->mapbase = mem_res->start; - port->line = id; - port->irq = irq_res->start; -@@ -690,6 +778,7 @@ static int ar933x_uart_probe(struct plat - port->regshift = 2; - port->fifosize = AR933X_UART_FIFO_SIZE; - port->ops = &ar933x_uart_ops; -+ port->rs485_config = ar933x_config_rs485; - - baud = ar933x_uart_get_baud(port->uartclk, AR933X_UART_MAX_SCALE, 1); - up->min_baud = max_t(unsigned int, baud, AR933X_UART_MIN_BAUD); -@@ -697,6 +786,18 @@ static int ar933x_uart_probe(struct plat - baud = ar933x_uart_get_baud(port->uartclk, 0, AR933X_UART_MAX_STEP); - up->max_baud = min_t(unsigned int, baud, AR933X_UART_MAX_BAUD); - -+ up->gpios = mctrl_gpio_init(port, 0); -+ if (IS_ERR(up->gpios) && PTR_ERR(up->gpios) != -ENOSYS) -+ return PTR_ERR(up->gpios); -+ -+ up->rts_gpiod = mctrl_gpio_to_gpiod(up->gpios, UART_GPIO_RTS); -+ -+ if ((port->rs485.flags & SER_RS485_ENABLED) && -+ !up->rts_gpiod) { -+ dev_err(&pdev->dev, "lacking rts-gpio, disabling RS485\n"); -+ port->rs485.flags &= ~SER_RS485_ENABLED; -+ } -+ - #ifdef CONFIG_SERIAL_AR933X_CONSOLE - ar933x_console_ports[up->port.line] = up; - #endif diff --git a/target/linux/ath79/patches-4.19/700-net-phy-add-reset-controller-support.patch b/target/linux/ath79/patches-4.19/700-net-phy-add-reset-controller-support.patch deleted file mode 100644 index 9f9639091..000000000 --- a/target/linux/ath79/patches-4.19/700-net-phy-add-reset-controller-support.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 71dd6c0dff51b5f1fef2e9dfa6f6a948aac975f3 Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Wed, 17 Apr 2019 23:59:21 +0200 -Subject: [PATCH] net: phy: add support for reset-controller - -This commit adds support for PHY reset pins handled by a reset controller. - -Signed-off-by: David Bauer -Reviewed-by: Andrew Lunn -Signed-off-by: David S. Miller ---- - drivers/net/phy/mdio_bus.c | 27 +++++++++++++++++++++++++-- - drivers/net/phy/mdio_device.c | 13 +++++++++++-- - include/linux/mdio.h | 1 + - 3 files changed, 37 insertions(+), 4 deletions(-) - ---- a/drivers/net/phy/mdio_bus.c -+++ b/drivers/net/phy/mdio_bus.c -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -65,8 +66,23 @@ static int mdiobus_register_gpiod(struct - - mdiodev->reset = gpiod; - -- /* Assert the reset signal again */ -- mdio_device_reset(mdiodev, 1); -+ return 0; -+} -+ -+static int mdiobus_register_reset(struct mdio_device *mdiodev) -+{ -+ struct reset_control *reset = NULL; -+ -+ if (mdiodev->dev.of_node) -+ reset = devm_reset_control_get_exclusive(&mdiodev->dev, -+ "phy"); -+ if (PTR_ERR(reset) == -ENOENT || -+ PTR_ERR(reset) == -ENOTSUPP) -+ reset = NULL; -+ else if (IS_ERR(reset)) -+ return PTR_ERR(reset); -+ -+ mdiodev->reset_ctrl = reset; - - return 0; - } -@@ -82,6 +98,13 @@ int mdiobus_register_device(struct mdio_ - err = mdiobus_register_gpiod(mdiodev); - if (err) - return err; -+ -+ err = mdiobus_register_reset(mdiodev); -+ if (err) -+ return err; -+ -+ /* Assert the reset signal */ -+ mdio_device_reset(mdiodev, 1); - } - - mdiodev->bus->mdio_map[mdiodev->addr] = mdiodev; ---- a/drivers/net/phy/mdio_device.c -+++ b/drivers/net/phy/mdio_device.c -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -121,10 +122,18 @@ void mdio_device_reset(struct mdio_devic - { - unsigned int d; - -- if (!mdiodev->reset) -+ if (!mdiodev->reset && !mdiodev->reset_ctrl) - return; - -- gpiod_set_value(mdiodev->reset, value); -+ if (mdiodev->reset) -+ gpiod_set_value(mdiodev->reset, value); -+ -+ if (mdiodev->reset_ctrl) { -+ if (value) -+ reset_control_assert(mdiodev->reset_ctrl); -+ else -+ reset_control_deassert(mdiodev->reset_ctrl); -+ } - - d = value ? mdiodev->reset_assert_delay : mdiodev->reset_deassert_delay; - if (d) ---- a/include/linux/mdio.h -+++ b/include/linux/mdio.h -@@ -40,6 +40,7 @@ struct mdio_device { - int addr; - int flags; - struct gpio_desc *reset; -+ struct reset_control *reset_ctrl; - unsigned int reset_assert_delay; - unsigned int reset_deassert_delay; - }; diff --git a/target/linux/ath79/patches-4.19/701-mdio-bus-dont-use-managed-reset-controller.patch b/target/linux/ath79/patches-4.19/701-mdio-bus-dont-use-managed-reset-controller.patch deleted file mode 100644 index 16e7f2037..000000000 --- a/target/linux/ath79/patches-4.19/701-mdio-bus-dont-use-managed-reset-controller.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 32085f25d7b68404055f3525c780142fc72e543f Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Fri, 22 Nov 2019 22:44:51 +0100 -Subject: [PATCH] mdio_bus: don't use managed reset-controller - -Geert Uytterhoeven reported that using devm_reset_controller_get leads -to a WARNING when probing a reset-controlled PHY. This is because the -device devm_reset_controller_get gets supplied is not actually the -one being probed. - -Acquire an unmanaged reset-control as well as free the reset_control on -unregister to fix this. - -Reported-by: Geert Uytterhoeven -CC: Andrew Lunn -Signed-off-by: David Bauer -Reviewed-by: Andrew Lunn -Signed-off-by: David S. Miller ---- - drivers/net/phy/mdio_bus.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - ---- a/drivers/net/phy/mdio_bus.c -+++ b/drivers/net/phy/mdio_bus.c -@@ -74,8 +74,8 @@ static int mdiobus_register_reset(struct - struct reset_control *reset = NULL; - - if (mdiodev->dev.of_node) -- reset = devm_reset_control_get_exclusive(&mdiodev->dev, -- "phy"); -+ reset = of_reset_control_get_exclusive(mdiodev->dev.of_node, -+ "phy"); - if (PTR_ERR(reset) == -ENOENT || - PTR_ERR(reset) == -ENOTSUPP) - reset = NULL; -@@ -118,6 +118,8 @@ int mdiobus_unregister_device(struct mdi - if (mdiodev->bus->mdio_map[mdiodev->addr] != mdiodev) - return -EINVAL; - -+ reset_control_put(mdiodev->reset_ctrl); -+ - mdiodev->bus->mdio_map[mdiodev->addr] = NULL; - - return 0; diff --git a/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch index 1b63db7ba..92396c13e 100644 --- a/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch @@ -802,7 +802,7 @@ * No flags defined yet. --- a/net/core/utils.c +++ b/net/core/utils.c -@@ -464,8 +464,14 @@ void inet_proto_csum_replace16(__sum16 * +@@ -447,8 +447,14 @@ void inet_proto_csum_replace16(__sum16 * bool pseudohdr) { __be32 diff[] = { diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds index c62fdfd08..75de6f3aa 100755 --- a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds @@ -41,12 +41,7 @@ on,n150r) ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" "0x04" "0x0f" ;; tplink,tl-mr3020-v1|\ -tplink,tl-mr3040-v2|\ -tplink,tl-wa701nd-v1|\ -tplink,tl-wa730re-v1|\ -tplink,tl-wa801nd-v1|\ -tplink,tl-wa830re-v1|\ -tplink,tl-wa901nd-v1) +tplink,tl-mr3040-v2) ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" ;; tplink,tl-mr3420-v2|\ @@ -100,9 +95,6 @@ tplink,tl-wr941nd-v6) ucidef_set_led_switch "lan3" "LAN3" "tp-link:blue:lan3" "switch0" "0x04" ucidef_set_led_switch "lan4" "LAN4" "tp-link:blue:lan4" "switch0" "0x02" ;; -tplink,tl-wr940n-v6) - ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth1" - ;; esac board_config_flush diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/02_network b/target/linux/ath79/tiny/base-files/etc/board.d/02_network index 29c55c98a..56200de59 100755 --- a/target/linux/ath79/tiny/base-files/etc/board.d/02_network +++ b/target/linux/ath79/tiny/base-files/etc/board.d/02_network @@ -32,13 +32,8 @@ ath79_setup_interfaces() tplink,tl-mr10u|\ tplink,tl-mr3020-v1|\ tplink,tl-mr3040-v2|\ - tplink,tl-wa701nd-v1|\ - tplink,tl-wa730re-v1|\ - tplink,tl-wa801nd-v1|\ - tplink,tl-wa830re-v1|\ tplink,tl-wa850re-v1|\ tplink,tl-wa850re-v2|\ - tplink,tl-wa901nd-v1|\ tplink,tl-wa901nd-v2|\ tplink,tl-wr703n) ucidef_set_interface_lan "eth0" @@ -52,7 +47,6 @@ ath79_setup_interfaces() tplink,tl-wr841-v12|\ tplink,tl-wr940n-v3|\ tplink,tl-wr940n-v4|\ - tplink,tl-wr940n-v6|\ tplink,tl-wr941nd-v6) ucidef_set_interface_wan "eth1" ucidef_add_switch "switch0" \ diff --git a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 43d88ef0c..e54b6acdb 100644 --- a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -65,11 +65,6 @@ case "$FIRMWARE" in "ath9k-eeprom-pci-0000:00:00.0.bin") case $board in buffalo,whr-g301n|\ - tplink,tl-wa701nd-v1|\ - tplink,tl-wa730re-v1|\ - tplink,tl-wa801nd-v1|\ - tplink,tl-wa830re-v1|\ - tplink,tl-wa901nd-v1|\ tplink,tl-wr841-v5|\ tplink,tl-wr941-v4) ath9k_eeprom_extract "art" 0x1000 0xeb8 diff --git a/target/linux/bcm27xx/patches-4.19/950-0029-mm-Remove-the-PFN-busy-warning.patch b/target/linux/bcm27xx/patches-4.19/950-0029-mm-Remove-the-PFN-busy-warning.patch index ada81969b..76a53fea0 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0029-mm-Remove-the-PFN-busy-warning.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0029-mm-Remove-the-PFN-busy-warning.patch @@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -8007,8 +8007,6 @@ int alloc_contig_range(unsigned long sta +@@ -7977,8 +7977,6 @@ int alloc_contig_range(unsigned long sta /* Make sure the range is really isolated. */ if (test_pages_isolated(outer_start, end, false)) { diff --git a/target/linux/bcm27xx/patches-4.19/950-0089-OF-DT-Overlay-configfs-interface.patch b/target/linux/bcm27xx/patches-4.19/950-0089-OF-DT-Overlay-configfs-interface.patch index 65af09dbe..e3caf880e 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0089-OF-DT-Overlay-configfs-interface.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0089-OF-DT-Overlay-configfs-interface.patch @@ -90,8 +90,8 @@ configfs: New of_overlay API +make sense for developers (since it avoids problems with namespaces). --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig -@@ -108,4 +108,11 @@ config OF_DMA_DEFAULT_COHERENT - # arches should select this if DMA is coherent by default for OF devices +@@ -104,4 +104,11 @@ config OF_OVERLAY + config OF_NUMA bool +config OF_CONFIGFS diff --git a/target/linux/bcm27xx/patches-4.19/950-0786-leds-pca963x-Fix-open-drain-initialization.patch b/target/linux/bcm27xx/patches-4.19/950-0786-leds-pca963x-Fix-open-drain-initialization.patch new file mode 100644 index 000000000..e63d4c6bc --- /dev/null +++ b/target/linux/bcm27xx/patches-4.19/950-0786-leds-pca963x-Fix-open-drain-initialization.patch @@ -0,0 +1,61 @@ +From 1738aaf187e0c8e97fbdd9661960b835f45e8985 Mon Sep 17 00:00:00 2001 +From: Zahari Petkov +Date: Mon, 18 Nov 2019 23:02:55 +0200 +Subject: [PATCH] leds: pca963x: Fix open-drain initialization + +commit 697529091ac7a0a90ca349b914bb30641c13c753 upstream. + +Before commit bb29b9cccd95 ("leds: pca963x: Add bindings to invert +polarity") Mode register 2 was initialized directly with either 0x01 +or 0x05 for open-drain or totem pole (push-pull) configuration. + +Afterwards, MODE2 initialization started using bitwise operations on +top of the default MODE2 register value (0x05). Using bitwise OR for +setting OUTDRV with 0x01 and 0x05 does not produce correct results. +When open-drain is used, instead of setting OUTDRV to 0, the driver +keeps it as 1: + +Open-drain: 0x05 | 0x01 -> 0x05 (0b101 - incorrect) +Totem pole: 0x05 | 0x05 -> 0x05 (0b101 - correct but still wrong) + +Now OUTDRV setting uses correct bitwise operations for initialization: + +Open-drain: 0x05 & ~0x04 -> 0x01 (0b001 - correct) +Totem pole: 0x05 | 0x04 -> 0x05 (0b101 - correct) + +Additional MODE2 register definitions are introduced now as well. + +Fixes: bb29b9cccd95 ("leds: pca963x: Add bindings to invert polarity") +Signed-off-by: Zahari Petkov +Signed-off-by: Pavel Machek +--- + drivers/leds/leds-pca963x.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/drivers/leds/leds-pca963x.c ++++ b/drivers/leds/leds-pca963x.c +@@ -43,6 +43,8 @@ + #define PCA963X_LED_PWM 0x2 /* Controlled through PWM */ + #define PCA963X_LED_GRP_PWM 0x3 /* Controlled through PWM/GRPPWM */ + ++#define PCA963X_MODE2_OUTDRV 0x04 /* Open-drain or totem pole */ ++#define PCA963X_MODE2_INVRT 0x10 /* Normal or inverted direction */ + #define PCA963X_MODE2_DMBLNK 0x20 /* Enable blinking */ + + #define PCA963X_MODE1 0x00 +@@ -462,12 +464,12 @@ static int pca963x_probe(struct i2c_clie + PCA963X_MODE2); + /* Configure output: open-drain or totem pole (push-pull) */ + if (pdata->outdrv == PCA963X_OPEN_DRAIN) +- mode2 |= 0x01; ++ mode2 &= ~PCA963X_MODE2_OUTDRV; + else +- mode2 |= 0x05; ++ mode2 |= PCA963X_MODE2_OUTDRV; + /* Configure direction: normal or inverted */ + if (pdata->dir == PCA963X_INVERTED) +- mode2 |= 0x10; ++ mode2 |= PCA963X_MODE2_INVRT; + i2c_smbus_write_byte_data(pca963x->chip->client, PCA963X_MODE2, + mode2); + } diff --git a/target/linux/bcm53xx/patches-4.14/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch b/target/linux/bcm53xx/patches-4.14/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch index 9ce2087c3..65f9a5290 100644 --- a/target/linux/bcm53xx/patches-4.14/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch +++ b/target/linux/bcm53xx/patches-4.14/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch @@ -75,7 +75,7 @@ Signed-off-by: Rafał Miłecki chosen { - bootargs = "earlycon"; -+ bootargs = "console=ttyS0,115200 earlycon"; ++ bootargs = "console=ttyS0,115200 earlycon"; }; memory { diff --git a/target/linux/bcm53xx/patches-4.14/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch b/target/linux/bcm53xx/patches-4.14/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch index 446ba6cdc..d79b2d0b7 100644 --- a/target/linux/bcm53xx/patches-4.14/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch +++ b/target/linux/bcm53xx/patches-4.14/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch @@ -13,7 +13,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1230,6 +1230,18 @@ static const struct flash_info *spi_nor_ +@@ -1226,6 +1226,18 @@ static const struct flash_info *spi_nor_ } dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n", id[0], id[1], id[2]); diff --git a/target/linux/bcm53xx/patches-4.19/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch b/target/linux/bcm53xx/patches-4.19/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch index 9ce2087c3..65f9a5290 100644 --- a/target/linux/bcm53xx/patches-4.19/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch +++ b/target/linux/bcm53xx/patches-4.19/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch @@ -75,7 +75,7 @@ Signed-off-by: Rafał Miłecki chosen { - bootargs = "earlycon"; -+ bootargs = "console=ttyS0,115200 earlycon"; ++ bootargs = "console=ttyS0,115200 earlycon"; }; memory { diff --git a/target/linux/bcm53xx/patches-4.19/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch b/target/linux/bcm53xx/patches-4.19/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch index cfbf86ef6..21687e7a3 100644 --- a/target/linux/bcm53xx/patches-4.19/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch +++ b/target/linux/bcm53xx/patches-4.19/400-mtd-spi-nor-detect-JEDEC-incompatible-w25q128-using-.patch @@ -13,7 +13,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1305,6 +1305,18 @@ static const struct flash_info *spi_nor_ +@@ -1301,6 +1301,18 @@ static const struct flash_info *spi_nor_ } dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n", id[0], id[1], id[2]); diff --git a/target/linux/brcm47xx/patches-4.14/209-b44-register-adm-switch.patch b/target/linux/brcm47xx/patches-4.14/209-b44-register-adm-switch.patch index cdeb1f96e..6e655ac80 100644 --- a/target/linux/brcm47xx/patches-4.14/209-b44-register-adm-switch.patch +++ b/target/linux/brcm47xx/patches-4.14/209-b44-register-adm-switch.patch @@ -19,7 +19,7 @@ Subject: [PATCH 210/210] b44: register adm switch #include #include -@@ -2251,6 +2253,69 @@ static void b44_adjust_link(struct net_d +@@ -2248,6 +2250,69 @@ static void b44_adjust_link(struct net_d } } @@ -89,7 +89,7 @@ Subject: [PATCH 210/210] b44: register adm switch static int b44_register_phy_one(struct b44 *bp) { struct mii_bus *mii_bus; -@@ -2286,6 +2351,9 @@ static int b44_register_phy_one(struct b +@@ -2283,6 +2348,9 @@ static int b44_register_phy_one(struct b if (!mdiobus_is_registered_device(bp->mii_bus, bp->phy_addr) && (sprom->boardflags_lo & (B44_BOARDFLAG_ROBO | B44_BOARDFLAG_ADM))) { @@ -99,7 +99,7 @@ Subject: [PATCH 210/210] b44: register adm switch dev_info(sdev->dev, "could not find PHY at %i, use fixed one\n", bp->phy_addr); -@@ -2480,6 +2548,7 @@ static void b44_remove_one(struct ssb_de +@@ -2477,6 +2545,7 @@ static void b44_remove_one(struct ssb_de unregister_netdev(dev); if (bp->flags & B44_FLAG_EXTERNAL_PHY) b44_unregister_phy_one(bp); diff --git a/target/linux/brcm47xx/patches-4.14/210-b44_phy_fix.patch b/target/linux/brcm47xx/patches-4.14/210-b44_phy_fix.patch index bff605210..5620d5cd5 100644 --- a/target/linux/brcm47xx/patches-4.14/210-b44_phy_fix.patch +++ b/target/linux/brcm47xx/patches-4.14/210-b44_phy_fix.patch @@ -43,7 +43,7 @@ if (bp->flags & B44_FLAG_EXTERNAL_PHY) return 0; -@@ -2181,6 +2206,8 @@ static int b44_get_invariants(struct b44 +@@ -2178,6 +2203,8 @@ static int b44_get_invariants(struct b44 * valid PHY address. */ bp->phy_addr &= 0x1F; diff --git a/target/linux/brcm47xx/patches-4.14/831-old_gpio_wdt.patch b/target/linux/brcm47xx/patches-4.14/831-old_gpio_wdt.patch index 88f472e63..c8233226e 100644 --- a/target/linux/brcm47xx/patches-4.14/831-old_gpio_wdt.patch +++ b/target/linux/brcm47xx/patches-4.14/831-old_gpio_wdt.patch @@ -4,7 +4,7 @@ Signed-off-by: Mathias Adam --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig -@@ -1473,6 +1473,15 @@ config WDT_MTX1 +@@ -1472,6 +1472,15 @@ config WDT_MTX1 Hardware driver for the MTX-1 boards. This is a watchdog timer that will reboot the machine after a 100 seconds timer expired. diff --git a/target/linux/brcm47xx/patches-4.19/831-old_gpio_wdt.patch b/target/linux/brcm47xx/patches-4.19/831-old_gpio_wdt.patch index 5c2c21ddb..259dc0125 100644 --- a/target/linux/brcm47xx/patches-4.19/831-old_gpio_wdt.patch +++ b/target/linux/brcm47xx/patches-4.19/831-old_gpio_wdt.patch @@ -111,7 +111,7 @@ Signed-off-by: Mathias Adam + int first_interval; +} gpio_wdt_device; + -+static void gpio_wdt_trigger(struct timer_list *unused) ++static void gpio_wdt_trigger(unsigned long unused) +{ + spin_lock(&gpio_wdt_device.lock); + if (gpio_wdt_device.running && ticks > 0) @@ -268,7 +268,7 @@ Signed-off-by: Mathias Adam + init_completion(&gpio_wdt_device.stop); + gpio_wdt_device.queue = 0; + clear_bit(0, &gpio_wdt_device.inuse); -+ timer_setup(&gpio_wdt_device.timer, gpio_wdt_trigger, 0L); ++ setup_timer(&gpio_wdt_device.timer, gpio_wdt_trigger, 0L); + gpio_wdt_device.default_ticks = ticks; + + gpio_wdt_start(); diff --git a/target/linux/generic/backport-4.19/210-arm64-sve-Disentangle-uapi-asm-ptrace.h-from-uapi-as.patch b/target/linux/generic/backport-4.19/210-arm64-sve-Disentangle-uapi-asm-ptrace.h-from-uapi-as.patch index 7c574fd34..e638e0702 100644 --- a/target/linux/generic/backport-4.19/210-arm64-sve-Disentangle-uapi-asm-ptrace.h-from-uapi-as.patch +++ b/target/linux/generic/backport-4.19/210-arm64-sve-Disentangle-uapi-asm-ptrace.h-from-uapi-as.patch @@ -52,7 +52,7 @@ Signed-off-by: Will Deacon /* -@@ -129,9 +129,9 @@ struct user_sve_header { +@@ -128,9 +128,9 @@ struct user_sve_header { */ /* Offset from the start of struct user_sve_header to the register data */ @@ -65,7 +65,7 @@ Signed-off-by: Will Deacon /* * The register data content and layout depends on the value of the -@@ -177,39 +177,36 @@ struct user_sve_header { +@@ -176,39 +176,36 @@ struct user_sve_header { * Additional data might be appended in the future. */ @@ -117,7 +117,7 @@ Signed-off-by: Will Deacon #define SVE_PT_SVE_FPCR_OFFSET(vq) \ (SVE_PT_SVE_FPSR_OFFSET(vq) + SVE_PT_SVE_FPSR_SIZE) -@@ -220,8 +217,8 @@ struct user_sve_header { +@@ -219,8 +216,8 @@ struct user_sve_header { #define SVE_PT_SVE_SIZE(vq, flags) \ ((SVE_PT_SVE_FPCR_OFFSET(vq) + SVE_PT_SVE_FPCR_SIZE \ diff --git a/target/linux/generic/hack-4.19/204-module_strip.patch b/target/linux/generic/hack-4.19/204-module_strip.patch index c9f84dd63..b9d7c886a 100644 --- a/target/linux/generic/hack-4.19/204-module_strip.patch +++ b/target/linux/generic/hack-4.19/204-module_strip.patch @@ -114,7 +114,7 @@ Signed-off-by: Felix Fietkau config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -3028,9 +3028,11 @@ static int setup_load_info(struct load_i +@@ -3027,9 +3027,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -3051,6 +3053,7 @@ static int check_modinfo(struct module * +@@ -3050,6 +3052,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } diff --git a/target/linux/generic/hack-4.19/902-debloat_proc.patch b/target/linux/generic/hack-4.19/902-debloat_proc.patch index 1442cee8b..3ee7fdafd 100644 --- a/target/linux/generic/hack-4.19/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.19/902-debloat_proc.patch @@ -132,7 +132,7 @@ Signed-off-by: Felix Fietkau do { \ --- a/ipc/msg.c +++ b/ipc/msg.c -@@ -1292,6 +1292,9 @@ void __init msg_init(void) +@@ -1291,6 +1291,9 @@ void __init msg_init(void) { msg_init_ns(&init_ipc_ns); diff --git a/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch b/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch index ae13112ef..057d47368 100644 --- a/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch +++ b/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch @@ -20,35 +20,44 @@ Signed-off-by: Gabor Juhos /* * Given a pointer to the MTD object in the mtd_part structure, we can retrieve -@@ -762,6 +766,27 @@ int mtd_del_partition(struct mtd_info *m +@@ -762,6 +766,36 @@ int mtd_del_partition(struct mtd_info *m } EXPORT_SYMBOL_GPL(mtd_del_partition); +static int +run_parsers_by_type(struct mtd_part *slave, enum mtd_parser_type type) +{ -+ struct mtd_partitions pparts = { }; -+ int err; ++ struct mtd_partition *parts; ++ int nr_parts; ++ int i; + -+ pparts.nr_parts = parse_mtd_partitions_by_type(&slave->mtd, type, -+ &pparts.parts, NULL); -+ if (pparts.nr_parts <= 0) -+ return pparts.nr_parts; ++ nr_parts = parse_mtd_partitions_by_type(&slave->mtd, type, (const struct mtd_partition **)&parts, ++ NULL); ++ if (nr_parts <= 0) ++ return nr_parts; + -+ if (WARN_ON(!pparts.parts)) ++ if (WARN_ON(!parts)) + return 0; + -+ err = add_mtd_partitions(&slave->mtd, pparts.parts, pparts.nr_parts); ++ for (i = 0; i < nr_parts; i++) { ++ /* adjust partition offsets */ ++ parts[i].offset += slave->offset; + -+ kfree(pparts.parts); ++ mtd_add_partition(slave->parent, ++ parts[i].name, ++ parts[i].offset, ++ parts[i].size); ++ } + -+ return err ? err : pparts.nr_parts; ++ kfree(parts); ++ ++ return nr_parts; +} + #ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME #define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME #else -@@ -1147,6 +1172,61 @@ void mtd_part_parser_cleanup(struct mtd_ +@@ -1147,6 +1181,61 @@ void mtd_part_parser_cleanup(struct mtd_ } } diff --git a/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch b/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch index 149c328ac..2cc06dd46 100644 --- a/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch +++ b/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch @@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c -@@ -795,6 +795,7 @@ run_parsers_by_type(struct mtd_part *sla +@@ -804,6 +804,7 @@ run_parsers_by_type(struct mtd_part *sla static void split_firmware(struct mtd_info *master, struct mtd_part *part) { @@ -18,7 +18,7 @@ Signed-off-by: Gabor Juhos } static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part) -@@ -804,6 +805,12 @@ static void mtd_partition_split(struct m +@@ -813,6 +814,12 @@ static void mtd_partition_split(struct m if (rootfs_found) return; diff --git a/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch b/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch index d1a32872a..7b481ffb4 100644 --- a/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch +++ b/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch @@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c -@@ -1251,6 +1251,24 @@ int mtd_is_partition(const struct mtd_in +@@ -1260,6 +1260,24 @@ int mtd_is_partition(const struct mtd_in } EXPORT_SYMBOL_GPL(mtd_is_partition); diff --git a/target/linux/generic/pending-4.14/479-mtd-spi-nor-add-xtx-xt25f128b.patch b/target/linux/generic/pending-4.14/479-mtd-spi-nor-add-xtx-xt25f128b.patch deleted file mode 100644 index 7545cf842..000000000 --- a/target/linux/generic/pending-4.14/479-mtd-spi-nor-add-xtx-xt25f128b.patch +++ /dev/null @@ -1,42 +0,0 @@ -From patchwork Thu Feb 6 17:19:41 2020 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Daniel Golle -X-Patchwork-Id: 1234465 -Date: Thu, 6 Feb 2020 19:19:41 +0200 -From: Daniel Golle -To: linux-mtd@lists.infradead.org -Subject: [PATCH v2] mtd: spi-nor: Add support for xt25f128b chip -Message-ID: <20200206171941.GA2398@makrotopia.org> -MIME-Version: 1.0 -Content-Disposition: inline -List-Subscribe: , - -Cc: Eitan Cohen , Piotr Dymacz , - Tudor Ambarus -Sender: "linux-mtd" -Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org - -Add XT25F128B made by XTX Technology (Shenzhen) Limited. -This chip supports dual and quad read and uniform 4K-byte erase. -Verified on Teltonika RUT955 which comes with XT25F128B in recent -versions of the device. - -Signed-off-by: Daniel Golle ---- - drivers/mtd/spi-nor/spi-nor.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/drivers/mtd/spi-nor/spi-nor.c -+++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1198,6 +1198,9 @@ static const struct flash_info spi_nor_i - /* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */ - { "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, -+ -+ /* XTX Technology (Shenzhen) Limited */ -+ { "xt25f128b", INFO(0x0B4018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { }, - }; - diff --git a/target/linux/generic/pending-4.14/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch b/target/linux/generic/pending-4.14/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch index 4e632b05a..5c71c9cf7 100644 --- a/target/linux/generic/pending-4.14/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch +++ b/target/linux/generic/pending-4.14/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch @@ -8,17 +8,22 @@ Signed-off-by: Koen Vandeputte drivers/mtd/spi-nor/spi-nor.c | 5 +++++ 1 file changed, 5 insertions(+) +diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c +index f4afe123e9dc..a34fa42d47a2 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -976,6 +976,11 @@ static const struct flash_info spi_nor_i +@@ -2346,6 +2346,11 @@ static const struct flash_info spi_nor_ids[] = { + { "mb85rs1mt", INFO(0x047f27, 0, 128 * 1024, 1, SPI_NOR_NO_ERASE) }, /* GigaDevice */ - { ++ { + "gd25d05", INFO(0xc84010, 0, 64 * 1024, 1, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | + SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) + }, -+ { + { "gd25q16", INFO(0xc84015, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | - SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) +-- +2.17.1 + diff --git a/target/linux/generic/pending-4.19/479-mtd-spi-nor-add-xtx-xt25f128b.patch b/target/linux/generic/pending-4.19/479-mtd-spi-nor-add-xtx-xt25f128b.patch deleted file mode 100644 index 664837928..000000000 --- a/target/linux/generic/pending-4.19/479-mtd-spi-nor-add-xtx-xt25f128b.patch +++ /dev/null @@ -1,42 +0,0 @@ -From patchwork Thu Feb 6 17:19:41 2020 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Daniel Golle -X-Patchwork-Id: 1234465 -Date: Thu, 6 Feb 2020 19:19:41 +0200 -From: Daniel Golle -To: linux-mtd@lists.infradead.org -Subject: [PATCH v2] mtd: spi-nor: Add support for xt25f128b chip -Message-ID: <20200206171941.GA2398@makrotopia.org> -MIME-Version: 1.0 -Content-Disposition: inline -List-Subscribe: , - -Cc: Eitan Cohen , Piotr Dymacz , - Tudor Ambarus -Sender: "linux-mtd" -Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org - -Add XT25F128B made by XTX Technology (Shenzhen) Limited. -This chip supports dual and quad read and uniform 4K-byte erase. -Verified on Teltonika RUT955 which comes with XT25F128B in recent -versions of the device. - -Signed-off-by: Daniel Golle ---- - drivers/mtd/spi-nor/spi-nor.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/drivers/mtd/spi-nor/spi-nor.c -+++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1273,6 +1273,9 @@ static const struct flash_info spi_nor_i - /* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */ - { "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, -+ -+ /* XTX Technology (Shenzhen) Limited */ -+ { "xt25f128b", INFO(0x0B4018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { }, - }; - diff --git a/target/linux/generic/pending-4.19/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch b/target/linux/generic/pending-4.19/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch index 69c0e66d9..5c71c9cf7 100644 --- a/target/linux/generic/pending-4.19/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch +++ b/target/linux/generic/pending-4.19/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch @@ -8,17 +8,22 @@ Signed-off-by: Koen Vandeputte drivers/mtd/spi-nor/spi-nor.c | 5 +++++ 1 file changed, 5 insertions(+) +diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c +index f4afe123e9dc..a34fa42d47a2 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1017,6 +1017,11 @@ static const struct flash_info spi_nor_i +@@ -2346,6 +2346,11 @@ static const struct flash_info spi_nor_ids[] = { + { "mb85rs1mt", INFO(0x047f27, 0, 128 * 1024, 1, SPI_NOR_NO_ERASE) }, /* GigaDevice */ - { ++ { + "gd25d05", INFO(0xc84010, 0, 64 * 1024, 1, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | + SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) + }, -+ { + { "gd25q16", INFO(0xc84015, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | - SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) +-- +2.17.1 + diff --git a/target/linux/generic/pending-4.19/810-pci_disable_common_quirks.patch b/target/linux/generic/pending-4.19/810-pci_disable_common_quirks.patch index 738bbd71d..c8c28b517 100644 --- a/target/linux/generic/pending-4.19/810-pci_disable_common_quirks.patch +++ b/target/linux/generic/pending-4.19/810-pci_disable_common_quirks.patch @@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos /* * The Mellanox Tavor device gives false positive parity errors. Mark this * device with a broken_parity_status to allow PCI scanning code to "skip" -@@ -3147,6 +3148,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I +@@ -3152,6 +3153,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); @@ -42,7 +42,7 @@ Signed-off-by: Gabor Juhos /* * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. * To work around this, query the size it should be configured to by the -@@ -3172,6 +3175,8 @@ static void quirk_intel_ntb(struct pci_d +@@ -3177,6 +3180,8 @@ static void quirk_intel_ntb(struct pci_d DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb); @@ -51,7 +51,7 @@ Signed-off-by: Gabor Juhos /* * Some BIOS implementations leave the Intel GPU interrupts enabled, even * though no one is handling them (e.g., if the i915 driver is never -@@ -3210,6 +3215,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN +@@ -3215,6 +3220,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq); diff --git a/target/linux/ipq40xx/patches-4.14/303-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch b/target/linux/ipq40xx/patches-4.14/303-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch index 3b219f46b..b77ab89e6 100644 --- a/target/linux/ipq40xx/patches-4.14/303-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch +++ b/target/linux/ipq40xx/patches-4.14/303-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch @@ -1,6 +1,6 @@ --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1037,6 +1037,7 @@ static const struct flash_info spi_nor_i +@@ -1032,6 +1032,7 @@ static const struct flash_info spi_nor_i { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, @@ -8,7 +8,7 @@ { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) }, { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, -@@ -1209,11 +1210,12 @@ static const struct flash_info spi_nor_i +@@ -1205,11 +1206,12 @@ static const struct flash_info spi_nor_i { }, }; @@ -23,7 +23,7 @@ tmp = nor->read_reg(nor, SPINOR_OP_RDID, id, SPI_NOR_MAX_ID_LEN); if (tmp < 0) { -@@ -1224,10 +1226,16 @@ static const struct flash_info *spi_nor_ +@@ -1220,10 +1222,16 @@ static const struct flash_info *spi_nor_ for (tmp = 0; tmp < ARRAY_SIZE(spi_nor_ids) - 1; tmp++) { info = &spi_nor_ids[tmp]; if (info->id_len) { @@ -42,7 +42,7 @@ dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n", id[0], id[1], id[2]); return ERR_PTR(-ENODEV); -@@ -2687,7 +2695,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -2683,7 +2691,7 @@ int spi_nor_scan(struct spi_nor *nor, co info = spi_nor_match_id(name); /* Try to auto-detect if chip name wasn't specified or not found */ if (!info) @@ -51,7 +51,7 @@ if (IS_ERR_OR_NULL(info)) return -ENOENT; -@@ -2698,7 +2706,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -2694,7 +2702,7 @@ int spi_nor_scan(struct spi_nor *nor, co if (name && info->id_len) { const struct flash_info *jinfo; diff --git a/target/linux/ipq40xx/patches-4.19/303-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch b/target/linux/ipq40xx/patches-4.19/303-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch index 6f7a3a693..66746b962 100644 --- a/target/linux/ipq40xx/patches-4.19/303-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch +++ b/target/linux/ipq40xx/patches-4.19/303-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch @@ -1,6 +1,6 @@ --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1099,6 +1099,7 @@ static const struct flash_info spi_nor_i +@@ -1094,6 +1094,7 @@ static const struct flash_info spi_nor_i { "mx25u12835f", INFO(0xc22538, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, @@ -8,7 +8,7 @@ { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) }, { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, -@@ -1284,11 +1285,12 @@ static const struct flash_info spi_nor_i +@@ -1280,11 +1281,12 @@ static const struct flash_info spi_nor_i { }, }; @@ -23,7 +23,7 @@ tmp = nor->read_reg(nor, SPINOR_OP_RDID, id, SPI_NOR_MAX_ID_LEN); if (tmp < 0) { -@@ -1299,10 +1301,16 @@ static const struct flash_info *spi_nor_ +@@ -1295,10 +1297,16 @@ static const struct flash_info *spi_nor_ for (tmp = 0; tmp < ARRAY_SIZE(spi_nor_ids) - 1; tmp++) { info = &spi_nor_ids[tmp]; if (info->id_len) { @@ -42,7 +42,7 @@ dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n", id[0], id[1], id[2]); return ERR_PTR(-ENODEV); -@@ -2836,7 +2844,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -2832,7 +2840,7 @@ int spi_nor_scan(struct spi_nor *nor, co info = spi_nor_match_id(name); /* Try to auto-detect if chip name wasn't specified or not found */ if (!info) @@ -51,7 +51,7 @@ if (IS_ERR_OR_NULL(info)) return -ENOENT; -@@ -2847,7 +2855,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -2843,7 +2851,7 @@ int spi_nor_scan(struct spi_nor *nor, co if (name && info->id_len) { const struct flash_info *jinfo; @@ -59,4 +59,4 @@ + jinfo = spi_nor_read_id(nor, name); if (IS_ERR(jinfo)) { return PTR_ERR(jinfo); - } else if (jinfo != info) { + } else if (jinfo != info) { \ No newline at end of file diff --git a/target/linux/ipq40xx/patches-4.19/304-mtd-spi-nor-Add-support-for-mx25r3235f.patch b/target/linux/ipq40xx/patches-4.19/304-mtd-spi-nor-Add-support-for-mx25r3235f.patch deleted file mode 100644 index ad66f409b..000000000 --- a/target/linux/ipq40xx/patches-4.19/304-mtd-spi-nor-Add-support-for-mx25r3235f.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 158acdbf0336f601971637f988b57a6a67a0869b Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Sun, 15 Dec 2019 13:10:50 +0100 -Subject: [PATCH] mtd: spi-nor: Add support for mx25r3235f - -Add MTD support for the Macronix MX25R3235F SPI NOR chip from Macronix. -The chip has 4MB of total capacity, divided into a total of 64 sectors, -each 64KB sized. The chip also supports 4KB large sectors. -Additionally, it supports dual and quad read modes. - -Signed-off-by: David Bauer ---- - drivers/mtd/spi-nor/spi-nor.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/mtd/spi-nor/spi-nor.c -+++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1096,6 +1096,8 @@ static const struct flash_info spi_nor_i - { "mx25u6435f", INFO(0xc22537, 0, 64 * 1024, 128, SECT_4K) }, - { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, - { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, -+ { "mx25r3235f", INFO(0xc22816, 0, 64 * 1024, 64, -+ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "mx25u12835f", INFO(0xc22538, 0, 64 * 1024, 256, - SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, diff --git a/target/linux/ipq40xx/patches-4.19/710-net-add-qualcomm-essedma-ethernet-driver.patch b/target/linux/ipq40xx/patches-4.19/710-net-add-qualcomm-essedma-ethernet-driver.patch index 6ccf2cd48..8344b25ea 100644 --- a/target/linux/ipq40xx/patches-4.19/710-net-add-qualcomm-essedma-ethernet-driver.patch +++ b/target/linux/ipq40xx/patches-4.19/710-net-add-qualcomm-essedma-ethernet-driver.patch @@ -1523,7 +1523,7 @@ Signed-off-by: Christian Lamparter + int res; + + if (skb->protocol == htons(ETH_P_IPV6)) { -+ dev_err(&adapter->pdev->dev, "IPv6 not supported\n"); ++ + res = -EINVAL; + goto no_protocol_err; + } diff --git a/target/linux/ipq806x/patches-4.14/105-mtd-nor-add-mx25l25635f.patch b/target/linux/ipq806x/patches-4.14/105-mtd-nor-add-mx25l25635f.patch index 2bd18ffa1..0986d9907 100644 --- a/target/linux/ipq806x/patches-4.14/105-mtd-nor-add-mx25l25635f.patch +++ b/target/linux/ipq806x/patches-4.14/105-mtd-nor-add-mx25l25635f.patch @@ -11,7 +11,7 @@ the ubi volume created by the other. --- --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1036,7 +1036,7 @@ static const struct flash_info spi_nor_i +@@ -1031,7 +1031,7 @@ static const struct flash_info spi_nor_i { "mx25u6435f", INFO(0xc22537, 0, 64 * 1024, 128, SECT_4K) }, { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, diff --git a/target/linux/kirkwood/patches-4.14/101-iconnect.patch b/target/linux/kirkwood/patches-4.14/101-iconnect.patch index d2310b80a..ab47b5a72 100644 --- a/target/linux/kirkwood/patches-4.14/101-iconnect.patch +++ b/target/linux/kirkwood/patches-4.14/101-iconnect.patch @@ -30,15 +30,15 @@ partition@100000 { - label = "zImage"; - reg = <0x100000 0x300000>; -- }; -- -- partition@540000 { -- label = "initrd"; -- reg = <0x540000 0x300000>; + label = "second stage u-boot"; + reg = <0x100000 0x200000>; }; +- partition@540000 { +- label = "initrd"; +- reg = <0x540000 0x300000>; +- }; +- - partition@980000 { - label = "boot"; - reg = <0x980000 0x1f400000>; diff --git a/target/linux/kirkwood/patches-4.14/109-pogoplug_v4.patch b/target/linux/kirkwood/patches-4.14/109-pogoplug_v4.patch index cc72ffb23..b4e53cd65 100644 --- a/target/linux/kirkwood/patches-4.14/109-pogoplug_v4.patch +++ b/target/linux/kirkwood/patches-4.14/109-pogoplug_v4.patch @@ -38,16 +38,16 @@ - partition@500000 { - label = "uImage2"; - reg = <0x00500000 0x300000>; -- }; -- -- partition@800000 { -- label = "failsafe"; -- reg = <0x00800000 0x800000>; + partition@1c0000 { + label = "uboot_env"; + reg = <0x001c0000 0x40000>; }; +- partition@800000 { +- label = "failsafe"; +- reg = <0x00800000 0x800000>; +- }; +- - partition@1000000 { - label = "root"; - reg = <0x01000000 0x7000000>; diff --git a/target/linux/kirkwood/patches-4.19/101-iconnect.patch b/target/linux/kirkwood/patches-4.19/101-iconnect.patch index d2310b80a..ab47b5a72 100644 --- a/target/linux/kirkwood/patches-4.19/101-iconnect.patch +++ b/target/linux/kirkwood/patches-4.19/101-iconnect.patch @@ -30,15 +30,15 @@ partition@100000 { - label = "zImage"; - reg = <0x100000 0x300000>; -- }; -- -- partition@540000 { -- label = "initrd"; -- reg = <0x540000 0x300000>; + label = "second stage u-boot"; + reg = <0x100000 0x200000>; }; +- partition@540000 { +- label = "initrd"; +- reg = <0x540000 0x300000>; +- }; +- - partition@980000 { - label = "boot"; - reg = <0x980000 0x1f400000>; diff --git a/target/linux/kirkwood/patches-4.19/109-pogoplug_v4.patch b/target/linux/kirkwood/patches-4.19/109-pogoplug_v4.patch index 26b631427..b54768290 100644 --- a/target/linux/kirkwood/patches-4.19/109-pogoplug_v4.patch +++ b/target/linux/kirkwood/patches-4.19/109-pogoplug_v4.patch @@ -38,16 +38,16 @@ - partition@500000 { - label = "uImage2"; - reg = <0x00500000 0x300000>; -- }; -- -- partition@800000 { -- label = "failsafe"; -- reg = <0x00800000 0x800000>; + partition@1c0000 { + label = "uboot_env"; + reg = <0x001c0000 0x40000>; }; +- partition@800000 { +- label = "failsafe"; +- reg = <0x00800000 0x800000>; +- }; +- - partition@1000000 { - label = "root"; - reg = <0x01000000 0x7000000>; diff --git a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch index 2aa77f1a3..a569dff7d 100644 --- a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch @@ -346,7 +346,7 @@ Signed-off-by: Zhao Chenhui return 0; err4: -@@ -1076,6 +1228,8 @@ static void dwc3_get_properties(struct d +@@ -1073,6 +1225,8 @@ static void dwc3_get_properties(struct d &hird_threshold); dwc->usb3_lpm_capable = device_property_read_bool(dev, "snps,usb3_lpm_capable"); @@ -355,7 +355,7 @@ Signed-off-by: Zhao Chenhui dwc->disable_scramble_quirk = device_property_read_bool(dev, "snps,disable_scramble_quirk"); -@@ -1108,8 +1262,16 @@ static void dwc3_get_properties(struct d +@@ -1105,8 +1259,16 @@ static void dwc3_get_properties(struct d dwc->dis_tx_ipgap_linecheck_quirk = device_property_read_bool(dev, "snps,dis-tx-ipgap-linecheck-quirk"); @@ -372,7 +372,7 @@ Signed-off-by: Zhao Chenhui device_property_read_u8(dev, "snps,tx_de_emphasis", &tx_de_emphasis); device_property_read_string(dev, "snps,hsphy_interface", -@@ -1120,6 +1282,9 @@ static void dwc3_get_properties(struct d +@@ -1117,6 +1279,9 @@ static void dwc3_get_properties(struct d dwc->dis_metastability_quirk = device_property_read_bool(dev, "snps,dis_metastability_quirk"); @@ -382,7 +382,7 @@ Signed-off-by: Zhao Chenhui dwc->lpm_nyet_threshold = lpm_nyet_threshold; dwc->tx_de_emphasis = tx_de_emphasis; -@@ -1371,12 +1536,14 @@ static int dwc3_resume_common(struct dwc +@@ -1368,12 +1533,14 @@ static int dwc3_resume_common(struct dwc switch (dwc->dr_mode) { case USB_DR_MODE_PERIPHERAL: diff --git a/target/linux/layerscape/patches-4.14/810-kvm-support-layerscape.patch b/target/linux/layerscape/patches-4.14/810-kvm-support-layerscape.patch index 5c8cd4418..470aa683f 100644 --- a/target/linux/layerscape/patches-4.14/810-kvm-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/810-kvm-support-layerscape.patch @@ -158,7 +158,7 @@ Signed-off-by: Signed-off-by: Biwen Li if (kvm_is_device_pfn(pfn)) { mem_type = PAGE_S2_DEVICE; flags |= KVM_S2PTE_FLAG_IS_IOMAP; -@@ -1919,6 +1962,9 @@ int kvm_arch_prepare_memory_region(struc +@@ -1918,6 +1961,9 @@ int kvm_arch_prepare_memory_region(struc gpa_t gpa = mem->guest_phys_addr + (vm_start - mem->userspace_addr); phys_addr_t pa; @@ -168,7 +168,7 @@ Signed-off-by: Signed-off-by: Biwen Li pa = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT; pa += vm_start - vma->vm_start; -@@ -1929,9 +1975,13 @@ int kvm_arch_prepare_memory_region(struc +@@ -1928,9 +1974,13 @@ int kvm_arch_prepare_memory_region(struc goto out; } diff --git a/target/linux/layerscape/patches-4.14/812-flexspi-support-layerscape.patch b/target/linux/layerscape/patches-4.14/812-flexspi-support-layerscape.patch index e35610168..fa1cdf075 100644 --- a/target/linux/layerscape/patches-4.14/812-flexspi-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/812-flexspi-support-layerscape.patch @@ -1512,7 +1512,7 @@ Signed-off-by: Yogesh Gaur case SNOR_MFR_MICRON: /* Some Micron need WREN command; all will accept it */ need_wren = true; -@@ -1044,7 +1045,7 @@ static const struct flash_info spi_nor_i +@@ -1039,7 +1040,7 @@ static const struct flash_info spi_nor_i { "mx66l1g45g", INFO(0xc2201b, 0, 64 * 1024, 2048, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, @@ -1521,7 +1521,7 @@ Signed-off-by: Yogesh Gaur { "n25q016a", INFO(0x20bb15, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_QUAD_READ) }, { "n25q032", INFO(0x20ba16, 0, 64 * 1024, 64, SPI_NOR_QUAD_READ) }, { "n25q032a", INFO(0x20bb16, 0, 64 * 1024, 64, SPI_NOR_QUAD_READ) }, -@@ -1059,6 +1060,12 @@ static const struct flash_info spi_nor_i +@@ -1054,6 +1055,12 @@ static const struct flash_info spi_nor_i { "n25q00", INFO(0x20ba21, 0, 64 * 1024, 2048, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) }, { "n25q00a", INFO(0x20bb21, 0, 64 * 1024, 2048, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) }, @@ -1534,7 +1534,7 @@ Signed-off-by: Yogesh Gaur /* PMC */ { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) }, -@@ -2439,6 +2446,7 @@ static int spi_nor_init_params(struct sp +@@ -2435,6 +2442,7 @@ static int spi_nor_init_params(struct sp params->quad_enable = macronix_quad_enable; break; @@ -1542,7 +1542,7 @@ Signed-off-by: Yogesh Gaur case SNOR_MFR_MICRON: break; -@@ -2757,7 +2765,8 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -2753,7 +2761,8 @@ int spi_nor_scan(struct spi_nor *nor, co mtd->_read = spi_nor_read; /* NOR protection support for STmicro/Micron chips and similar */ diff --git a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch index 6cfc43423..216bef0c3 100644 --- a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch @@ -5618,7 +5618,7 @@ Signed-off-by: Yangbo Lu static void quirk_no_pm_reset(struct pci_dev *dev) { /* -@@ -4918,3 +4925,11 @@ static void quirk_no_ats(struct pci_dev +@@ -4884,3 +4891,11 @@ static void quirk_no_ats(struct pci_dev DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x98e4, quirk_no_ats); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x6900, quirk_no_ats); #endif /* CONFIG_PCI_ATS */ diff --git a/target/linux/layerscape/patches-4.14/817-platform-security-support-layerscape.patch b/target/linux/layerscape/patches-4.14/817-platform-security-support-layerscape.patch index 55e7209ce..a9728cc05 100644 --- a/target/linux/layerscape/patches-4.14/817-platform-security-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/817-platform-security-support-layerscape.patch @@ -124,7 +124,7 @@ Signed-off-by: Biwen Li L: keyrings@vger.kernel.org --- a/drivers/tee/optee/Kconfig +++ b/drivers/tee/optee/Kconfig -@@ -6,3 +6,11 @@ config OPTEE +@@ -5,3 +5,11 @@ config OPTEE help This implements the OP-TEE Trusted Execution Environment (TEE) driver. diff --git a/target/linux/layerscape/patches-4.14/818-qspi-support-layerscape.patch b/target/linux/layerscape/patches-4.14/818-qspi-support-layerscape.patch index 1546e4b6a..744245499 100644 --- a/target/linux/layerscape/patches-4.14/818-qspi-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/818-qspi-support-layerscape.patch @@ -718,7 +718,7 @@ Signed-off-by: Yogesh Gaur --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1159,6 +1159,11 @@ static const struct flash_info spi_nor_i +@@ -1154,6 +1154,11 @@ static const struct flash_info spi_nor_i { "w25x40", INFO(0xef3013, 0, 64 * 1024, 8, SECT_4K) }, { "w25x80", INFO(0xef3014, 0, 64 * 1024, 16, SECT_4K) }, { "w25x16", INFO(0xef3015, 0, 64 * 1024, 32, SECT_4K) }, diff --git a/target/linux/mpc85xx/patches-4.14/102-powerpc-add-cmdline-override.patch b/target/linux/mpc85xx/patches-4.14/102-powerpc-add-cmdline-override.patch index 087798e3d..69dd1305d 100644 --- a/target/linux/mpc85xx/patches-4.14/102-powerpc-add-cmdline-override.patch +++ b/target/linux/mpc85xx/patches-4.14/102-powerpc-add-cmdline-override.patch @@ -1,6 +1,6 @@ --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig -@@ -837,6 +837,14 @@ config CMDLINE_FORCE +@@ -836,6 +836,14 @@ config CMDLINE_FORCE This is useful if you cannot or don't want to change the command-line options your boot loader passes to the kernel. diff --git a/target/linux/mpc85xx/patches-4.19/102-powerpc-add-cmdline-override.patch b/target/linux/mpc85xx/patches-4.19/102-powerpc-add-cmdline-override.patch index 7bdbd7953..a99555f94 100644 --- a/target/linux/mpc85xx/patches-4.19/102-powerpc-add-cmdline-override.patch +++ b/target/linux/mpc85xx/patches-4.19/102-powerpc-add-cmdline-override.patch @@ -1,6 +1,6 @@ --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig -@@ -810,6 +810,14 @@ config CMDLINE_FORCE +@@ -809,6 +809,14 @@ config CMDLINE_FORCE This is useful if you cannot or don't want to change the command-line options your boot loader passes to the kernel. diff --git a/target/linux/mvebu/patches-4.19/300-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-4.19/300-mvneta-tx-queue-workaround.patch index 4a5ea3614..c27b5d947 100644 --- a/target/linux/mvebu/patches-4.19/300-mvneta-tx-queue-workaround.patch +++ b/target/linux/mvebu/patches-4.19/300-mvneta-tx-queue-workaround.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -4272,6 +4272,15 @@ static int mvneta_ethtool_set_eee(struct +@@ -4257,6 +4257,15 @@ static int mvneta_ethtool_set_eee(struct return phylink_ethtool_set_eee(pp->phylink, eee); } @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau static const struct net_device_ops mvneta_netdev_ops = { .ndo_open = mvneta_open, .ndo_stop = mvneta_stop, -@@ -4282,6 +4291,7 @@ static const struct net_device_ops mvnet +@@ -4267,6 +4276,7 @@ static const struct net_device_ops mvnet .ndo_fix_features = mvneta_fix_features, .ndo_get_stats64 = mvneta_get_stats64, .ndo_do_ioctl = mvneta_ioctl, diff --git a/target/linux/mvebu/patches-4.19/531-net-mvneta-Add-support-for-2500Mbps-SGMII.patch b/target/linux/mvebu/patches-4.19/531-net-mvneta-Add-support-for-2500Mbps-SGMII.patch index a5553a3e9..0368ba950 100644 --- a/target/linux/mvebu/patches-4.19/531-net-mvneta-Add-support-for-2500Mbps-SGMII.patch +++ b/target/linux/mvebu/patches-4.19/531-net-mvneta-Add-support-for-2500Mbps-SGMII.patch @@ -32,7 +32,7 @@ Signed-off-by: David S. Miller #define MVNETA_MIB_COUNTERS_BASE 0x3000 #define MVNETA_MIB_LATE_COLLISION 0x7c #define MVNETA_DA_FILT_SPEC_MCAST 0x3400 -@@ -3359,6 +3361,7 @@ static void mvneta_validate(struct net_d +@@ -3344,6 +3346,7 @@ static void mvneta_validate(struct net_d if (state->interface != PHY_INTERFACE_MODE_NA && state->interface != PHY_INTERFACE_MODE_QSGMII && state->interface != PHY_INTERFACE_MODE_SGMII && @@ -40,7 +40,7 @@ Signed-off-by: David S. Miller !phy_interface_mode_is_8023z(state->interface) && !phy_interface_mode_is_rgmii(state->interface)) { bitmap_zero(supported, __ETHTOOL_LINK_MODE_MASK_NBITS); -@@ -3371,9 +3374,15 @@ static void mvneta_validate(struct net_d +@@ -3356,9 +3359,15 @@ static void mvneta_validate(struct net_d /* Asymmetric pause is unsupported */ phylink_set(mask, Pause); @@ -59,7 +59,7 @@ Signed-off-by: David S. Miller if (!phy_interface_mode_is_8023z(state->interface)) { /* 10M and 100M are only supported in non-802.3z mode */ -@@ -3434,12 +3443,14 @@ static void mvneta_mac_config(struct net +@@ -3419,12 +3428,14 @@ static void mvneta_mac_config(struct net struct mvneta_port *pp = netdev_priv(ndev); u32 new_ctrl0, gmac_ctrl0 = mvreg_read(pp, MVNETA_GMAC_CTRL_0); u32 new_ctrl2, gmac_ctrl2 = mvreg_read(pp, MVNETA_GMAC_CTRL_2); @@ -74,7 +74,7 @@ Signed-off-by: David S. Miller new_clk = gmac_clk & ~MVNETA_GMAC_1MS_CLOCK_ENABLE; new_an = gmac_an & ~(MVNETA_GMAC_INBAND_AN_ENABLE | MVNETA_GMAC_INBAND_RESTART_AN | -@@ -3472,7 +3483,7 @@ static void mvneta_mac_config(struct net +@@ -3457,7 +3468,7 @@ static void mvneta_mac_config(struct net if (state->duplex) new_an |= MVNETA_GMAC_CONFIG_FULL_DUPLEX; @@ -83,7 +83,7 @@ Signed-off-by: David S. Miller new_an |= MVNETA_GMAC_CONFIG_GMII_SPEED; else if (state->speed == SPEED_100) new_an |= MVNETA_GMAC_CONFIG_MII_SPEED; -@@ -3511,10 +3522,18 @@ static void mvneta_mac_config(struct net +@@ -3496,10 +3507,18 @@ static void mvneta_mac_config(struct net MVNETA_GMAC_FORCE_LINK_DOWN); } diff --git a/target/linux/mvebu/patches-4.19/532-net-mvneta-correct-typo.patch b/target/linux/mvebu/patches-4.19/532-net-mvneta-correct-typo.patch index b6e16c54a..bff7621fa 100644 --- a/target/linux/mvebu/patches-4.19/532-net-mvneta-correct-typo.patch +++ b/target/linux/mvebu/patches-4.19/532-net-mvneta-correct-typo.patch @@ -13,7 +13,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -495,7 +495,7 @@ struct mvneta_port { +@@ -493,7 +493,7 @@ struct mvneta_port { #if defined(__LITTLE_ENDIAN) struct mvneta_tx_desc { u32 command; /* Options used by HW for packet transmitting.*/ @@ -22,7 +22,7 @@ Signed-off-by: David S. Miller u16 data_size; /* Data size of transmitted packet in bytes */ u32 buf_phys_addr; /* Physical addr of transmitted buffer */ u32 reserved2; /* hw_cmd - (for future use, PMT) */ -@@ -520,7 +520,7 @@ struct mvneta_rx_desc { +@@ -518,7 +518,7 @@ struct mvneta_rx_desc { #else struct mvneta_tx_desc { u16 data_size; /* Data size of transmitted packet in bytes */ diff --git a/target/linux/mvebu/patches-4.19/533-net-mvneta-Dont-advertise-2.5G-modes.patch b/target/linux/mvebu/patches-4.19/533-net-mvneta-Dont-advertise-2.5G-modes.patch index 01b101283..31292a638 100644 --- a/target/linux/mvebu/patches-4.19/533-net-mvneta-Dont-advertise-2.5G-modes.patch +++ b/target/linux/mvebu/patches-4.19/533-net-mvneta-Dont-advertise-2.5G-modes.patch @@ -27,7 +27,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3361,7 +3361,6 @@ static void mvneta_validate(struct net_d +@@ -3346,7 +3346,6 @@ static void mvneta_validate(struct net_d if (state->interface != PHY_INTERFACE_MODE_NA && state->interface != PHY_INTERFACE_MODE_QSGMII && state->interface != PHY_INTERFACE_MODE_SGMII && @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller !phy_interface_mode_is_8023z(state->interface) && !phy_interface_mode_is_rgmii(state->interface)) { bitmap_zero(supported, __ETHTOOL_LINK_MODE_MASK_NBITS); -@@ -3375,14 +3374,9 @@ static void mvneta_validate(struct net_d +@@ -3360,14 +3359,9 @@ static void mvneta_validate(struct net_d /* Asymmetric pause is unsupported */ phylink_set(mask, Pause); diff --git a/target/linux/mvebu/patches-4.19/534-net-mvneta-remove-redundant-check-for.patch b/target/linux/mvebu/patches-4.19/534-net-mvneta-remove-redundant-check-for.patch index fd774e083..005ea6e51 100644 --- a/target/linux/mvebu/patches-4.19/534-net-mvneta-remove-redundant-check-for.patch +++ b/target/linux/mvebu/patches-4.19/534-net-mvneta-remove-redundant-check-for.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -4268,8 +4268,7 @@ static int mvneta_ethtool_set_eee(struct +@@ -4253,8 +4253,7 @@ static int mvneta_ethtool_set_eee(struct /* The Armada 37x documents do not give limits for this other than * it being an 8-bit register. */ diff --git a/target/linux/mvebu/patches-4.19/535-net-marvell-neta-add-comphy-support.patch b/target/linux/mvebu/patches-4.19/535-net-marvell-neta-add-comphy-support.patch index 272beb695..257cfdec4 100644 --- a/target/linux/mvebu/patches-4.19/535-net-marvell-neta-add-comphy-support.patch +++ b/target/linux/mvebu/patches-4.19/535-net-marvell-neta-add-comphy-support.patch @@ -23,7 +23,7 @@ Signed-off-by: David S. Miller #include #include #include -@@ -438,6 +439,7 @@ struct mvneta_port { +@@ -436,6 +437,7 @@ struct mvneta_port { struct device_node *dn; unsigned int tx_csum_limit; struct phylink *phylink; @@ -31,7 +31,7 @@ Signed-off-by: David S. Miller struct mvneta_bm *bm_priv; struct mvneta_bm_pool *pool_long; -@@ -3168,6 +3170,8 @@ static void mvneta_start_dev(struct mvne +@@ -3153,6 +3155,8 @@ static void mvneta_start_dev(struct mvne { int cpu; @@ -40,7 +40,7 @@ Signed-off-by: David S. Miller mvneta_max_rx_size_set(pp, pp->pkt_size); mvneta_txq_max_tx_size_set(pp, pp->pkt_size); -@@ -3230,6 +3234,8 @@ static void mvneta_stop_dev(struct mvnet +@@ -3215,6 +3219,8 @@ static void mvneta_stop_dev(struct mvnet mvneta_tx_reset(pp); mvneta_rx_reset(pp); @@ -49,7 +49,7 @@ Signed-off-by: David S. Miller } static void mvneta_percpu_enable(void *arg) -@@ -3355,6 +3361,7 @@ static int mvneta_set_mac_addr(struct ne +@@ -3340,6 +3346,7 @@ static int mvneta_set_mac_addr(struct ne static void mvneta_validate(struct net_device *ndev, unsigned long *supported, struct phylink_link_state *state) { @@ -57,7 +57,7 @@ Signed-off-by: David S. Miller __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; /* We only support QSGMII, SGMII, 802.3z and RGMII modes */ -@@ -3375,8 +3382,13 @@ static void mvneta_validate(struct net_d +@@ -3360,8 +3367,13 @@ static void mvneta_validate(struct net_d phylink_set(mask, Pause); /* Half-duplex at speeds higher than 100Mbit is unsupported */ @@ -73,7 +73,7 @@ Signed-off-by: David S. Miller if (!phy_interface_mode_is_8023z(state->interface)) { /* 10M and 100M are only supported in non-802.3z mode */ -@@ -3390,6 +3402,11 @@ static void mvneta_validate(struct net_d +@@ -3375,6 +3387,11 @@ static void mvneta_validate(struct net_d __ETHTOOL_LINK_MODE_MASK_NBITS); bitmap_and(state->advertising, state->advertising, mask, __ETHTOOL_LINK_MODE_MASK_NBITS); @@ -85,7 +85,7 @@ Signed-off-by: David S. Miller } static int mvneta_mac_link_state(struct net_device *ndev, -@@ -3401,7 +3418,9 @@ static int mvneta_mac_link_state(struct +@@ -3386,7 +3403,9 @@ static int mvneta_mac_link_state(struct gmac_stat = mvreg_read(pp, MVNETA_GMAC_STATUS); if (gmac_stat & MVNETA_GMAC_SPEED_1000) @@ -96,7 +96,7 @@ Signed-off-by: David S. Miller else if (gmac_stat & MVNETA_GMAC_SPEED_100) state->speed = SPEED_100; else -@@ -3516,12 +3535,20 @@ static void mvneta_mac_config(struct net +@@ -3501,12 +3520,20 @@ static void mvneta_mac_config(struct net MVNETA_GMAC_FORCE_LINK_DOWN); } @@ -117,7 +117,7 @@ Signed-off-by: David S. Miller if (new_ctrl0 != gmac_ctrl0) mvreg_write(pp, MVNETA_GMAC_CTRL_0, new_ctrl0); if (new_ctrl2 != gmac_ctrl2) -@@ -4434,7 +4461,7 @@ static int mvneta_port_power_up(struct m +@@ -4419,7 +4446,7 @@ static int mvneta_port_power_up(struct m if (phy_mode == PHY_INTERFACE_MODE_QSGMII) mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_QSGMII_SERDES_PROTO); else if (phy_mode == PHY_INTERFACE_MODE_SGMII || @@ -126,7 +126,7 @@ Signed-off-by: David S. Miller mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_SGMII_SERDES_PROTO); else if (!phy_interface_mode_is_rgmii(phy_mode)) return -EINVAL; -@@ -4451,6 +4478,7 @@ static int mvneta_probe(struct platform_ +@@ -4436,6 +4463,7 @@ static int mvneta_probe(struct platform_ struct mvneta_port *pp; struct net_device *dev; struct phylink *phylink; @@ -134,7 +134,7 @@ Signed-off-by: David S. Miller const char *dt_mac_addr; char hw_mac_addr[ETH_ALEN]; const char *mac_from; -@@ -4476,6 +4504,14 @@ static int mvneta_probe(struct platform_ +@@ -4461,6 +4489,14 @@ static int mvneta_probe(struct platform_ goto err_free_irq; } @@ -149,7 +149,7 @@ Signed-off-by: David S. Miller phylink = phylink_create(dev, pdev->dev.fwnode, phy_mode, &mvneta_phylink_ops); if (IS_ERR(phylink)) { -@@ -4492,6 +4528,7 @@ static int mvneta_probe(struct platform_ +@@ -4477,6 +4513,7 @@ static int mvneta_probe(struct platform_ pp = netdev_priv(dev); spin_lock_init(&pp->lock); pp->phylink = phylink; diff --git a/target/linux/mvebu/patches-4.19/536-net-marvell-neta-disable-comphy-when-setting-mode.patch b/target/linux/mvebu/patches-4.19/536-net-marvell-neta-disable-comphy-when-setting-mode.patch index bac9a55cf..9abb00c50 100644 --- a/target/linux/mvebu/patches-4.19/536-net-marvell-neta-disable-comphy-when-setting-mode.patch +++ b/target/linux/mvebu/patches-4.19/536-net-marvell-neta-disable-comphy-when-setting-mode.patch @@ -28,7 +28,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3166,11 +3166,26 @@ static int mvneta_setup_txqs(struct mvne +@@ -3151,11 +3151,26 @@ static int mvneta_setup_txqs(struct mvne return 0; } @@ -56,7 +56,7 @@ Signed-off-by: David S. Miller mvneta_max_rx_size_set(pp, pp->pkt_size); mvneta_txq_max_tx_size_set(pp, pp->pkt_size); -@@ -3542,12 +3557,15 @@ static void mvneta_mac_config(struct net +@@ -3527,12 +3542,15 @@ static void mvneta_mac_config(struct net if (state->speed == SPEED_2500) new_ctrl4 |= MVNETA_GMAC4_SHORT_PREAMBLE_ENABLE; diff --git a/target/linux/mvebu/patches-4.19/537-net-mvneta-add-2500baset-support.patch b/target/linux/mvebu/patches-4.19/537-net-mvneta-add-2500baset-support.patch index 9186ceb0d..6629547ee 100644 --- a/target/linux/mvebu/patches-4.19/537-net-mvneta-add-2500baset-support.patch +++ b/target/linux/mvebu/patches-4.19/537-net-mvneta-add-2500baset-support.patch @@ -24,7 +24,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3402,6 +3402,7 @@ static void mvneta_validate(struct net_d +@@ -3387,6 +3387,7 @@ static void mvneta_validate(struct net_d phylink_set(mask, 1000baseX_Full); } if (pp->comphy || state->interface == PHY_INTERFACE_MODE_2500BASEX) { diff --git a/target/linux/pistachio/patches-4.14/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/pistachio/patches-4.14/401-mtd-nor-support-mtd-name-from-device-tree.patch index 065a0b77b..f35b3901e 100644 --- a/target/linux/pistachio/patches-4.14/401-mtd-nor-support-mtd-name-from-device-tree.patch +++ b/target/linux/pistachio/patches-4.14/401-mtd-nor-support-mtd-name-from-device-tree.patch @@ -10,7 +10,7 @@ Signed-off-by: Abhimanyu Vishwakarma --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -2671,6 +2671,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -2667,6 +2667,7 @@ int spi_nor_scan(struct spi_nor *nor, co struct device *dev = nor->dev; struct mtd_info *mtd = &nor->mtd; struct device_node *np = spi_nor_get_flash_node(nor); @@ -18,7 +18,7 @@ Signed-off-by: Abhimanyu Vishwakarma int ret; int i; -@@ -2746,7 +2747,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -2742,7 +2743,12 @@ int spi_nor_scan(struct spi_nor *nor, co spi_nor_wait_till_ready(nor); } diff --git a/target/linux/ramips/patches-4.14/0031-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-4.14/0031-uvc-add-iPassion-iP2970-support.patch index 7ed1a616f..0b305a810 100644 --- a/target/linux/ramips/patches-4.14/0031-uvc-add-iPassion-iP2970-support.patch +++ b/target/linux/ramips/patches-4.14/0031-uvc-add-iPassion-iP2970-support.patch @@ -13,7 +13,7 @@ Signed-off-by: John Crispin --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c -@@ -2749,6 +2749,18 @@ static const struct usb_device_id uvc_id +@@ -2737,6 +2737,18 @@ static const struct usb_device_id uvc_id .bInterfaceSubClass = 1, .bInterfaceProtocol = 0, .driver_info = UVC_QUIRK_FORCE_Y8 }, diff --git a/target/linux/ramips/patches-4.14/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch b/target/linux/ramips/patches-4.14/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch index aa2fb60a2..dee65a839 100644 --- a/target/linux/ramips/patches-4.14/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch +++ b/target/linux/ramips/patches-4.14/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch @@ -116,7 +116,7 @@ Signed-off-by: Felix Fietkau spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_LOCK); return ret; -@@ -1182,7 +1234,7 @@ static const struct flash_info spi_nor_i +@@ -1177,7 +1229,7 @@ static const struct flash_info spi_nor_i { "w25q80", INFO(0xef5014, 0, 64 * 1024, 16, SECT_4K) }, { "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K) }, { "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) }, @@ -125,7 +125,7 @@ Signed-off-by: Felix Fietkau { "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ) }, -@@ -1245,6 +1297,9 @@ static int spi_nor_read(struct mtd_info +@@ -1241,6 +1293,9 @@ static int spi_nor_read(struct mtd_info if (ret) return ret; @@ -135,7 +135,7 @@ Signed-off-by: Felix Fietkau while (len) { loff_t addr = from; -@@ -1269,6 +1324,18 @@ static int spi_nor_read(struct mtd_info +@@ -1265,6 +1320,18 @@ static int spi_nor_read(struct mtd_info ret = 0; read_err: @@ -154,7 +154,7 @@ Signed-off-by: Felix Fietkau spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_READ); return ret; } -@@ -1370,6 +1437,10 @@ static int spi_nor_write(struct mtd_info +@@ -1366,6 +1433,10 @@ static int spi_nor_write(struct mtd_info if (ret) return ret; @@ -165,7 +165,7 @@ Signed-off-by: Felix Fietkau for (i = 0; i < len; ) { ssize_t written; loff_t addr = to + i; -@@ -1410,6 +1481,7 @@ static int spi_nor_write(struct mtd_info +@@ -1406,6 +1477,7 @@ static int spi_nor_write(struct mtd_info } write_err: @@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE); return ret; } -@@ -2826,8 +2898,10 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -2822,8 +2894,10 @@ int spi_nor_scan(struct spi_nor *nor, co } else if (mtd->size > 0x1000000) { /* enable 4-byte addressing if the device exceeds 16MiB */ nor->addr_width = 4; diff --git a/target/linux/ramips/patches-4.14/0054-mtd-spi-nor-w25q256-respect-default-mode.patch b/target/linux/ramips/patches-4.14/0054-mtd-spi-nor-w25q256-respect-default-mode.patch index a68693798..9ea2a1135 100644 --- a/target/linux/ramips/patches-4.14/0054-mtd-spi-nor-w25q256-respect-default-mode.patch +++ b/target/linux/ramips/patches-4.14/0054-mtd-spi-nor-w25q256-respect-default-mode.patch @@ -33,7 +33,7 @@ /* * Write status register 1 byte * Returns negative if error occurred. -@@ -2898,9 +2907,16 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -2894,9 +2903,16 @@ int spi_nor_scan(struct spi_nor *nor, co } else if (mtd->size > 0x1000000) { /* enable 4-byte addressing if the device exceeds 16MiB */ nor->addr_width = 4; diff --git a/target/linux/ramips/patches-4.14/302-spi-nor-add-gd25q512.patch b/target/linux/ramips/patches-4.14/302-spi-nor-add-gd25q512.patch index 0a3a65d70..e21fd7c2b 100644 --- a/target/linux/ramips/patches-4.14/302-spi-nor-add-gd25q512.patch +++ b/target/linux/ramips/patches-4.14/302-spi-nor-add-gd25q512.patch @@ -1,6 +1,6 @@ --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1066,6 +1066,11 @@ static const struct flash_info spi_nor_i +@@ -1061,6 +1061,11 @@ static const struct flash_info spi_nor_i SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) }, diff --git a/target/linux/ramips/patches-4.14/304-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch b/target/linux/ramips/patches-4.14/304-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch index 8b59a106e..831350546 100644 --- a/target/linux/ramips/patches-4.14/304-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch +++ b/target/linux/ramips/patches-4.14/304-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch @@ -10,7 +10,7 @@ For reference see: --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1103,6 +1103,7 @@ static const struct flash_info spi_nor_i +@@ -1098,6 +1098,7 @@ static const struct flash_info spi_nor_i { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, @@ -18,7 +18,7 @@ For reference see: { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) }, { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, -@@ -1275,11 +1276,12 @@ static const struct flash_info spi_nor_i +@@ -1271,11 +1272,12 @@ static const struct flash_info spi_nor_i { }, }; @@ -33,7 +33,7 @@ For reference see: tmp = nor->read_reg(nor, SPINOR_OP_RDID, id, SPI_NOR_MAX_ID_LEN); if (tmp < 0) { -@@ -1290,10 +1292,16 @@ static const struct flash_info *spi_nor_ +@@ -1286,10 +1288,16 @@ static const struct flash_info *spi_nor_ for (tmp = 0; tmp < ARRAY_SIZE(spi_nor_ids) - 1; tmp++) { info = &spi_nor_ids[tmp]; if (info->id_len) { @@ -52,7 +52,7 @@ For reference see: dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n", id[0], id[1], id[2]); return ERR_PTR(-ENODEV); -@@ -2773,7 +2781,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -2769,7 +2777,7 @@ int spi_nor_scan(struct spi_nor *nor, co info = spi_nor_match_id(name); /* Try to auto-detect if chip name wasn't specified or not found */ if (!info) @@ -61,7 +61,7 @@ For reference see: if (IS_ERR_OR_NULL(info)) return -ENOENT; -@@ -2784,7 +2792,7 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -2780,7 +2788,7 @@ int spi_nor_scan(struct spi_nor *nor, co if (name && info->id_len) { const struct flash_info *jinfo; diff --git a/target/linux/sunxi/patches-4.19/010-v5.3-drivers-ata-ahci_sunxi-Increased-SATA-AHCI-DMA-TX-RX.patch b/target/linux/sunxi/patches-4.19/010-v5.3-drivers-ata-ahci_sunxi-Increased-SATA-AHCI-DMA-TX-RX.patch deleted file mode 100644 index 74e51c094..000000000 --- a/target/linux/sunxi/patches-4.19/010-v5.3-drivers-ata-ahci_sunxi-Increased-SATA-AHCI-DMA-TX-RX.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 120357ea176e420d313cf8cf2ff35fbe233d3bab Mon Sep 17 00:00:00 2001 -From: Uenal Mutlu -Date: Mon, 13 May 2019 16:24:10 +0200 -Subject: [PATCH] drivers: ata: ahci_sunxi: Increased SATA/AHCI DMA TX/RX FIFOs - -Increasing the SATA/AHCI DMA TX/RX FIFOs (P0DMACR.TXTS and .RXTS, ie. -TX_TRANSACTION_SIZE and RX_TRANSACTION_SIZE) from default 0x0 each -to 0x3 each, gives a write performance boost of 120 MiB/s to 132 MiB/s -from lame 36 MiB/s to 45 MiB/s previously. -Read performance is above 200 MiB/s. -[tested on SSD using dd bs=4K/8K/12K/16K/20K/24K/32K: peak-perf at 12K] - -Tested on the SBCs Banana Pi R1 (aka Lamobo R1) and Banana Pi M1 which -are based on the Allwinner A20 32bit-SoC (ARMv7-a / arm-linux-gnueabihf). -These devices are RaspberryPi-like small devices. - -This problem of slow SATA write-speed with these small devices lasts -for about 7 years now (beginning with the A10 SoC). Many commentators -throughout the years wrongly assumed the slow write speed was a -hardware limitation. This patch finally solves the problem, which -in fact was just a hard-to-find software problem due to lack of -SATA/AHCI documentation by the SoC-maker Allwinner Technology. - -Lists of the affected sunxi and other boards and SoCs with SATA using -the ahci_sunxi driver: - $ grep -i -e "^&ahci" arch/arm/boot/dts/sun*dts - and http://linux-sunxi.org/SATA#Devices_with_SATA_ports - See also http://linux-sunxi.org/Category:Devices_with_SATA_port - -Tested-by: Chen-Yu Tsai -Acked-by: Maxime Ripard -Reviewed-by: Hans de Goede -Signed-off-by: Uenal Mutlu -Signed-off-by: Jens Axboe ---- - drivers/ata/ahci_sunxi.c | 47 ++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 45 insertions(+), 2 deletions(-) - ---- a/drivers/ata/ahci_sunxi.c -+++ b/drivers/ata/ahci_sunxi.c -@@ -157,8 +157,51 @@ static void ahci_sunxi_start_engine(stru - void __iomem *port_mmio = ahci_port_base(ap); - struct ahci_host_priv *hpriv = ap->host->private_data; - -- /* Setup DMA before DMA start */ -- sunxi_clrsetbits(hpriv->mmio + AHCI_P0DMACR, 0x0000ff00, 0x00004400); -+ /* Setup DMA before DMA start -+ * -+ * NOTE: A similar SoC with SATA/AHCI by Texas Instruments documents -+ * this Vendor Specific Port (P0DMACR, aka PxDMACR) in its -+ * User's Guide document (TMS320C674x/OMAP-L1x Processor -+ * Serial ATA (SATA) Controller, Literature Number: SPRUGJ8C, -+ * March 2011, Chapter 4.33 Port DMA Control Register (P0DMACR), -+ * p.68, https://www.ti.com/lit/ug/sprugj8c/sprugj8c.pdf) -+ * as equivalent to the following struct: -+ * -+ * struct AHCI_P0DMACR_t -+ * { -+ * unsigned TXTS : 4; -+ * unsigned RXTS : 4; -+ * unsigned TXABL : 4; -+ * unsigned RXABL : 4; -+ * unsigned Reserved : 16; -+ * }; -+ * -+ * TXTS: Transmit Transaction Size (TX_TRANSACTION_SIZE). -+ * This field defines the DMA transaction size in DWORDs for -+ * transmit (system bus read, device write) operation. [...] -+ * -+ * RXTS: Receive Transaction Size (RX_TRANSACTION_SIZE). -+ * This field defines the Port DMA transaction size in DWORDs -+ * for receive (system bus write, device read) operation. [...] -+ * -+ * TXABL: Transmit Burst Limit. -+ * This field allows software to limit the VBUSP master read -+ * burst size. [...] -+ * -+ * RXABL: Receive Burst Limit. -+ * Allows software to limit the VBUSP master write burst -+ * size. [...] -+ * -+ * Reserved: Reserved. -+ * -+ * -+ * NOTE: According to the above document, the following alternative -+ * to the code below could perhaps be a better option -+ * (or preparation) for possible further improvements later: -+ * sunxi_clrsetbits(hpriv->mmio + AHCI_P0DMACR, 0x0000ffff, -+ * 0x00000033); -+ */ -+ sunxi_clrsetbits(hpriv->mmio + AHCI_P0DMACR, 0x0000ffff, 0x00004433); - - /* Start DMA */ - sunxi_setbits(port_mmio + PORT_CMD, PORT_CMD_START);