]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
lantiq: refresh 6.12 kernel patches
authorShiji Yang <yangshiji66@outlook.com>
Thu, 8 May 2025 15:11:06 +0000 (23:11 +0800)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 18 Jul 2025 11:31:00 +0000 (12:31 +0100)
Manually rebased:
001-MIPS-lantiq-add-pcie-driver.patch
028-NET-lantiq-various-etop-fixes.patch
152-lantiq-VPE.patch
160-owrt-lantiq-multiple-flash.patch

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
target/linux/lantiq/patches-6.12/001-MIPS-lantiq-add-pcie-driver.patch
target/linux/lantiq/patches-6.12/018-MTD-nand-lots-of-xrx200-fixes.patch
target/linux/lantiq/patches-6.12/028-NET-lantiq-various-etop-fixes.patch
target/linux/lantiq/patches-6.12/031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch
target/linux/lantiq/patches-6.12/152-lantiq-VPE.patch
target/linux/lantiq/patches-6.12/160-owrt-lantiq-multiple-flash.patch
target/linux/lantiq/patches-6.12/400-mtd-rawnand-xway-don-t-yield-while-holding-spinlock.patch

index 3dd996bccc8ef2819a0a81cae6c279108d32e805..a125b6bfb3328decd4ab00aef5b0aacad7ca85c4 100644 (file)
@@ -153,27 +153,21 @@ 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,19 @@
+@@ -6,13 +6,24 @@
  
- #include <linux/of_irq.h>
  #include <linux/of_pci.h>
+ #include <linux/pci.h>
 +#include <linux/pci.h>
 +#include "ifxmips_pci_common.h"
  
