summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-11-25 20:06:39 +0100
committerMathias Kresin <dev@kresin.me>2019-07-04 08:29:13 +0200
commitf0c740650b466ffacae64a6f7b67ffacdaf28efd (patch)
tree04acdaa9aadb6bda2811b4cf275c23f18d2b830e /target
parenteee1b34ce688efcb824ea9ce08edfce7ec507599 (diff)
downloadopenwrt-f0c740650b466ffacae64a6f7b67ffacdaf28efd.tar.gz
openwrt-f0c740650b466ffacae64a6f7b67ffacdaf28efd.tar.bz2
openwrt-f0c740650b466ffacae64a6f7b67ffacdaf28efd.zip
lantiq: make patches apply
The following patches are dropped because they are now upstreamed: - 0002-gpio-stp-xway-Implement-get-callback.patch upstreamed with commit 5b9b2b5284f819 ("gpio: stp-xway: Implement get callback") - 0027-01-net-phy-intel-xway-add-VR9-version-number.patch upstreamed with commit 5b73d9955fb4b0 ("net: phy: intel-xway: add VR9 version number") - 0027-02-net-phy-intel-xway-add-VR9-v1.1-phy-ids.patch upstreamed with commit f452518c982e57 ("net: phy: intel-xway: add VR9 v1.1 phy ids") The following patches were updated: - 0018-MTD-nand-lots-of-xrx200-fixes.patch the mainline driver now resides in drivers/mtd/nand/raw/xway_nand.c (instead of drivers/mtd/nand/xway_nand.c) - 0025-NET-MIPS-lantiq-adds-xrx200-net.patch the DMA API now requires a valid device to be passed to all operations - 0028-NET-lantiq-various-etop-fixes.patch the DMA API now requires a valid device to be passed to all operations Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target')
-rw-r--r--target/linux/lantiq/config-4.1942
-rw-r--r--target/linux/lantiq/patches-4.19/0001-MIPS-lantiq-add-pcie-driver.patch12
-rw-r--r--target/linux/lantiq/patches-4.19/0002-gpio-stp-xway-Implement-get-callback.patch47
-rw-r--r--target/linux/lantiq/patches-4.19/0004-MIPS-lantiq-add-atm-hack.patch4
-rw-r--r--target/linux/lantiq/patches-4.19/0018-MTD-nand-lots-of-xrx200-fixes.patch6
-rw-r--r--target/linux/lantiq/patches-4.19/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch10
-rw-r--r--target/linux/lantiq/patches-4.19/0023-NET-PHY-add-led-support-for-intel-xway.patch8
-rw-r--r--target/linux/lantiq/patches-4.19/0025-NET-MIPS-lantiq-adds-xrx200-net.patch18
-rw-r--r--target/linux/lantiq/patches-4.19/0027-01-net-phy-intel-xway-add-VR9-version-number.patch62
-rw-r--r--target/linux/lantiq/patches-4.19/0027-02-net-phy-intel-xway-add-VR9-v1.1-phy-ids.patch69
-rw-r--r--target/linux/lantiq/patches-4.19/0028-NET-lantiq-various-etop-fixes.patch56
-rw-r--r--target/linux/lantiq/patches-4.19/0030-GPIO-add-named-gpio-exports.patch12
-rw-r--r--target/linux/lantiq/patches-4.19/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch4
-rw-r--r--target/linux/lantiq/patches-4.19/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch2
-rw-r--r--target/linux/lantiq/patches-4.19/0042-arch-mips-increase-io_space_limit.patch2
-rw-r--r--target/linux/lantiq/patches-4.19/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch10
-rw-r--r--target/linux/lantiq/patches-4.19/0051-MIPS-lantiq-improve-USB-initialization.patch2
-rw-r--r--target/linux/lantiq/patches-4.19/0101-find_active_root.patch4
-rw-r--r--target/linux/lantiq/patches-4.19/0152-lantiq-VPE.patch4
-rw-r--r--target/linux/lantiq/patches-4.19/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch2
-rw-r--r--target/linux/lantiq/patches-4.19/0701-NET-lantiq-etop-of-mido.patch4
-rw-r--r--target/linux/lantiq/xrx200/config-4.198
22 files changed, 106 insertions, 282 deletions
diff --git a/target/linux/lantiq/config-4.19 b/target/linux/lantiq/config-4.19
index 7233a88aa6..560e8474dc 100644
--- a/target/linux/lantiq/config-4.19
+++ b/target/linux/lantiq/config-4.19
@@ -2,18 +2,11 @@ CONFIG_ARCH_BINFMT_ELF_STATE=y
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_ARCH_DISCARD_MEMBLOCK=y
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
-# CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set
CONFIG_ARCH_HAS_RESET_CONTROLLER=y
-# CONFIG_ARCH_HAS_SG_CHAIN is not set
-# CONFIG_ARCH_HAS_STRICT_KERNEL_RWX is not set
-# CONFIG_ARCH_HAS_STRICT_MODULE_RWX is not set
+CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
CONFIG_ARCH_MMAP_RND_BITS_MAX=15
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
-# CONFIG_ARCH_OPTIONAL_KERNEL_RWX is not set
-# CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
@@ -43,7 +36,11 @@ CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CSRC_R4K=y
+CONFIG_DMA_DIRECT_OPS=y
CONFIG_DMA_NONCOHERENT=y
+CONFIG_DMA_NONCOHERENT_CACHE_SYNC=y
+CONFIG_DMA_NONCOHERENT_MMAP=y
+CONFIG_DMA_NONCOHERENT_OPS=y
CONFIG_DTC=y
# CONFIG_DT_EASY50712 is not set
CONFIG_EARLY_PRINTK=y
@@ -53,11 +50,15 @@ CONFIG_GENERIC_ATOMIC64=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_IO=y
CONFIG_GENERIC_IRQ_CHIP=y
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
CONFIG_GENERIC_IRQ_IPI=y
CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_CMPDI2=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_PHY=y
CONFIG_GENERIC_SCHED_CLOCK=y
@@ -67,29 +68,23 @@ CONFIG_GPIOLIB=y
CONFIG_GPIO_MM_LANTIQ=y
CONFIG_GPIO_STP_XWAY=y
CONFIG_GPIO_SYSFS=y
-# CONFIG_GRO_CELLS is not set
CONFIG_HANDLE_DOMAIN_IRQ=y
CONFIG_HARDWARE_WATCHPOINTS=y
CONFIG_HAS_DMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT_MAP=y
-# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
-# CONFIG_HAVE_ARCH_BITREVERSE is not set
CONFIG_HAVE_ARCH_COMPILER_H=y
CONFIG_HAVE_ARCH_JUMP_LABEL=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
-# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
CONFIG_HAVE_CBPF_JIT=y
-CONFIG_HAVE_CC_STACKPROTECTOR=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_CONTEXT_TRACKING=y
CONFIG_HAVE_COPY_THREAD_TLS=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_HAVE_DEBUG_KMEMLEAK=y
CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
-CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
@@ -101,6 +96,7 @@ CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_KVM=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
@@ -108,6 +104,7 @@ CONFIG_HAVE_NET_DSA=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
+CONFIG_HAVE_RSEQ=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_HW_HAS_PCI=y
@@ -130,22 +127,23 @@ CONFIG_LANTIQ_WDT=y
# CONFIG_LANTIQ_XRX200 is not set
CONFIG_LEDS_GPIO=y
CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
CONFIG_MDIO_BUS=y
CONFIG_MDIO_DEVICE=y
+CONFIG_MEMFD_CREATE=y
CONFIG_MFD_CORE=y
CONFIG_MFD_SYSCON=y
CONFIG_MIGRATION=y
CONFIG_MIPS=y
CONFIG_MIPS_ASID_BITS=8
CONFIG_MIPS_ASID_SHIFT=0
+CONFIG_MIPS_CBPF_JIT=y
CONFIG_MIPS_CLOCK_VSYSCALL=y
# CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set
# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
CONFIG_MIPS_CMDLINE_FROM_DTB=y
# CONFIG_MIPS_ELF_APPENDED_DTB is not set
-# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set
CONFIG_MIPS_L1_CACHE_SHIFT=5
-# CONFIG_MIPS_MACHINE is not set
# CONFIG_MIPS_MT_SMP is not set
# CONFIG_MIPS_NO_APPENDED_DTB is not set
CONFIG_MIPS_RAW_APPENDED_DTB=y
@@ -167,13 +165,14 @@ CONFIG_MTD_SPLIT_UIMAGE_FW=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_PER_CPU_KM=y
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
-# CONFIG_NO_IOPORT_MAP is not set
+CONFIG_NVMEM=y
CONFIG_OF=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_EARLY_FLATTREE=y
CONFIG_OF_FLATTREE=y
CONFIG_OF_GPIO=y
CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
CONFIG_OF_MDIO=y
CONFIG_OF_NET=y
CONFIG_PCI_DRIVERS_LEGACY=y
@@ -188,17 +187,12 @@ CONFIG_PINCTRL_XWAY=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_SYSCON=y
CONFIG_PSB6970_PHY=y
-# CONFIG_RCU_NEED_SEGCBLIST is not set
-# CONFIG_RCU_STALL_COMMON is not set
CONFIG_REGMAP=y
CONFIG_REGMAP_MMIO=y
CONFIG_RESET_CONTROLLER=y
CONFIG_RESET_LANTIQ=y
CONFIG_RTL8366RB_PHY=y
CONFIG_RTL8366_SMI=y
-# CONFIG_SCHED_INFO is not set
-# CONFIG_SCSI_DMA is not set
-# CONFIG_SENSORS_LTQ_CPUTEMP is not set
# CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_LANTIQ=y
# CONFIG_SOC_AMAZON_SE is not set
@@ -208,6 +202,7 @@ CONFIG_SOC_XWAY=y
CONFIG_SPI=y
CONFIG_SPI_LANTIQ_SSC=y
CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
CONFIG_SRCU=y
CONFIG_SWAP_IO_SPACE=y
CONFIG_SWCONFIG=y
@@ -221,6 +216,7 @@ CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
CONFIG_SYS_SUPPORTS_MIPS16=y
CONFIG_SYS_SUPPORTS_MULTITHREADING=y
+CONFIG_SYS_SUPPORTS_VPE_LOADER=y
CONFIG_TICK_CPU_ACCOUNTING=y
CONFIG_TINY_SRCU=y
CONFIG_USE_OF=y
diff --git a/target/linux/lantiq/patches-4.19/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-4.19/0001-MIPS-lantiq-add-pcie-driver.patch
index 48dd111cca..4cea5547c2 100644
--- a/target/linux/lantiq/patches-4.19/0001-MIPS-lantiq-add-pcie-driver.patch
+++ b/target/linux/lantiq/patches-4.19/0001-MIPS-lantiq-add-pcie-driver.patch
@@ -4143,7 +4143,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
--- a/arch/mips/pci/pci-legacy.c
+++ b/arch/mips/pci/pci-legacy.c
-@@ -313,3 +313,30 @@ char *__init pcibios_setup(char *str)
+@@ -311,3 +311,30 @@ char *__init pcibios_setup(char *str)
return pcibios_plat_setup(str);
return str;
}
@@ -5482,9 +5482,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
+#endif /* IFXMIPS_PCIE_VR9_H */
+
---- a/drivers/pci/pcie/aer/Kconfig
-+++ b/drivers/pci/pcie/aer/Kconfig
-@@ -19,6 +19,7 @@ config PCIEAER
+--- a/drivers/pci/pcie/Kconfig
++++ b/drivers/pci/pcie/Kconfig
+@@ -54,6 +54,7 @@ config PCIEAER_INJECT
config PCIE_ECRC
bool "PCI Express ECRC settings control"
depends on PCIEAER
@@ -5494,7 +5494,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
-@@ -1302,6 +1302,8 @@ void pci_walk_bus(struct pci_bus *top, i
+@@ -1325,6 +1325,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);
@@ -5505,7 +5505,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
unsigned long type);
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
-@@ -1061,6 +1061,12 @@
+@@ -1065,6 +1065,12 @@
#define PCI_DEVICE_ID_SGI_LITHIUM 0x1002
#define PCI_DEVICE_ID_SGI_IOC4 0x100a
diff --git a/target/linux/lantiq/patches-4.19/0002-gpio-stp-xway-Implement-get-callback.patch b/target/linux/lantiq/patches-4.19/0002-gpio-stp-xway-Implement-get-callback.patch
deleted file mode 100644
index c32b3d6bba..0000000000
--- a/target/linux/lantiq/patches-4.19/0002-gpio-stp-xway-Implement-get-callback.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 5b9b2b5284f81941972105b13337c58489ea8fca Mon Sep 17 00:00:00 2001
-From: Mathias Kresin <dev@kresin.me>
-Date: Thu, 28 Jun 2018 21:57:40 +0200
-Subject: [PATCH] gpio: stp-xway: Implement get callback
-
-Add an implementation to get the current GPIO state.
-
-The callback is used by the leds-gpio driver for example, in case the
-current LED/GPIO state should be kept during driver load.
-
-Signed-off-by: Mathias Kresin <dev@kresin.me>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
----
- drivers/gpio/gpio-stp-xway.c | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
---- a/drivers/gpio/gpio-stp-xway.c
-+++ b/drivers/gpio/gpio-stp-xway.c
-@@ -91,6 +91,20 @@ struct xway_stp {
- };
-
- /**
-+ * xway_stp_get() - gpio_chip->get - get gpios.
-+ * @gc: Pointer to gpio_chip device structure.
-+ * @gpio: GPIO signal number.
-+ *
-+ * Gets the shadow value.
-+ */
-+static int xway_stp_get(struct gpio_chip *gc, unsigned int gpio)
-+{
-+ struct xway_stp *chip = gpiochip_get_data(gc);
-+
-+ return (xway_stp_r32(chip->virt, XWAY_STP_CPU0) & BIT(gpio));
-+}
-+
-+/**
- * xway_stp_set() - gpio_chip->set - set gpios.
- * @gc: Pointer to gpio_chip device structure.
- * @gpio: GPIO signal number.
-@@ -215,6 +229,7 @@ static int xway_stp_probe(struct platfor
- chip->gc.parent = &pdev->dev;
- chip->gc.label = "stp-xway";
- chip->gc.direction_output = xway_stp_dir_out;
-+ chip->gc.get = xway_stp_get;
- chip->gc.set = xway_stp_set;
- chip->gc.request = xway_stp_request;
- chip->gc.base = -1;
diff --git a/target/linux/lantiq/patches-4.19/0004-MIPS-lantiq-add-atm-hack.patch b/target/linux/lantiq/patches-4.19/0004-MIPS-lantiq-add-atm-hack.patch
index 66ca2fd5ac..b74642af14 100644
--- a/target/linux/lantiq/patches-4.19/0004-MIPS-lantiq-add-atm-hack.patch
+++ b/target/linux/lantiq/patches-4.19/0004-MIPS-lantiq-add-atm-hack.patch
@@ -448,7 +448,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+EXPORT_SYMBOL(_dma_cache_wback);
+EXPORT_SYMBOL(_dma_cache_inv);
- #endif /* CONFIG_DMA_NONCOHERENT || CONFIG_DMA_MAYBE_COHERENT */
+ #endif /* CONFIG_DMA_NONCOHERENT */
--- a/include/uapi/linux/atm.h
+++ b/include/uapi/linux/atm.h
@@ -469,7 +469,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
int max_pcr; /* maximum PCR in cells per second */
--- a/net/atm/proc.c
+++ b/net/atm/proc.c
-@@ -155,7 +155,7 @@ static void *vcc_seq_next(struct seq_fil
+@@ -141,7 +141,7 @@ static void *vcc_seq_next(struct seq_fil
static void pvc_info(struct seq_file *seq, struct atm_vcc *vcc)
{
static const char *const class_name[] = {
diff --git a/target/linux/lantiq/patches-4.19/0018-MTD-nand-lots-of-xrx200-fixes.patch b/target/linux/lantiq/patches-4.19/0018-MTD-nand-lots-of-xrx200-fixes.patch
index b97967d20e..4e34580efc 100644
--- a/target/linux/lantiq/patches-4.19/0018-MTD-nand-lots-of-xrx200-fixes.patch
+++ b/target/linux/lantiq/patches-4.19/0018-MTD-nand-lots-of-xrx200-fixes.patch
@@ -5,11 +5,11 @@ Subject: [PATCH 18/36] MTD: nand: lots of xrx200 fixes
Signed-off-by: John Crispin <blogic@openwrt.org>
---
- drivers/mtd/nand/xway_nand.c | 63 ++++++++++++++++++++++++++++++++++++++++++
+ drivers/mtd/nand/raw/xway_nand.c | 63 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
---- a/drivers/mtd/nand/xway_nand.c
-+++ b/drivers/mtd/nand/xway_nand.c
+--- a/drivers/mtd/nand/raw/xway_nand.c
++++ b/drivers/mtd/nand/raw/xway_nand.c
@@ -63,6 +63,24 @@
#define NAND_CON_CSMUX (1 << 1)
#define NAND_CON_NANDM 1
diff --git a/target/linux/lantiq/patches-4.19/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch b/target/linux/lantiq/patches-4.19/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch
index 415c8579bd..90dc20b901 100644
--- a/target/linux/lantiq/patches-4.19/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch
+++ b/target/linux/lantiq/patches-4.19/0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
-@@ -245,6 +246,10 @@ static int m25p_probe(struct spi_device
+@@ -180,6 +181,10 @@ static int m25p_probe(struct spi_mem *sp
};
char *flash_name;
int ret;
@@ -31,14 +31,14 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ of_property_read_string(spi->dev.of_node,
+ "linux,mtd-name", &of_mtd_name);
- data = dev_get_platdata(&spi->dev);
+ data = dev_get_platdata(&spimem->spi->dev);
-@@ -283,6 +288,8 @@ static int m25p_probe(struct spi_device
+@@ -218,6 +223,8 @@ static int m25p_probe(struct spi_mem *sp
if (data && data->name)
nor->mtd.name = data->name;
+ else if (of_mtd_name)
+ nor->mtd.name = of_mtd_name;
- /* For some (historical?) reason many platforms provide two different
- * names in flash_platform_data: "name" and "type". Quite often name is
+ if (!nor->mtd.name)
+ nor->mtd.name = spi_mem_get_name(spimem);
diff --git a/target/linux/lantiq/patches-4.19/0023-NET-PHY-add-led-support-for-intel-xway.patch b/target/linux/lantiq/patches-4.19/0023-NET-PHY-add-led-support-for-intel-xway.patch
index 0686842821..60a6dbafdd 100644
--- a/target/linux/lantiq/patches-4.19/0023-NET-PHY-add-led-support-for-intel-xway.patch
+++ b/target/linux/lantiq/patches-4.19/0023-NET-PHY-add-led-support-for-intel-xway.patch
@@ -13,9 +13,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/drivers/net/phy/intel-xway.c
+++ b/drivers/net/phy/intel-xway.c
-@@ -152,6 +152,51 @@
- #define PHY_ID_PHY11G_VR9 0xD565A409
- #define PHY_ID_PHY22F_VR9 0xD565A419
+@@ -154,6 +154,51 @@
+ #define PHY_ID_PHY11G_VR9_1_2 0xD565A409
+ #define PHY_ID_PHY22F_VR9_1_2 0xD565A419
+#if IS_ENABLED(CONFIG_OF_MDIO)
+static int vr9_gphy_of_reg_init(struct phy_device *phydev)
@@ -65,7 +65,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
static int xway_gphy_config_init(struct phy_device *phydev)
{
int err;
-@@ -190,6 +235,7 @@ static int xway_gphy_config_init(struct
+@@ -192,6 +237,7 @@ static int xway_gphy_config_init(struct
phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED2H, ledxh);
phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED2L, ledxl);
diff --git a/target/linux/lantiq/patches-4.19/0025-NET-MIPS-lantiq-adds-xrx200-net.patch b/target/linux/lantiq/patches-4.19/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
index 7eaf0b7b7b..b2de5ac510 100644
--- a/target/linux/lantiq/patches-4.19/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
+++ b/target/linux/lantiq/patches-4.19/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
@@ -16,7 +16,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
-@@ -107,7 +107,13 @@ config LANTIQ_ETOP
+@@ -106,7 +106,13 @@ config LANTIQ_ETOP
tristate "Lantiq SoC ETOP driver"
depends on SOC_TYPE_XWAY
---help---
@@ -33,7 +33,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
source "drivers/net/ethernet/mediatek/Kconfig"
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
-@@ -50,6 +50,7 @@ obj-$(CONFIG_NET_VENDOR_XSCALE) += xscal
+@@ -49,6 +49,7 @@ obj-$(CONFIG_NET_VENDOR_XSCALE) += xscal
obj-$(CONFIG_JME) += jme.o
obj-$(CONFIG_KORINA) += korina.o
obj-$(CONFIG_LANTIQ_ETOP) += lantiq_etop.o
@@ -209,7 +209,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+};
--- /dev/null
+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -0,0 +1,1887 @@
+@@ -0,0 +1,1889 @@
+/*
+ * 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
@@ -1133,7 +1133,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ goto skip;
+
+ skb_reserve(ch->skb[ch->dma.desc], NET_SKB_PAD);
-+ ch->dma.desc_base[ch->dma.desc].addr = dma_map_single(NULL,
++ ch->dma.desc_base[ch->dma.desc].addr = dma_map_single(ch->dma.dev,
+ ch->skb[ch->dma.desc]->data, XRX200_DMA_DATA_LEN,
+ DMA_FROM_DEVICE);
+ ch->dma.desc_base[ch->dma.desc].addr =
@@ -1328,7 +1328,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+
+ netif_trans_update(dev);
+
-+ desc->addr = ((unsigned int) dma_map_single(NULL, skb->data, len,
++ desc->addr = ((unsigned int) dma_map_single(ch->dma.dev, skb->data, len,
+ DMA_TO_DEVICE)) - byte_offset;
+ wmb();
+ desc->ctl = LTQ_DMA_OWN | LTQ_DMA_SOP | LTQ_DMA_EOP |
@@ -1365,7 +1365,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ return IRQ_HANDLED;
+}
+
-+static int xrx200_dma_init(struct xrx200_hw *hw)
++static int xrx200_dma_init(struct device *dev, struct xrx200_hw *hw)
+{
+ int i, err = 0;
+
@@ -1378,6 +1378,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ spin_lock_init(&ch->lock);
+
+ ch->idx = ch->dma.nr = i;
++ ch->dma.dev = dev;
+
+ if (i == XRX200_DMA_TX) {
+ ltq_dma_alloc_tx(&ch->dma);
@@ -1540,11 +1541,12 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+{
+ struct net_device *netdev = phydev->attached_dev;
+
-+ if (do_carrier)
++ if (do_carrier) {
+ if (up)
+ netif_carrier_on(netdev);
+ else if (!xrx200_phy_has_link(netdev))
+ netif_carrier_off(netdev);
++ }
+
+ phydev->adjust_link(netdev);
+}
@@ -2002,7 +2004,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ }
+
+ /* bring up the dma engine and IP core */
-+ xrx200_dma_init(&xrx200_hw);
++ xrx200_dma_init(&pdev->dev, &xrx200_hw);
+ xrx200_hw_init(&xrx200_hw);
+ tasklet_init(&xrx200_hw.chan[XRX200_DMA_TX].tasklet, xrx200_tx_housekeeping, (u32) &xrx200_hw.chan[XRX200_DMA_TX]);
+ tasklet_init(&xrx200_hw.chan[XRX200_DMA_TX_2].tasklet, xrx200_tx_housekeeping, (u32) &xrx200_hw.chan[XRX200_DMA_TX_2]);
diff --git a/target/linux/lantiq/patches-4.19/0027-01-net-phy-intel-xway-add-VR9-version-number.patch b/target/linux/lantiq/patches-4.19/0027-01-net-phy-intel-xway-add-VR9-version-number.patch
deleted file mode 100644
index b02b3fbd2c..0000000000
--- a/target/linux/lantiq/patches-4.19/0027-01-net-phy-intel-xway-add-VR9-version-number.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 5b73d9955fb4b0e3c37f8f6c71910293246c89dc Mon Sep 17 00:00:00 2001
-From: Mathias Kresin <dev@kresin.me>
-Date: Thu, 22 Mar 2018 23:31:38 +0100
-Subject: [PATCH 1/2] net: phy: intel-xway: add VR9 version number
-
-The VR9 phy ids are matching only for the SoC version 1.2. Rename the
-macros and change the names to take this into account.
-
-Signed-off-by: Mathias Kresin <dev@kresin.me>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- drivers/net/phy/intel-xway.c | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
---- a/drivers/net/phy/intel-xway.c
-+++ b/drivers/net/phy/intel-xway.c
-@@ -149,8 +149,8 @@
- #define PHY_ID_PHY22F_1_4 0xD565A410
- #define PHY_ID_PHY11G_1_5 0xD565A401
- #define PHY_ID_PHY22F_1_5 0xD565A411
--#define PHY_ID_PHY11G_VR9 0xD565A409
--#define PHY_ID_PHY22F_VR9 0xD565A419
-+#define PHY_ID_PHY11G_VR9_1_2 0xD565A409
-+#define PHY_ID_PHY22F_VR9_1_2 0xD565A419
-
- #if IS_ENABLED(CONFIG_OF_MDIO)
- static int vr9_gphy_of_reg_init(struct phy_device *phydev)
-@@ -366,9 +366,9 @@ static struct phy_driver xway_gphy[] = {
- .suspend = genphy_suspend,
- .resume = genphy_resume,
- }, {
-- .phy_id = PHY_ID_PHY11G_VR9,
-+ .phy_id = PHY_ID_PHY11G_VR9_1_2,
- .phy_id_mask = 0xffffffff,
-- .name = "Intel XWAY PHY11G (xRX integrated)",
-+ .name = "Intel XWAY PHY11G (xRX v1.2 integrated)",
- .features = PHY_GBIT_FEATURES,
- .flags = PHY_HAS_INTERRUPT,
- .config_init = xway_gphy_config_init,
-@@ -380,9 +380,9 @@ static struct phy_driver xway_gphy[] = {
- .suspend = genphy_suspend,
- .resume = genphy_resume,
- }, {
-- .phy_id = PHY_ID_PHY22F_VR9,
-+ .phy_id = PHY_ID_PHY22F_VR9_1_2,
- .phy_id_mask = 0xffffffff,
-- .name = "Intel XWAY PHY22F (xRX integrated)",
-+ .name = "Intel XWAY PHY22F (xRX v1.2 integrated)",
- .features = PHY_BASIC_FEATURES,
- .flags = PHY_HAS_INTERRUPT,
- .config_init = xway_gphy_config_init,
-@@ -404,8 +404,8 @@ static struct mdio_device_id __maybe_unu
- { PHY_ID_PHY22F_1_4, 0xffffffff },
- { PHY_ID_PHY11G_1_5, 0xffffffff },
- { PHY_ID_PHY22F_1_5, 0xffffffff },
-- { PHY_ID_PHY11G_VR9, 0xffffffff },
-- { PHY_ID_PHY22F_VR9, 0xffffffff },
-+ { PHY_ID_PHY11G_VR9_1_2, 0xffffffff },
-+ { PHY_ID_PHY22F_VR9_1_2, 0xffffffff },
- { }
- };
- MODULE_DEVICE_TABLE(mdio, xway_gphy_tbl);
diff --git a/target/linux/lantiq/patches-4.19/0027-02-net-phy-intel-xway-add-VR9-v1.1-phy-ids.patch b/target/linux/lantiq/patches-4.19/0027-02-net-phy-intel-xway-add-VR9-v1.1-phy-ids.patch
deleted file mode 100644
index c9229b3ae2..0000000000
--- a/target/linux/lantiq/patches-4.19/0027-02-net-phy-intel-xway-add-VR9-v1.1-phy-ids.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From f452518c982e57538e6d49da0a2c80eef22087ab Mon Sep 17 00:00:00 2001
-From: Mathias Kresin <dev@kresin.me>
-Date: Thu, 22 Mar 2018 23:31:39 +0100
-Subject: [PATCH 2/2] net: phy: intel-xway: add VR9 v1.1 phy ids
-
-The phys embedded into the v1.1 of the VR9 SoC are using different phy
-ids. Add the phy ids to use the driver for this VR9 version as well.
-
-Signed-off-by: Mathias Kresin <dev@kresin.me>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- drivers/net/phy/intel-xway.c | 28 ++++++++++++++++++++++++++++
- 1 file changed, 28 insertions(+)
-
---- a/drivers/net/phy/intel-xway.c
-+++ b/drivers/net/phy/intel-xway.c
-@@ -149,6 +149,8 @@
- #define PHY_ID_PHY22F_1_4 0xD565A410
- #define PHY_ID_PHY11G_1_5 0xD565A401
- #define PHY_ID_PHY22F_1_5 0xD565A411
-+#define PHY_ID_PHY11G_VR9_1_1 0xD565A408
-+#define PHY_ID_PHY22F_VR9_1_1 0xD565A418
- #define PHY_ID_PHY11G_VR9_1_2 0xD565A409
- #define PHY_ID_PHY22F_VR9_1_2 0xD565A419
-
-@@ -366,6 +368,34 @@ static struct phy_driver xway_gphy[] = {
- .suspend = genphy_suspend,
- .resume = genphy_resume,
- }, {
-+ .phy_id = PHY_ID_PHY11G_VR9_1_1,
-+ .phy_id_mask = 0xffffffff,
-+ .name = "Intel XWAY PHY11G (xRX v1.1 integrated)",
-+ .features = PHY_GBIT_FEATURES,
-+ .flags = PHY_HAS_INTERRUPT,
-+ .config_init = xway_gphy_config_init,
-+ .config_aneg = genphy_config_aneg,
-+ .read_status = genphy_read_status,
-+ .ack_interrupt = xway_gphy_ack_interrupt,
-+ .did_interrupt = xway_gphy_did_interrupt,
-+ .config_intr = xway_gphy_config_intr,
-+ .suspend = genphy_suspend,
-+ .resume = genphy_resume,
-+ }, {
-+ .phy_id = PHY_ID_PHY22F_VR9_1_1,
-+ .phy_id_mask = 0xffffffff,
-+ .name = "Intel XWAY PHY22F (xRX v1.1 integrated)",
-+ .features = PHY_BASIC_FEATURES,
-+ .flags = PHY_HAS_INTERRUPT,
-+ .config_init = xway_gphy_config_init,
-+ .config_aneg = genphy_config_aneg,
-+ .read_status = genphy_read_status,
-+ .ack_interrupt = xway_gphy_ack_interrupt,
-+ .did_interrupt = xway_gphy_did_interrupt,
-+ .config_intr = xway_gphy_config_intr,
-+ .suspend = genphy_suspend,
-+ .resume = genphy_resume,
-+ }, {
- .phy_id = PHY_ID_PHY11G_VR9_1_2,
- .phy_id_mask = 0xffffffff,
- .name = "Intel XWAY PHY11G (xRX v1.2 integrated)",
-@@ -404,6 +434,8 @@ static struct mdio_device_id __maybe_unu
- { PHY_ID_PHY22F_1_4, 0xffffffff },
- { PHY_ID_PHY11G_1_5, 0xffffffff },
- { PHY_ID_PHY22F_1_5, 0xffffffff },
-+ { PHY_ID_PHY11G_VR9_1_1, 0xffffffff },
-+ { PHY_ID_PHY22F_VR9_1_1, 0xffffffff },
- { PHY_ID_PHY11G_VR9_1_2, 0xffffffff },
- { PHY_ID_PHY22F_VR9_1_2, 0xffffffff },
- { }
diff --git a/target/linux/lantiq/patches-4.19/0028-NET-lantiq-various-etop-fixes.patch b/target/linux/lantiq/patches-4.19/0028-NET-lantiq-various-etop-fixes.patch
index 83aef78ca0..6899a96cc6 100644
--- a/target/linux/lantiq/patches-4.19/0028-NET-lantiq-various-etop-fixes.patch
+++ b/target/linux/lantiq/patches-4.19/0028-NET-lantiq-various-etop-fixes.patch
@@ -165,14 +165,15 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
- int tx_free[MAX_DMA_CHAN >> 1];
+ struct ltq_etop_chan txch;
+ struct ltq_etop_chan rxch;
-+
+
+- spinlock_t lock;
+ int tx_irq;
+ int rx_irq;
+
+ unsigned char mac[6];
+ int mii_mode;
-
- spinlock_t lock;
++
++ spinlock_t lock;
+
+ struct clk *clk_ppe;
+ struct clk *clk_switch;
@@ -272,7 +273,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
int desc;
for (desc = 0; desc < LTQ_DESC_NUM; desc++)
dev_kfree_skb_any(ch->skb[ch->dma.desc]);
-@@ -231,65 +308,133 @@ static void
+@@ -231,66 +308,135 @@ static void
ltq_etop_hw_exit(struct net_device *dev)
{
struct ltq_etop_priv *priv = netdev_priv(dev);
@@ -328,11 +329,10 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
struct ltq_etop_priv *priv = netdev_priv(dev);
- int i;
+ int mii_mode = priv->mii_mode;
-
-- ltq_pmu_enable(PMU_PPE);
++
+ clk_enable(priv->clk_ppe);
-- switch (priv->pldata->mii_mode) {
+- ltq_pmu_enable(PMU_PPE);
+ if (of_machine_is_compatible("lantiq,ar9")) {
+ ltq_etop_gbit_init(dev);
+ /* force the etops link to the gbit to MII */
@@ -341,7 +341,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ ltq_etop_w32_mask(MDIO_CFG_MASK, 0, LTQ_ETOP_MDIO_CFG);
+ ltq_etop_w32_mask(MAC_CFG_MASK, MAC_CFG_CGEN | MAC_CFG_DUPLEX |
+ MAC_CFG_SPEED | MAC_CFG_LINK, LTQ_ETOP_MAC_CFG);
-+
+
+- switch (priv->pldata->mii_mode) {
+ switch (mii_mode) {
case PHY_INTERFACE_MODE_RMII:
- ltq_etop_w32_mask(ETOP_MII_MASK,
@@ -396,6 +397,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
- struct ltq_etop_chan *ch = &priv->ch[i];
-
- ch->idx = ch->dma.nr = i;
+- ch->dma.dev = &priv->pdev->dev;
-
- if (IS_TX(i)) {
- ltq_dma_alloc_tx(&ch->dma);
@@ -409,6 +411,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
- ch->dma.desc = 0;
- request_irq(irq, ltq_etop_dma_irq, 0, "etop_rx", priv);
+ priv->txch.dma.nr = tx;
++ priv->txch.dma.dev = &priv->pdev->dev;
+ ltq_dma_alloc_tx(&priv->txch.dma);
+ err = request_irq(priv->tx_irq, ltq_etop_dma_irq, 0, "eth_tx", priv);
+ if (err) {
@@ -418,6 +421,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ priv->txch.dma.irq = priv->tx_irq;
+
+ priv->rxch.dma.nr = rx;
++ priv->rxch.dma.dev = &priv->pdev->dev;
+ ltq_dma_alloc_rx(&priv->rxch.dma);
+ for (priv->rxch.dma.desc = 0; priv->rxch.dma.desc < LTQ_DESC_NUM;
+ priv->rxch.dma.desc++) {
@@ -440,7 +444,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
}
static void
-@@ -308,6 +453,39 @@ static const struct ethtool_ops ltq_etop
+@@ -309,6 +455,39 @@ static const struct ethtool_ops ltq_etop
};
static int
@@ -480,7 +484,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr, int phy_reg, u16 phy_data)
{
u32 val = MDIO_REQUEST |
-@@ -315,9 +493,9 @@ ltq_etop_mdio_wr(struct mii_bus *bus, in
+@@ -316,9 +495,9 @@ ltq_etop_mdio_wr(struct mii_bus *bus, in
((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET) |
phy_data;
@@ -492,7 +496,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
return 0;
}
-@@ -328,12 +506,12 @@ ltq_etop_mdio_rd(struct mii_bus *bus, in
+@@ -329,12 +508,12 @@ ltq_etop_mdio_rd(struct mii_bus *bus, in
((phy_addr & MDIO_ADDR_MASK) << MDIO_ADDR_OFFSET) |
((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET);
@@ -509,7 +513,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
return val;
}
-@@ -348,8 +526,18 @@ ltq_etop_mdio_probe(struct net_device *d
+@@ -349,8 +528,18 @@ ltq_etop_mdio_probe(struct net_device *d
{
struct ltq_etop_priv *priv = netdev_priv(dev);
struct phy_device *phydev;
@@ -529,7 +533,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
if (!phydev) {
netdev_err(dev, "no PHY found\n");
-@@ -357,21 +545,18 @@ ltq_etop_mdio_probe(struct net_device *d
+@@ -358,21 +547,18 @@ ltq_etop_mdio_probe(struct net_device *d
}
phydev = phy_connect(dev, phydev_name(phydev),
@@ -556,7 +560,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
phydev->advertising = phydev->supported;
phy_attached_info(phydev);
-@@ -392,8 +577,13 @@ ltq_etop_mdio_init(struct net_device *de
+@@ -393,8 +579,13 @@ ltq_etop_mdio_init(struct net_device *de
}
priv->mii_bus->priv = dev;
@@ -572,7 +576,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
priv->mii_bus->name = "ltq_mii";
snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
priv->pdev->name, priv->pdev->id);
-@@ -430,17 +620,19 @@ static int
+@@ -431,17 +622,19 @@ static int
ltq_etop_open(struct net_device *dev)
{
struct ltq_etop_priv *priv = netdev_priv(dev);
@@ -601,7 +605,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
netif_tx_start_all_queues(dev);
return 0;
}
-@@ -449,18 +641,19 @@ static int
+@@ -450,18 +643,19 @@ static int
ltq_etop_stop(struct net_device *dev)
{
struct ltq_etop_priv *priv = netdev_priv(dev);
@@ -631,7 +635,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
return 0;
}
-@@ -470,16 +663,16 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -471,16 +665,16 @@ ltq_etop_tx(struct sk_buff *skb, struct
int queue = skb_get_queue_mapping(skb);
struct netdev_queue *txq = netdev_get_tx_queue(dev, queue);
struct ltq_etop_priv *priv = netdev_priv(dev);
@@ -653,7 +657,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
netdev_err(dev, "tx ring full\n");
netif_tx_stop_queue(txq);
return NETDEV_TX_BUSY;
-@@ -487,7 +680,7 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -488,7 +682,7 @@ ltq_etop_tx(struct sk_buff *skb, struct
/* dma needs to start on a 16 byte aligned address */
byte_offset = CPHYSADDR(skb->data) % 16;
@@ -662,7 +666,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
netif_trans_update(dev);
-@@ -497,11 +690,11 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -498,11 +692,11 @@ ltq_etop_tx(struct sk_buff *skb, struct
wmb();
desc->ctl = LTQ_DMA_OWN | LTQ_DMA_SOP | LTQ_DMA_EOP |
LTQ_DMA_TX_OFFSET(byte_offset) | (len & LTQ_DMA_SIZE_MASK);
@@ -677,7 +681,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
netif_tx_stop_queue(txq);
return NETDEV_TX_OK;
-@@ -515,8 +708,10 @@ ltq_etop_change_mtu(struct net_device *d
+@@ -516,8 +710,10 @@ ltq_etop_change_mtu(struct net_device *d
dev->mtu = new_mtu;
@@ -689,7 +693,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
spin_unlock_irqrestore(&priv->lock, flags);
return 0;
-@@ -584,6 +779,9 @@ ltq_etop_init(struct net_device *dev)
+@@ -577,6 +773,9 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_hw;
ltq_etop_change_mtu(dev, 1500);
@@ -699,7 +703,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)) {
-@@ -601,9 +799,10 @@ ltq_etop_init(struct net_device *dev)
+@@ -594,9 +793,10 @@ ltq_etop_init(struct net_device *dev)
dev->addr_assign_type = NET_ADDR_RANDOM;
ltq_etop_set_multicast_list(dev);
@@ -713,7 +717,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
return 0;
err_netdev:
-@@ -623,6 +822,9 @@ ltq_etop_tx_timeout(struct net_device *d
+@@ -616,6 +816,9 @@ ltq_etop_tx_timeout(struct net_device *d
err = ltq_etop_hw_init(dev);
if (err)
goto err_hw;
@@ -723,7 +727,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
netif_trans_update(dev);
netif_wake_queue(dev);
return;
-@@ -646,14 +848,19 @@ static const struct net_device_ops ltq_e
+@@ -639,14 +842,19 @@ static const struct net_device_ops ltq_e
.ndo_tx_timeout = ltq_etop_tx_timeout,
};
@@ -747,7 +751,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
-@@ -679,31 +886,62 @@ ltq_etop_probe(struct platform_device *p
+@@ -672,31 +880,62 @@ ltq_etop_probe(struct platform_device *p
goto err_out;
}
@@ -825,7 +829,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
err = register_netdev(dev);
if (err)
-@@ -732,31 +970,22 @@ ltq_etop_remove(struct platform_device *
+@@ -725,31 +964,22 @@ ltq_etop_remove(struct platform_device *
return 0;
}
diff --git a/target/linux/lantiq/patches-4.19/0030-GPIO-add-named-gpio-exports.patch b/target/linux/lantiq/patches-4.19/0030-GPIO-add-named-gpio-exports.patch
index fe4ea4fc24..8e3060d768 100644
--- a/target/linux/lantiq/patches-4.19/0030-GPIO-add-named-gpio-exports.patch
+++ b/target/linux/lantiq/patches-4.19/0030-GPIO-add-named-gpio-exports.patch
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
#include "gpiolib.h"
-@@ -507,3 +509,72 @@ void of_gpiochip_remove(struct gpio_chip
+@@ -660,3 +662,72 @@ void of_gpiochip_remove(struct gpio_chip
gpiochip_remove_pin_ranges(chip);
of_node_put(chip->of_node);
}
@@ -112,7 +112,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
{
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
-@@ -451,6 +451,7 @@ struct gpio_desc *devm_fwnode_get_gpiod_
+@@ -533,6 +533,7 @@ struct gpio_desc *devm_fwnode_get_gpiod_
#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);
-@@ -458,6 +459,13 @@ void gpiod_unexport(struct gpio_desc *de
+@@ -540,6 +541,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
-@@ -553,7 +553,7 @@ static struct class gpio_class = {
+@@ -568,7 +568,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;
-@@ -615,6 +615,8 @@ int gpiod_export(struct gpio_desc *desc,
+@@ -630,6 +630,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,
-@@ -636,6 +638,12 @@ err_unlock:
+@@ -651,6 +653,12 @@ err_unlock:
gpiod_dbg(desc, "%s: status %d\n", __func__, status);
return status;
}
diff --git a/target/linux/lantiq/patches-4.19/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch b/target/linux/lantiq/patches-4.19/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch
index a1e1cceddc..90238e35b4 100644
--- a/target/linux/lantiq/patches-4.19/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch
+++ b/target/linux/lantiq/patches-4.19/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
-@@ -696,6 +696,16 @@ config I2C_MESON
+@@ -690,6 +690,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
-@@ -68,6 +68,7 @@ obj-$(CONFIG_I2C_IMX_LPI2C) += i2c-imx-l
+@@ -67,6 +67,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-4.19/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-4.19/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
index 2e0ce468f0..a3b717c043 100644
--- a/target/linux/lantiq/patches-4.19/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
+++ b/target/linux/lantiq/patches-4.19/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
-@@ -783,7 +783,11 @@ ltq_etop_init(struct net_device *dev)
+@@ -777,7 +777,11 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_hw;
diff --git a/target/linux/lantiq/patches-4.19/0042-arch-mips-increase-io_space_limit.patch b/target/linux/lantiq/patches-4.19/0042-arch-mips-increase-io_space_limit.patch
index 14b417e690..7165dd0070 100644
--- a/target/linux/lantiq/patches-4.19/0042-arch-mips-increase-io_space_limit.patch
+++ b/target/linux/lantiq/patches-4.19/0042-arch-mips-increase-io_space_limit.patch
@@ -12,7 +12,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
-@@ -50,7 +50,7 @@
+@@ -52,7 +52,7 @@
/* ioswab[bwlq], __mem_ioswab[bwlq] are defined in mangle-port.h */
diff --git a/target/linux/lantiq/patches-4.19/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch b/target/linux/lantiq/patches-4.19/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
index 37894244e5..81d46c3d1e 100644
--- a/target/linux/lantiq/patches-4.19/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
+++ b/target/linux/lantiq/patches-4.19/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
@@ -23,7 +23,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
-@@ -83,7 +83,14 @@ static void dwc2_set_rk_params(struct dw
+@@ -90,7 +90,14 @@ static void dwc2_set_rk_params(struct dw
GAHBCFG_HBSTLEN_SHIFT;
}
@@ -39,7 +39,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
{
struct dwc2_core_params *p = &hsotg->params;
-@@ -91,12 +98,20 @@ static void dwc2_set_ltq_params(struct d
+@@ -98,12 +105,20 @@ static void dwc2_set_ltq_params(struct d
p->host_rx_fifo_size = 288;
p->host_nperio_tx_fifo_size = 128;
p->host_perio_tx_fifo_size = 96;
@@ -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;
-@@ -140,8 +155,11 @@ const struct of_device_id dwc2_of_match_
+@@ -155,8 +170,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 },
@@ -74,5 +74,5 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+ { .compatible = "lantiq,xrx200-usb", .data = &dwc2_set_ltq_xrx200_params },
+ { .compatible = "lantiq,xrx300-usb", .data = &dwc2_set_ltq_xrx200_params },
{ .compatible = "snps,dwc2" },
- { .compatible = "samsung,s3c6400-hsotg" },
- { .compatible = "amlogic,meson8-usb",
+ { .compatible = "samsung,s3c6400-hsotg",
+ .data = dwc2_set_s3c6400_params },
diff --git a/target/linux/lantiq/patches-4.19/0051-MIPS-lantiq-improve-USB-initialization.patch b/target/linux/lantiq/patches-4.19/0051-MIPS-lantiq-improve-USB-initialization.patch
index 5030bbf3dd..a7bdafd704 100644
--- a/target/linux/lantiq/patches-4.19/0051-MIPS-lantiq-improve-USB-initialization.patch
+++ b/target/linux/lantiq/patches-4.19/0051-MIPS-lantiq-improve-USB-initialization.patch
@@ -41,7 +41,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
/* the pci enable helper */
static int pci_enable(struct clk *clk)
{
-@@ -569,4 +588,5 @@ void __init ltq_soc_init(void)
+@@ -567,4 +586,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-4.19/0101-find_active_root.patch b/target/linux/lantiq/patches-4.19/0101-find_active_root.patch
index 73361c87fa..f48b5b7c65 100644
--- a/target/linux/lantiq/patches-4.19/0101-find_active_root.patch
+++ b/target/linux/lantiq/patches-4.19/0101-find_active_root.patch
@@ -52,9 +52,9 @@
@@ -72,7 +105,9 @@ static int parse_fixed_partitions(struct
return 0;
- parts = kzalloc(nr_parts * sizeof(*parts), GFP_KERNEL);
+ parts = kcalloc(nr_parts, sizeof(*parts), GFP_KERNEL);
- if (!parts)
-+ part_nodes = kzalloc(nr_parts * sizeof(*part_nodes), GFP_KERNEL);
++ part_nodes = kcalloc(nr_parts, sizeof(*part_nodes), GFP_KERNEL);
+
+ if (!parts || !part_nodes)
return -ENOMEM;
diff --git a/target/linux/lantiq/patches-4.19/0152-lantiq-VPE.patch b/target/linux/lantiq/patches-4.19/0152-lantiq-VPE.patch
index b0b5bd3a57..d40dcef509 100644
--- a/target/linux/lantiq/patches-4.19/0152-lantiq-VPE.patch
+++ b/target/linux/lantiq/patches-4.19/0152-lantiq-VPE.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -2327,6 +2327,12 @@ config MIPS_VPE_LOADER
+@@ -2317,6 +2317,12 @@ config MIPS_VPE_LOADER
Includes a loader for loading an elf relocatable object
onto another VPE and running it.
@@ -142,7 +142,7 @@
{
--- a/arch/mips/lantiq/prom.c
+++ b/arch/mips/lantiq/prom.c
-@@ -37,10 +37,14 @@ unsigned long physical_memsize = 0L;
+@@ -36,10 +36,14 @@ unsigned long physical_memsize = 0L;
*/
static struct ltq_soc_info soc_info;
diff --git a/target/linux/lantiq/patches-4.19/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-4.19/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
index ae8efcfdc0..b98abe8b4b 100644
--- a/target/linux/lantiq/patches-4.19/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
+++ b/target/linux/lantiq/patches-4.19/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
@@ -21,7 +21,7 @@
/* bring up all register ranges that we need for basic system control */
void __init ltq_soc_init(void)
{
-@@ -589,4 +603,6 @@ void __init ltq_soc_init(void)
+@@ -587,4 +601,6 @@ void __init ltq_soc_init(void)
clkdev_add_pmu("1e100400.serial", NULL, 1, 0, PMU_ASC0);
}
usb_set_clock();
diff --git a/target/linux/lantiq/patches-4.19/0701-NET-lantiq-etop-of-mido.patch b/target/linux/lantiq/patches-4.19/0701-NET-lantiq-etop-of-mido.patch
index 5dc4b81522..d53d09c162 100644
--- a/target/linux/lantiq/patches-4.19/0701-NET-lantiq-etop-of-mido.patch
+++ b/target/linux/lantiq/patches-4.19/0701-NET-lantiq-etop-of-mido.patch
@@ -8,7 +8,7 @@
#include <asm/checksum.h>
-@@ -567,7 +568,8 @@ static int
+@@ -569,7 +570,8 @@ static int
ltq_etop_mdio_init(struct net_device *dev)
{
struct ltq_etop_priv *priv = netdev_priv(dev);
@@ -18,7 +18,7 @@
priv->mii_bus = mdiobus_alloc();
if (!priv->mii_bus) {
-@@ -587,7 +589,15 @@ ltq_etop_mdio_init(struct net_device *de
+@@ -589,7 +591,15 @@ ltq_etop_mdio_init(struct net_device *de
priv->mii_bus->name = "ltq_mii";
snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
priv->pdev->name, priv->pdev->id);
diff --git a/target/linux/lantiq/xrx200/config-4.19 b/target/linux/lantiq/xrx200/config-4.19
index 7b15d4283b..0c14f3dadc 100644
--- a/target/linux/lantiq/xrx200/config-4.19
+++ b/target/linux/lantiq/xrx200/config-4.19
@@ -16,7 +16,6 @@ CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_NULL2=y
CONFIG_EXTRA_FIRMWARE="lantiq/xrx200_phy11g_a14.bin lantiq/xrx200_phy11g_a22.bin lantiq/xrx200_phy22f_a14.bin lantiq/xrx200_phy22f_a22.bin"
CONFIG_EXTRA_FIRMWARE_DIR="firmware"
-CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_HWMON=y
CONFIG_ICPLUS_PHY=y
CONFIG_IFX_VPE_EXT=y
@@ -32,6 +31,7 @@ CONFIG_LZO_DECOMPRESS=y
CONFIG_MIPS_MT=y
# CONFIG_MIPS_MT_FPAFF is not set
CONFIG_MIPS_MT_SMP=y
+CONFIG_MIPS_NR_CPU_NR_MAP=2
CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
CONFIG_MIPS_VPE_APSP_API=y
CONFIG_MIPS_VPE_APSP_API_MT=y
@@ -52,11 +52,10 @@ CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_NET_FLOW_LIMIT=y
CONFIG_NLS=y
CONFIG_NR_CPUS=2
-CONFIG_OF_ADDRESS_PCI=y
-CONFIG_OF_PCI=y
-CONFIG_OF_PCI_IRQ=y
CONFIG_PADATA=y
CONFIG_PCI=y
+# CONFIG_PCIEAER is not set
+CONFIG_PCIEPORTBUS=y
CONFIG_PCIE_LANTIQ=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_LANTIQ=y
@@ -75,6 +74,7 @@ CONFIG_RTL8366S_PHY=y
CONFIG_RTL8367B_PHY=y
CONFIG_RTL8367_PHY=y
CONFIG_SENSORS_LTQ_CPUTEMP=y
+CONFIG_SGL_ALLOC=y
CONFIG_SMP=y
CONFIG_SMP_UP=y
CONFIG_SWCONFIG_LEDS=y