aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-5.10
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2020-12-27 10:28:08 +0100
committerMathias Kresin <dev@kresin.me>2021-04-12 23:23:09 +0200
commit0806f8fc80e602b88ac80a334dccf07e1334d416 (patch)
tree918883ea539610575b67ca38142bddc0d64608f9 /target/linux/lantiq/patches-5.10
parente44e454ee65bb0631fbea64ea1e30b40735ed97b (diff)
downloadupstream-0806f8fc80e602b88ac80a334dccf07e1334d416.tar.gz
upstream-0806f8fc80e602b88ac80a334dccf07e1334d416.tar.bz2
upstream-0806f8fc80e602b88ac80a334dccf07e1334d416.zip
lantiq: add Linux 5.10 support as testing kernel
Following changes are made to the Lantiq kernel patches: 0001-MIPS-lantiq-add-pcie-driver.patch The pci header isn't included by the of_pci header any longer 0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch Due to the merge of grx390 and ar10 clocks, extend support to grx390 0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch The do_carrier arguments was dropped from phy_link_change. The phylib has always sets the third parameter to true so the flag is always changed anyway. of_get_phy_mode() returns an error, or 0 on success, and pass a pointer, of type phy_interface_t, where the phy mode should be stored now. So far an error wasn't considered. Print at least an error message if something unexpected happens. The stuck queue is now passed to xrx200_tx_timeout (the timeout handler) but not used so far. 0028-NET-lantiq-various-etop-fixes.patch ioremap has provided non-cached semantics by default since the Linux 2.6 days and was removed with kernel version 5.6. of_get_phy_mode() returns an error, or 0 on success, and pass a pointer, of type phy_interface_t, where the phy mode should be stored now. So far an error wasn't considered. Print at least an error message if something unexpected happens. 0042-arch-mips-increase-io_space_limit.patch Move IO space extension to laniq specific file Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/lantiq/patches-5.10')
-rw-r--r--target/linux/lantiq/patches-5.10/0001-MIPS-lantiq-add-pcie-driver.patch11
-rw-r--r--target/linux/lantiq/patches-5.10/0004-MIPS-lantiq-add-atm-hack.patch2
-rw-r--r--target/linux/lantiq/patches-5.10/0018-MTD-nand-lots-of-xrx200-fixes.patch12
-rw-r--r--target/linux/lantiq/patches-5.10/0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch36
-rw-r--r--target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch31
-rw-r--r--target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch22
-rw-r--r--target/linux/lantiq/patches-5.10/0030-GPIO-add-named-gpio-exports.patch14
-rw-r--r--target/linux/lantiq/patches-5.10/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch4
-rw-r--r--target/linux/lantiq/patches-5.10/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch2
-rw-r--r--target/linux/lantiq/patches-5.10/0042-arch-mips-increase-io_space_limit.patch27
-rw-r--r--target/linux/lantiq/patches-5.10/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch4
-rw-r--r--target/linux/lantiq/patches-5.10/0051-MIPS-lantiq-improve-USB-initialization.patch4
-rw-r--r--target/linux/lantiq/patches-5.10/0101-find_active_root.patch16
-rw-r--r--target/linux/lantiq/patches-5.10/0151-lantiq-ifxmips_pcie-use-of.patch2
-rw-r--r--target/linux/lantiq/patches-5.10/0152-lantiq-VPE.patch2
-rw-r--r--target/linux/lantiq/patches-5.10/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch4
16 files changed, 108 insertions, 85 deletions
diff --git a/target/linux/lantiq/patches-5.10/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-5.10/0001-MIPS-lantiq-add-pcie-driver.patch
index cb482bc522..2408978a27 100644
--- a/target/linux/lantiq/patches-5.10/0001-MIPS-lantiq-add-pcie-driver.patch
+++ b/target/linux/lantiq/patches-5.10/0001-MIPS-lantiq-add-pcie-driver.patch
@@ -65,7 +65,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
endif
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
-@@ -51,6 +51,8 @@ obj-$(CONFIG_PCI_LANTIQ) += pci-lantiq.o
+@@ -43,6 +43,8 @@ obj-$(CONFIG_PCI_LANTIQ) += pci-lantiq.o
obj-$(CONFIG_SOC_MT7620) += pci-mt7620.o
obj-$(CONFIG_SOC_RT288X) += pci-rt2880.o
obj-$(CONFIG_SOC_RT3883) += pci-rt3883.o
@@ -153,10 +153,11 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ ifx_pcie_rc_class_early_fixup);
--- a/arch/mips/pci/fixup-lantiq.c
+++ b/arch/mips/pci/fixup-lantiq.c
-@@ -6,12 +6,18 @@
+@@ -6,12 +6,19 @@
#include <linux/of_irq.h>
#include <linux/of_pci.h>
++#include <linux/pci.h>
+#include "ifxmips_pci_common.h"
int (*ltq_pci_plat_arch_init)(struct pci_dev *dev) = NULL;
@@ -172,7 +173,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
if (ltq_pci_plat_arch_init)
return ltq_pci_plat_arch_init(dev);
-@@ -23,5 +29,10 @@ int pcibios_plat_dev_init(struct pci_dev
+@@ -23,5 +30,10 @@ int pcibios_plat_dev_init(struct pci_dev
int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
@@ -5470,7 +5471,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
--- a/drivers/pci/pcie/Kconfig
+++ b/drivers/pci/pcie/Kconfig
-@@ -52,6 +52,7 @@ config PCIEAER_INJECT
+@@ -51,6 +51,7 @@ config PCIEAER_INJECT
config PCIE_ECRC
bool "PCI Express ECRC settings control"
depends on PCIEAER
@@ -5480,7 +5481,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
(transaction layer end-to-end CRC checking).
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
-@@ -1390,6 +1390,8 @@ void pci_walk_bus(struct pci_bus *top, i
+@@ -1416,6 +1416,8 @@ void pci_walk_bus(struct pci_bus *top, i
void *userdata);
int pci_cfg_space_size(struct pci_dev *dev);
unsigned char pci_bus_max_busnr(struct pci_bus *bus);
diff --git a/target/linux/lantiq/patches-5.10/0004-MIPS-lantiq-add-atm-hack.patch b/target/linux/lantiq/patches-5.10/0004-MIPS-lantiq-add-atm-hack.patch
index 2cbcf06a01..e215df60ee 100644
--- a/target/linux/lantiq/patches-5.10/0004-MIPS-lantiq-add-atm-hack.patch
+++ b/target/linux/lantiq/patches-5.10/0004-MIPS-lantiq-add-atm-hack.patch
@@ -441,7 +441,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
{
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
-@@ -62,6 +62,10 @@ void (*_dma_cache_wback_inv)(unsigned lo
+@@ -61,6 +61,10 @@ void (*_dma_cache_wback_inv)(unsigned lo
void (*_dma_cache_wback)(unsigned long start, unsigned long size);
void (*_dma_cache_inv)(unsigned long start, unsigned long size);
diff --git a/target/linux/lantiq/patches-5.10/0018-MTD-nand-lots-of-xrx200-fixes.patch b/target/linux/lantiq/patches-5.10/0018-MTD-nand-lots-of-xrx200-fixes.patch
index d68466c368..d8393f352a 100644
--- a/target/linux/lantiq/patches-5.10/0018-MTD-nand-lots-of-xrx200-fixes.patch
+++ b/target/linux/lantiq/patches-5.10/0018-MTD-nand-lots-of-xrx200-fixes.patch
@@ -33,9 +33,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+static __be32 req_mask = 0;
+
struct xway_nand_data {
+ struct nand_controller controller;
struct nand_chip chip;
- unsigned long csflags;
-@@ -91,10 +109,22 @@ static void xway_select_chip(struct nand
+@@ -92,10 +110,22 @@ static void xway_select_chip(struct nand
case -1:
ltq_ebu_w32_mask(NAND_CON_CE, 0, EBU_NAND_CON);
ltq_ebu_w32_mask(NAND_CON_NANDM, 0, EBU_NAND_CON);
@@ -58,7 +58,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
ltq_ebu_w32_mask(0, NAND_CON_NANDM, EBU_NAND_CON);
ltq_ebu_w32_mask(0, NAND_CON_CE, EBU_NAND_CON);
break;
-@@ -107,6 +137,11 @@ static void xway_cmd_ctrl(struct nand_ch
+@@ -108,6 +138,11 @@ static void xway_cmd_ctrl(struct nand_ch
{
struct mtd_info *mtd = nand_to_mtd(chip);
@@ -70,7 +70,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
if (cmd == NAND_CMD_NONE)
return;
-@@ -117,6 +152,24 @@ static void xway_cmd_ctrl(struct nand_ch
+@@ -118,6 +153,24 @@ static void xway_cmd_ctrl(struct nand_ch
while ((ltq_ebu_r32(EBU_NAND_WAIT) & NAND_WAIT_WR_C) == 0)
;
@@ -95,7 +95,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
}
static int xway_dev_ready(struct nand_chip *chip)
-@@ -156,6 +209,7 @@ static int xway_nand_probe(struct platfo
+@@ -171,6 +224,7 @@ static int xway_nand_probe(struct platfo
int err;
u32 cs;
u32 cs_flag = 0;
@@ -103,7 +103,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
/* Allocate memory for the device structure (and zero it) */
data = devm_kzalloc(&pdev->dev, sizeof(struct xway_nand_data),
-@@ -191,6 +245,15 @@ static int xway_nand_probe(struct platfo
+@@ -207,6 +261,15 @@ static int xway_nand_probe(struct platfo
if (!err && cs == 1)
cs_flag = NAND_CON_IN_CS1 | NAND_CON_OUT_CS1;
diff --git a/target/linux/lantiq/patches-5.10/0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch b/target/linux/lantiq/patches-5.10/0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch
index 9b326c50d1..4265eeca57 100644
--- a/target/linux/lantiq/patches-5.10/0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch
+++ b/target/linux/lantiq/patches-5.10/0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch
@@ -8,12 +8,34 @@ happy.
Signed-off-by: Mathias Kresin <dev@kresin.me>
---
- arch/mips/lantiq/xway/sysctrl.c | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
+ arch/mips/lantiq/xway/sysctrl.c | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
--- a/arch/mips/lantiq/xway/sysctrl.c
+++ b/arch/mips/lantiq/xway/sysctrl.c
+@@ -469,9 +469,9 @@ void __init ltq_soc_init(void)
+
+ if (of_machine_is_compatible("lantiq,grx390") ||
+ of_machine_is_compatible("lantiq,ar10")) {
+- clkdev_add_pmu("1e108000.switch", "gphy0", 0, 0, PMU_GPHY0);
+- clkdev_add_pmu("1e108000.switch", "gphy1", 0, 0, PMU_GPHY1);
+- clkdev_add_pmu("1e108000.switch", "gphy2", 0, 0, PMU_GPHY2);
++ clkdev_add_pmu("1f203020.gphy", NULL, 1, 0, PMU_GPHY0);
++ clkdev_add_pmu("1f203068.gphy", NULL, 1, 0, PMU_GPHY1);
++ clkdev_add_pmu("1f2030ac.gphy", NULL, 1, 0, PMU_GPHY2);
+ clkdev_add_pmu("1f203018.usb2-phy", "phy", 1, 2, PMU_ANALOG_USB0_P);
+ clkdev_add_pmu("1f203034.usb2-phy", "phy", 1, 2, PMU_ANALOG_USB1_P);
+ /* rc 0 */
@@ -503,7 +503,7 @@ void __init ltq_soc_init(void)
+ } else if (of_machine_is_compatible("lantiq,grx390")) {
+ clkdev_add_static(ltq_grx390_cpu_hz(), ltq_grx390_fpi_hz(),
+ ltq_grx390_fpi_hz(), ltq_grx390_pp32_hz());
+- clkdev_add_pmu("1e108000.switch", "gphy3", 0, 0, PMU_GPHY3);
++ clkdev_add_pmu("1f203264.gphy", NULL, 1, 0, PMU_GPHY3);
+ clkdev_add_pmu("1e101000.usb", "otg", 1, 0, PMU_USB0);
+ clkdev_add_pmu("1e106000.usb", "otg", 1, 0, PMU_USB1);
+ /* rc 2 */
+@@ -511,7 +511,7 @@ void __init ltq_soc_init(void)
clkdev_add_pmu("1a800000.pcie", "msi", 1, 1, PMU1_PCIE2_MSI);
clkdev_add_pmu("1f106a00.pcie", "pdi", 1, 1, PMU1_PCIE2_PDI);
clkdev_add_pmu("1a800000.pcie", "ctl", 1, 1, PMU1_PCIE2_CTL);
@@ -22,7 +44,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
clkdev_add_pmu("1da00000.usif", "NULL", 1, 0, PMU_USIF);
clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
} else if (of_machine_is_compatible("lantiq,ar10")) {
-@@ -511,11 +511,11 @@ void __init ltq_soc_init(void)
+@@ -519,7 +519,7 @@ void __init ltq_soc_init(void)
ltq_ar10_fpi_hz(), ltq_ar10_pp32_hz());
clkdev_add_pmu("1e101000.usb", "otg", 1, 0, PMU_USB0);
clkdev_add_pmu("1e106000.usb", "otg", 1, 0, PMU_USB1);
@@ -30,14 +52,8 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
+ clkdev_add_pmu("1e108000.eth", NULL, 0, 0, PMU_SWITCH |
PMU_PPE_DP | PMU_PPE_TC);
clkdev_add_pmu("1da00000.usif", "NULL", 1, 0, PMU_USIF);
-- clkdev_add_pmu("1e108000.switch", "gphy0", 0, 0, PMU_GPHY);
-- clkdev_add_pmu("1e108000.switch", "gphy1", 0, 0, PMU_GPHY);
-+ clkdev_add_pmu("1f203020.gphy", NULL, 1, 0, PMU_GPHY);
-+ clkdev_add_pmu("1f203068.gphy", NULL, 1, 0, PMU_GPHY);
clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
- clkdev_add_pmu("1e116000.mei", "afe", 1, 2, PMU_ANALOG_DSL_AFE);
- clkdev_add_pmu("1e116000.mei", "dfe", 1, 0, PMU_DFE);
-@@ -534,12 +534,12 @@ void __init ltq_soc_init(void)
+@@ -540,12 +540,12 @@ void __init ltq_soc_init(void)
clkdev_add_pmu(NULL, "ahb", 1, 0, PMU_AHBM | PMU_AHBS);
clkdev_add_pmu("1da00000.usif", "NULL", 1, 0, PMU_USIF);
diff --git a/target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch b/target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
index 6a2143e17e..d95e36caad 100644
--- a/target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
+++ b/target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
@@ -16,24 +16,24 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
-@@ -108,7 +108,13 @@ config LANTIQ_ETOP
+@@ -107,7 +107,13 @@ config LANTIQ_ETOP
tristate "Lantiq SoC ETOP driver"
depends on SOC_TYPE_XWAY
- ---help---
+ help
- Support for the MII0 inside the Lantiq SoC
+ Support for the MII0 inside the Lantiq ADSL SoC
+
+config LANTIQ_XRX200_LEGACY
+ tristate "Lantiq SoC XRX200 driver"
+ depends on SOC_TYPE_XWAY
-+ ---help---
++ help
+ Support for the MII0 inside the Lantiq VDSL SoC
config LANTIQ_XRX200
tristate "Lantiq / Intel xRX200 PMAC network driver"
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
-@@ -51,6 +51,7 @@ obj-$(CONFIG_JME) += jme.o
+@@ -50,6 +50,7 @@ obj-$(CONFIG_JME) += jme.o
obj-$(CONFIG_KORINA) += korina.o
obj-$(CONFIG_LANTIQ_ETOP) += lantiq_etop.o
obj-$(CONFIG_LANTIQ_XRX200) += lantiq_xrx200.o
@@ -209,7 +209,7 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
+};
--- /dev/null
+++ b/drivers/net/ethernet/lantiq_xrx200_legacy.c
-@@ -0,0 +1,1927 @@
+@@ -0,0 +1,1930 @@
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
@@ -1281,7 +1281,7 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
+ return &priv->stats;
+}
+
-+static void xrx200_tx_timeout(struct net_device *dev)
++static void xrx200_tx_timeout(struct net_device *dev, unsigned int txqueue)
+{
+ struct xrx200_priv *priv = netdev_priv(dev);
+
@@ -1570,16 +1570,14 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
+ return 0;
+}
+
-+static void xrx200_phy_link_change(struct phy_device *phydev, bool up, bool do_carrier)
++static void xrx200_phy_link_change(struct phy_device *phydev, bool up)
+{
+ struct net_device *netdev = phydev->attached_dev;
+
-+ if (do_carrier) {
-+ if (up)
-+ netif_carrier_on(netdev);
-+ else if (!xrx200_phy_has_link(netdev))
-+ netif_carrier_off(netdev);
-+ }
++ if (up)
++ netif_carrier_on(netdev);
++ else if (!xrx200_phy_has_link(netdev))
++ netif_carrier_off(netdev);
+
+ phydev->adjust_link(netdev);
+}
@@ -1897,6 +1895,7 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
+{
+ const __be32 *addr, *id = of_get_property(port, "reg", NULL);
+ struct xrx200_port *p = &priv->port[priv->num_port];
++ int ret;
+
+ if (!id)
+ return;
@@ -1909,7 +1908,11 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
+
+ p->num = *id;
+ p->phy_addr = *addr;
-+ p->phy_if = of_get_phy_mode(port);
++
++ ret = of_get_phy_mode(port, &p->phy_if);
++ if (ret)
++ pr_err("Can't find phy-mode for port\n");
++
+ if (p->phy_addr > 0x10)
+ p->flags = XRX200_PORT_TYPE_MAC;
+ else
diff --git a/target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch b/target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch
index 094496a16d..441aaed05b 100644
--- a/target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch
+++ b/target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch
@@ -171,7 +171,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ int rx_irq;
+
+ unsigned char mac[6];
-+ int mii_mode;
++ phy_interface_t mii_mode;
+
+ spinlock_t lock;
+
@@ -330,7 +330,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
{
struct ltq_etop_priv *priv = netdev_priv(dev);
- int i;
-+ int mii_mode = priv->mii_mode;
++ phy_interface_t mii_mode = priv->mii_mode;
- ltq_pmu_enable(PMU_PPE);
+ clk_enable(priv->clk_ppe);
@@ -687,7 +687,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
spin_unlock_irqrestore(&priv->lock, flags);
return 0;
-@@ -563,6 +760,9 @@ ltq_etop_init(struct net_device *dev)
+@@ -556,6 +753,9 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_hw;
ltq_etop_change_mtu(dev, 1500);
@@ -697,7 +697,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
if (!is_valid_ether_addr(mac.sa_data)) {
-@@ -580,9 +780,10 @@ ltq_etop_init(struct net_device *dev)
+@@ -573,9 +773,10 @@ ltq_etop_init(struct net_device *dev)
dev->addr_assign_type = NET_ADDR_RANDOM;
ltq_etop_set_multicast_list(dev);
@@ -711,7 +711,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
return 0;
err_netdev:
-@@ -602,6 +803,9 @@ ltq_etop_tx_timeout(struct net_device *d
+@@ -595,6 +796,9 @@ ltq_etop_tx_timeout(struct net_device *d
err = ltq_etop_hw_init(dev);
if (err)
goto err_hw;
@@ -721,7 +721,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
netif_trans_update(dev);
netif_wake_queue(dev);
return;
-@@ -625,14 +829,19 @@ static const struct net_device_ops ltq_e
+@@ -618,14 +822,19 @@ static const struct net_device_ops ltq_e
.ndo_tx_timeout = ltq_etop_tx_timeout,
};
@@ -745,7 +745,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
-@@ -658,31 +867,62 @@ ltq_etop_probe(struct platform_device *p
+@@ -651,31 +860,64 @@ ltq_etop_probe(struct platform_device *p
goto err_out;
}
@@ -760,7 +760,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ err = -ENOENT;
+ goto err_out;
+ }
-+ ltq_gbit_membase = devm_ioremap_nocache(&pdev->dev,
++ ltq_gbit_membase = devm_ioremap(&pdev->dev,
+ gbit_res->start, resource_size(gbit_res));
+ if (!ltq_gbit_membase) {
+ dev_err(&pdev->dev, "failed to remap gigabit switch %d\n",
@@ -781,7 +781,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
priv->netdev = dev;
+ priv->tx_irq = irqres[0].start;
+ priv->rx_irq = irqres[1].start;
-+ priv->mii_mode = of_get_phy_mode(pdev->dev.of_node);
++ err = of_get_phy_mode(pdev->dev.of_node, &priv->mii_mode);
++ if (err)
++ pr_err("Can't find phy-mode for port\n");
+
+ mac = of_get_mac_address(pdev->dev.of_node);
+ if (mac)
@@ -823,7 +825,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
err = register_netdev(dev);
if (err)
-@@ -711,31 +951,22 @@ ltq_etop_remove(struct platform_device *
+@@ -704,31 +946,22 @@ ltq_etop_remove(struct platform_device *
return 0;
}
diff --git a/target/linux/lantiq/patches-5.10/0030-GPIO-add-named-gpio-exports.patch b/target/linux/lantiq/patches-5.10/0030-GPIO-add-named-gpio-exports.patch
index 419516978c..209548bccd 100644
--- a/target/linux/lantiq/patches-5.10/0030-GPIO-add-named-gpio-exports.patch
+++ b/target/linux/lantiq/patches-5.10/0030-GPIO-add-named-gpio-exports.patch
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
#include "gpiolib.h"
#include "gpiolib-of.h"
-@@ -915,3 +917,72 @@ void of_gpiochip_remove(struct gpio_chip
+@@ -1039,3 +1041,72 @@ void of_gpiochip_remove(struct gpio_chip
{
of_node_put(chip->of_node);
}
@@ -97,7 +97,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#endif
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
-@@ -127,6 +127,12 @@ static inline int gpio_export(unsigned g
+@@ -125,6 +125,12 @@ static inline int gpio_export(unsigned g
return gpiod_export(gpio_to_desc(gpio), direction_may_change);
}
@@ -112,7 +112,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
{
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
-@@ -668,6 +668,7 @@ static inline void devm_acpi_dev_remove_
+@@ -715,6 +715,7 @@ static inline void devm_acpi_dev_remove_
#if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS)
@@ -120,7 +120,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
int gpiod_export(struct gpio_desc *desc, bool direction_may_change);
int gpiod_export_link(struct device *dev, const char *name,
struct gpio_desc *desc);
-@@ -675,6 +676,13 @@ void gpiod_unexport(struct gpio_desc *de
+@@ -722,6 +723,13 @@ void gpiod_unexport(struct gpio_desc *de
#else /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */
@@ -136,7 +136,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
{
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio/gpiolib-sysfs.c
-@@ -563,7 +563,7 @@ static struct class gpio_class = {
+@@ -564,7 +564,7 @@ static struct class gpio_class = {
*
* Returns zero on success, else an error.
*/
@@ -145,7 +145,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
{
struct gpio_chip *chip;
struct gpio_device *gdev;
-@@ -625,6 +625,8 @@ int gpiod_export(struct gpio_desc *desc,
+@@ -626,6 +626,8 @@ int gpiod_export(struct gpio_desc *desc,
offset = gpio_chip_hwgpio(desc);
if (chip->names && chip->names[offset])
ioname = chip->names[offset];
@@ -154,7 +154,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
dev = device_create_with_groups(&gpio_class, &gdev->dev,
MKDEV(0, 0), data, gpio_groups,
-@@ -646,6 +648,12 @@ err_unlock:
+@@ -647,6 +649,12 @@ err_unlock:
gpiod_dbg(desc, "%s: status %d\n", __func__, status);
return status;
}
diff --git a/target/linux/lantiq/patches-5.10/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch b/target/linux/lantiq/patches-5.10/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch
index 2493da32ec..154cf226c1 100644
--- a/target/linux/lantiq/patches-5.10/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch
+++ b/target/linux/lantiq/patches-5.10/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch
@@ -18,7 +18,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
-@@ -729,6 +729,16 @@ config I2C_MESON
+@@ -753,6 +753,16 @@ config I2C_MESON
If you say yes to this option, support will be included for the
I2C interface on the Amlogic Meson family of SoCs.
@@ -37,7 +37,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
depends on PPC
--- a/drivers/i2c/busses/Makefile
+++ b/drivers/i2c/busses/Makefile
-@@ -73,6 +73,7 @@ obj-$(CONFIG_I2C_IMX_LPI2C) += i2c-imx-l
+@@ -72,6 +72,7 @@ obj-$(CONFIG_I2C_IMX_LPI2C) += i2c-imx-l
obj-$(CONFIG_I2C_IOP3XX) += i2c-iop3xx.o
obj-$(CONFIG_I2C_JZ4780) += i2c-jz4780.o
obj-$(CONFIG_I2C_KEMPLD) += i2c-kempld.o
diff --git a/target/linux/lantiq/patches-5.10/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-5.10/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
index 82567be690..c80045e878 100644
--- a/target/linux/lantiq/patches-5.10/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
+++ b/target/linux/lantiq/patches-5.10/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
@@ -203,7 +203,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+early_param("ethaddr", setup_ethaddr);
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
-@@ -764,7 +764,11 @@ ltq_etop_init(struct net_device *dev)
+@@ -757,7 +757,11 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_hw;
diff --git a/target/linux/lantiq/patches-5.10/0042-arch-mips-increase-io_space_limit.patch b/target/linux/lantiq/patches-5.10/0042-arch-mips-increase-io_space_limit.patch
index 7c0d10ed10..c81222af57 100644
--- a/target/linux/lantiq/patches-5.10/0042-arch-mips-increase-io_space_limit.patch
+++ b/target/linux/lantiq/patches-5.10/0042-arch-mips-increase-io_space_limit.patch
@@ -7,17 +7,18 @@ this value comes from x86 and breaks some pci devices
Signed-off-by: John Crispin <john@phrozen.org>
---
- arch/mips/include/asm/io.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ arch/mips/include/asm/mach-lantiq/spaces.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 arch/mips/include/asm/mach-lantiq/spaces.h
---- a/arch/mips/include/asm/io.h
-+++ b/arch/mips/include/asm/io.h
-@@ -53,7 +53,7 @@
-
- /* ioswab[bwlq], __mem_ioswab[bwlq] are defined in mangle-port.h */
-
--#define IO_SPACE_LIMIT 0xffff
-+#define IO_SPACE_LIMIT 0xffffffff
-
- /*
- * On MIPS I/O ports are memory mapped, so we access them using normal
+--- /dev/null
++++ b/arch/mips/include/asm/mach-lantiq/spaces.h
+@@ -0,0 +1,8 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++#ifndef __ASM_MACH_LANTIQ_SPACES_H_
++#define __ASM_MACH_LANTIQ_SPACES_H_
++
++#define IO_SPACE_LIMIT 0xffffffff
++
++#include <asm/mach-generic/spaces.h>
++#endif
diff --git a/target/linux/lantiq/patches-5.10/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch b/target/linux/lantiq/patches-5.10/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
index d63d48ad1f..333a2e6377 100644
--- a/target/linux/lantiq/patches-5.10/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
+++ b/target/linux/lantiq/patches-5.10/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
@@ -24,7 +24,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -92,7 +92,14 @@ static void dwc2_set_rk_params(struct dw
- p->power_down = 0;
+ p->power_down = DWC2_POWER_DOWN_PARAM_NONE;
}
-static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg)
@@ -62,7 +62,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
static void dwc2_set_amlogic_params(struct dwc2_hsotg *hsotg)
{
struct dwc2_core_params *p = &hsotg->params;
-@@ -167,8 +182,11 @@ const struct of_device_id dwc2_of_match_
+@@ -196,8 +211,11 @@ const struct of_device_id dwc2_of_match_
{ .compatible = "brcm,bcm2835-usb", .data = dwc2_set_bcm_params },
{ .compatible = "hisilicon,hi6220-usb", .data = dwc2_set_his_params },
{ .compatible = "rockchip,rk3066-usb", .data = dwc2_set_rk_params },
diff --git a/target/linux/lantiq/patches-5.10/0051-MIPS-lantiq-improve-USB-initialization.patch b/target/linux/lantiq/patches-5.10/0051-MIPS-lantiq-improve-USB-initialization.patch
index 3f276e1158..17e07cd63a 100644
--- a/target/linux/lantiq/patches-5.10/0051-MIPS-lantiq-improve-USB-initialization.patch
+++ b/target/linux/lantiq/patches-5.10/0051-MIPS-lantiq-improve-USB-initialization.patch
@@ -15,7 +15,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
--- a/arch/mips/lantiq/xway/sysctrl.c
+++ b/arch/mips/lantiq/xway/sysctrl.c
-@@ -244,6 +244,25 @@ static void pmu_disable(struct clk *clk)
+@@ -248,6 +248,25 @@ static void pmu_disable(struct clk *clk)
pr_warn("deactivating PMU module failed!");
}
@@ -41,7 +41,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
/* the pci enable helper */
static int pci_enable(struct clk *clk)
{
-@@ -565,4 +584,5 @@ void __init ltq_soc_init(void)
+@@ -571,4 +590,5 @@ void __init ltq_soc_init(void)
clkdev_add_pmu("1e116000.mei", "dfe", 1, 0, PMU_DFE);
clkdev_add_pmu("1e100400.serial", NULL, 1, 0, PMU_ASC0);
}
diff --git a/target/linux/lantiq/patches-5.10/0101-find_active_root.patch b/target/linux/lantiq/patches-5.10/0101-find_active_root.patch
index d541cc247c..14c33e31a6 100644
--- a/target/linux/lantiq/patches-5.10/0101-find_active_root.patch
+++ b/target/linux/lantiq/patches-5.10/0101-find_active_root.patch
@@ -1,6 +1,6 @@
--- a/drivers/mtd/parsers/ofpart_core.c
+++ b/drivers/mtd/parsers/ofpart_core.c
-@@ -33,6 +33,38 @@ static bool node_has_compatible(struct d
+@@ -38,6 +38,38 @@ static bool node_has_compatible(struct d
return of_get_property(pp, "compatible", NULL);
}
@@ -39,7 +39,7 @@
static int parse_fixed_partitions(struct mtd_info *master,
const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
-@@ -46,6 +78,8 @@ static int parse_fixed_partitions(struct
+@@ -51,6 +83,8 @@ static int parse_fixed_partitions(struct
struct device_node *pp;
int nr_parts, i, ret = 0;
bool dedicated = true;
@@ -48,7 +48,7 @@
/* Pull of_node from the master device node */
mtd_node = mtd_get_of_node(master);
-@@ -86,7 +120,9 @@ static int parse_fixed_partitions(struct
+@@ -93,7 +127,9 @@ static int parse_fixed_partitions(struct
return 0;
parts = kcalloc(nr_parts, sizeof(*parts), GFP_KERNEL);
@@ -59,9 +59,9 @@
return -ENOMEM;
i = 0;
-@@ -135,6 +171,11 @@ static int parse_fixed_partitions(struct
- if (of_get_property(pp, "lock", &len))
- parts[i].mask_flags |= MTD_POWERUP_LOCK;
+@@ -145,6 +181,11 @@ static int parse_fixed_partitions(struct
+ if (of_property_read_bool(pp, "slc-mode"))
+ parts[i].add_flags |= MTD_SLC_ON_MLC_EMULATION;
+ if (!proot_id && of_device_is_compatible(pp, "brnboot,root-selector"))
+ proot_id = brnboot_get_selected_root_part(master, parts[i].offset);
@@ -71,7 +71,7 @@
i++;
}
-@@ -144,6 +185,11 @@ static int parse_fixed_partitions(struct
+@@ -154,6 +195,11 @@ static int parse_fixed_partitions(struct
if (quirks && quirks->post_parse)
quirks->post_parse(master, parts, nr_parts);
@@ -83,7 +83,7 @@
*pparts = parts;
return nr_parts;
-@@ -154,6 +200,7 @@ ofpart_fail:
+@@ -164,6 +210,7 @@ ofpart_fail:
ofpart_none:
of_node_put(pp);
kfree(parts);
diff --git a/target/linux/lantiq/patches-5.10/0151-lantiq-ifxmips_pcie-use-of.patch b/target/linux/lantiq/patches-5.10/0151-lantiq-ifxmips_pcie-use-of.patch
index bc02a58b1c..10633199e6 100644
--- a/target/linux/lantiq/patches-5.10/0151-lantiq-ifxmips_pcie-use-of.patch
+++ b/target/linux/lantiq/patches-5.10/0151-lantiq-ifxmips_pcie-use-of.patch
@@ -376,7 +376,7 @@
struct clk *clk;
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
-@@ -51,7 +51,7 @@ obj-$(CONFIG_PCI_LANTIQ) += pci-lantiq.o
+@@ -43,7 +43,7 @@ obj-$(CONFIG_PCI_LANTIQ) += pci-lantiq.o
obj-$(CONFIG_SOC_MT7620) += pci-mt7620.o
obj-$(CONFIG_SOC_RT288X) += pci-rt2880.o
obj-$(CONFIG_SOC_RT3883) += pci-rt3883.o
diff --git a/target/linux/lantiq/patches-5.10/0152-lantiq-VPE.patch b/target/linux/lantiq/patches-5.10/0152-lantiq-VPE.patch
index 822d905246..6b41f017aa 100644
--- a/target/linux/lantiq/patches-5.10/0152-lantiq-VPE.patch
+++ b/target/linux/lantiq/patches-5.10/0152-lantiq-VPE.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -2377,6 +2377,12 @@ config MIPS_VPE_LOADER
+@@ -2425,6 +2425,12 @@ config MIPS_VPE_LOADER
Includes a loader for loading an elf relocatable object
onto another VPE and running it.
diff --git a/target/linux/lantiq/patches-5.10/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-5.10/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
index 1beef0e1fe..01b87b9d5c 100644
--- a/target/linux/lantiq/patches-5.10/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
+++ b/target/linux/lantiq/patches-5.10/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/lantiq/xway/sysctrl.c
+++ b/arch/mips/lantiq/xway/sysctrl.c
-@@ -422,6 +422,20 @@ static void clkdev_add_clkout(void)
+@@ -426,6 +426,20 @@ static void clkdev_add_clkout(void)
}
}
@@ -21,7 +21,7 @@
/* bring up all register ranges that we need for basic system control */
void __init ltq_soc_init(void)
{
-@@ -585,4 +599,6 @@ void __init ltq_soc_init(void)
+@@ -591,4 +605,6 @@ void __init ltq_soc_init(void)
clkdev_add_pmu("1e100400.serial", NULL, 1, 0, PMU_ASC0);
}
usb_set_clock();