- int (*ltq_pci_plat_arch_init)(struct pci_dev *dev) = NULL;
- int (*ltq_pci_plat_dev_init)(struct pci_dev *dev) = NULL;
  int pcibios_plat_dev_init(struct pci_dev *dev)
  {
 +#ifdef CONFIG_PCIE_LANTIQ
 +      if (pci_find_capability(dev, PCI_CAP_ID_EXP))
 +              ifx_pcie_bios_plat_dev_init(dev);
 +#endif
-+
-       if (ltq_pci_plat_arch_init)
-               return ltq_pci_plat_arch_init(dev);
-@@ -23,5 +30,10 @@ int pcibios_plat_dev_init(struct pci_dev
+       return 0;
+ }
  
  int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
  {
@@ -4162,7 +4156,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +#endif /* IFXMIPS_PCIE_VR9_H */
 --- a/arch/mips/pci/pci-legacy.c
 +++ b/arch/mips/pci/pci-legacy.c
-@@ -304,3 +304,30 @@ char *__init pcibios_setup(char *str)
+@@ -312,3 +312,30 @@ char *__init pcibios_setup(char *str)
                return pcibios_plat_setup(str);
        return str;
  }
@@ -5514,7 +5508,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +
 --- a/drivers/pci/pcie/Kconfig
 +++ b/drivers/pci/pcie/Kconfig
-@@ -55,6 +55,7 @@ config PCIEAER_INJECT
+@@ -64,6 +64,7 @@ config PCIEAER_CXL
  config PCIE_ECRC
        bool "PCI Express ECRC settings control"
        depends on PCIEAER
@@ -5524,7 +5518,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
-@@ -1602,6 +1602,8 @@ void pci_walk_bus_locked(struct pci_bus
+@@ -1629,6 +1629,8 @@ void pci_walk_bus_locked(struct pci_bus
                         void *userdata);
  int pci_cfg_space_size(struct pci_dev *dev);
  unsigned char pci_bus_max_busnr(struct pci_bus *bus);
@@ -5535,7 +5529,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
                                         unsigned long type);
 --- a/include/linux/pci_ids.h
 +++ b/include/linux/pci_ids.h
-@@ -1110,6 +1110,12 @@
+@@ -1111,6 +1111,12 @@
  #define PCI_DEVICE_ID_SGI_IOC3                0x0003
  #define PCI_DEVICE_ID_SGI_LITHIUM     0x1002
  
index 90af62364a4eea353c400ffbd37afec8bc5dd1ac..f420d8cde5f7e98e6bf8d268ff54e8192a8944ee 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 
 --- a/drivers/mtd/nand/raw/xway_nand.c
 +++ b/drivers/mtd/nand/raw/xway_nand.c
-@@ -62,6 +62,24 @@
+@@ -61,6 +61,24 @@
  #define NAND_CON_CSMUX                (1 << 1)
  #define NAND_CON_NANDM                1
  
@@ -35,7 +35,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  struct xway_nand_data {
        struct nand_controller  controller;
        struct nand_chip        chip;
-@@ -93,10 +111,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;
-@@ -109,6 +139,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;
  
-@@ -119,6 +154,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)
-@@ -170,6 +223,7 @@ static int xway_nand_probe(struct platfo
+@@ -169,6 +222,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),
-@@ -205,6 +259,15 @@ static int xway_nand_probe(struct platfo
+@@ -204,6 +258,15 @@ static int xway_nand_probe(struct platfo
        if (!err && cs == 1)
                cs_flag = NAND_CON_IN_CS1 | NAND_CON_OUT_CS1;
  
index c761757c1c9783b4b4bbf485b379b19b11d7b8b6..fff60cefafed41e37d7fb8baa7af84f16dccecde 100644 (file)
@@ -700,7 +700,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
        unsigned long flags;
 +      int max;
  
-       dev->mtu = new_mtu;
+       WRITE_ONCE(dev->mtu, new_mtu);
  
 +      max = ETH_HLEN + VLAN_HLEN + new_mtu + ETH_FCS_LEN;
 +
@@ -848,8 +848,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  
        err = register_netdev(dev);
        if (err)
-@@ -735,31 +968,22 @@ ltq_etop_remove(struct platform_device *
-       return 0;
+@@ -733,31 +966,22 @@ static void ltq_etop_remove(struct platf
+       }
  }
  
 +static const struct of_device_id ltq_etop_match[] = {
@@ -860,7 +860,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +
  static struct platform_driver ltq_mii_driver = {
 +      .probe = ltq_etop_probe,
-       .remove = ltq_etop_remove,
+       .remove_new = ltq_etop_remove,
        .driver = {
                .name = "ltq_etop",
 +              .of_match_table = ltq_etop_match,
index 73eb59f1664d219ea52baa4ed6e47d1004deab31..bb78a470e1c4863f37502d24c80ab6ec372c0b8e 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 
 --- a/drivers/i2c/busses/Kconfig
 +++ b/drivers/i2c/busses/Kconfig
-@@ -819,6 +819,16 @@ config I2C_MICROCHIP_CORE
+@@ -857,6 +857,16 @@ config I2C_MICROCHIP_CORE
          This driver can also be built as a module. If so, the module will be
          called i2c-microchip-core.
  
@@ -37,9 +37,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
        depends on PPC
 --- a/drivers/i2c/busses/Makefile
 +++ b/drivers/i2c/busses/Makefile
-@@ -76,6 +76,7 @@ obj-$(CONFIG_I2C_IMX_LPI2C)  += i2c-imx-l
- obj-$(CONFIG_I2C_IOP3XX)      += i2c-iop3xx.o
+@@ -78,6 +78,7 @@ obj-$(CONFIG_I2C_IOP3XX)     += i2c-iop3xx.o
  obj-$(CONFIG_I2C_JZ4780)      += i2c-jz4780.o
+ obj-$(CONFIG_I2C_KEBA)                += i2c-keba.o
  obj-$(CONFIG_I2C_KEMPLD)      += i2c-kempld.o
 +obj-$(CONFIG_I2C_LANTIQ)      += i2c-lantiq.o
  obj-$(CONFIG_I2C_LPC2K)               += i2c-lpc2k.o
index 00e075dee005aad75bd2cd6928b3fbe533e151f8..7e6d843dc1cbc0216fa41f06ea7b3fabc99229d9 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
 
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -2259,6 +2259,12 @@ config MIPS_VPE_LOADER
+@@ -2251,6 +2251,12 @@ config MIPS_VPE_LOADER
          Includes a loader for loading an elf relocatable object
          onto another VPE and running it.
  
@@ -40,15 +40,15 @@ Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
  #define read_c0_tcstatus()            __read_32bit_c0_register($2, 1)
  #define write_c0_tcstatus(val)                __write_32bit_c0_register($2, 1, val)
  
-@@ -377,6 +380,8 @@ do {                                                                       \
- #define write_vpe_c0_vpeconf0(val)    mttc0(1, 2, val)
- #define read_vpe_c0_vpeconf1()                mftc0(1, 3)
- #define write_vpe_c0_vpeconf1(val)    mttc0(1, 3, val)
-+#define read_vpe_c0_vpeopt()          mftc0(1, 7)
-+#define write_vpe_c0_vpeopt(val)      mttc0(1, 7, val)
- #define read_vpe_c0_count()           mftc0(9, 0)
- #define write_vpe_c0_count(val)               mttc0(9, 0, val)
- #define read_vpe_c0_status()          mftc0(12, 0)
+@@ -429,6 +432,8 @@ do {                                                                       \
+ #define write_vpe_c0_vpeconf0(val)    mttc0($1, 2, val)
+ #define read_vpe_c0_vpeconf1()                mftc0($1, 3)
+ #define write_vpe_c0_vpeconf1(val)    mttc0($1, 3, val)
++#define read_vpe_c0_vpeopt()          mftc0($1, 7)
++#define write_vpe_c0_vpeopt(val)      mttc0($1, 7, val)
+ #define read_vpe_c0_count()           mftc0($9, 0)
+ #define write_vpe_c0_count(val)               mttc0($9, 0, val)
+ #define read_vpe_c0_status()          mftc0($12, 0)
 --- a/arch/mips/include/asm/vpe.h
 +++ b/arch/mips/include/asm/vpe.h
 @@ -119,4 +119,13 @@ void cleanup_tc(struct tc *tc);
index 1556a32aa601336048ea2efd4761f984c9222891..0f427df8675cd8dd90b8ea947b1386dcc9bf4f1a 100644 (file)
@@ -85,7 +85,7 @@ Signed-off-by: Maikel Bloemendal <openwrt@maikelenyvonne.nl>
  
        ltq_mtd = devm_kzalloc(&pdev->dev, sizeof(struct ltq_mtd), GFP_KERNEL);
        if (!ltq_mtd)
-@@ -118,70 +154,89 @@ ltq_mtd_probe(struct platform_device *pd
+@@ -118,68 +154,89 @@ ltq_mtd_probe(struct platform_device *pd
  
        platform_set_drvdata(pdev, ltq_mtd);
  
@@ -211,8 +211,7 @@ Signed-off-by: Maikel Bloemendal <openwrt@maikelenyvonne.nl>
        return err;
  }
  
--static int
--ltq_mtd_remove(struct platform_device *pdev)
+-static void ltq_mtd_remove(struct platform_device *pdev)
 -{
 -      struct ltq_mtd *ltq_mtd = platform_get_drvdata(pdev);
 -
@@ -220,7 +219,6 @@ Signed-off-by: Maikel Bloemendal <openwrt@maikelenyvonne.nl>
 -              mtd_device_unregister(ltq_mtd->mtd);
 -              map_destroy(ltq_mtd->mtd);
 -      }
--      return 0;
 -}
 -
  static const struct of_device_id ltq_mtd_match[] = {
index 663b0dbfb37f30dc15325807e4f7dbb8557188cb..edf0626860922641fd33d1a324ff44a4e57b7da1 100644 (file)
@@ -21,7 +21,7 @@ Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
 
 --- a/drivers/mtd/nand/raw/xway_nand.c
 +++ b/drivers/mtd/nand/raw/xway_nand.c
-@@ -176,7 +176,13 @@ static void xway_cmd_ctrl(struct nand_ch
+@@ -175,7 +175,13 @@ static void xway_cmd_ctrl(struct nand_ch
  
  static int xway_dev_ready(struct nand_chip *chip)
  {