lantiq: refresh 6.12 kernel patches
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>
This commit is contained in:
parent
925f8492dd
commit
dbb9c55611
7 changed files with 34 additions and 42 deletions
|
@ -153,27 +153,21 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||||
+ ifx_pcie_rc_class_early_fixup);
|
+ ifx_pcie_rc_class_early_fixup);
|
||||||
--- a/arch/mips/pci/fixup-lantiq.c
|
--- a/arch/mips/pci/fixup-lantiq.c
|
||||||
+++ b/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/of_pci.h>
|
||||||
|
#include <linux/pci.h>
|
||||||
+#include <linux/pci.h>
|
+#include <linux/pci.h>
|
||||||
+#include "ifxmips_pci_common.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)
|
int pcibios_plat_dev_init(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
+#ifdef CONFIG_PCIE_LANTIQ
|
+#ifdef CONFIG_PCIE_LANTIQ
|
||||||
+ if (pci_find_capability(dev, PCI_CAP_ID_EXP))
|
+ if (pci_find_capability(dev, PCI_CAP_ID_EXP))
|
||||||
+ ifx_pcie_bios_plat_dev_init(dev);
|
+ ifx_pcie_bios_plat_dev_init(dev);
|
||||||
+#endif
|
+#endif
|
||||||
+
|
return 0;
|
||||||
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
|
|
||||||
|
|
||||||
int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
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 */
|
+#endif /* IFXMIPS_PCIE_VR9_H */
|
||||||
--- a/arch/mips/pci/pci-legacy.c
|
--- a/arch/mips/pci/pci-legacy.c
|
||||||
+++ b/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 pcibios_plat_setup(str);
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
@ -5514,7 +5508,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||||
+
|
+
|
||||||
--- a/drivers/pci/pcie/Kconfig
|
--- a/drivers/pci/pcie/Kconfig
|
||||||
+++ b/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
|
config PCIE_ECRC
|
||||||
bool "PCI Express ECRC settings control"
|
bool "PCI Express ECRC settings control"
|
||||||
depends on PCIEAER
|
depends on PCIEAER
|
||||||
|
@ -5524,7 +5518,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||||
(transaction layer end-to-end CRC checking).
|
(transaction layer end-to-end CRC checking).
|
||||||
--- a/include/linux/pci.h
|
--- a/include/linux/pci.h
|
||||||
+++ b/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);
|
void *userdata);
|
||||||
int pci_cfg_space_size(struct pci_dev *dev);
|
int pci_cfg_space_size(struct pci_dev *dev);
|
||||||
unsigned char pci_bus_max_busnr(struct pci_bus *bus);
|
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);
|
unsigned long type);
|
||||||
--- a/include/linux/pci_ids.h
|
--- a/include/linux/pci_ids.h
|
||||||
+++ b/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_IOC3 0x0003
|
||||||
#define PCI_DEVICE_ID_SGI_LITHIUM 0x1002
|
#define PCI_DEVICE_ID_SGI_LITHIUM 0x1002
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||||
|
|
||||||
--- a/drivers/mtd/nand/raw/xway_nand.c
|
--- a/drivers/mtd/nand/raw/xway_nand.c
|
||||||
+++ b/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_CSMUX (1 << 1)
|
||||||
#define NAND_CON_NANDM 1
|
#define NAND_CON_NANDM 1
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||||
struct xway_nand_data {
|
struct xway_nand_data {
|
||||||
struct nand_controller controller;
|
struct nand_controller controller;
|
||||||
struct nand_chip chip;
|
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:
|
case -1:
|
||||||
ltq_ebu_w32_mask(NAND_CON_CE, 0, EBU_NAND_CON);
|
ltq_ebu_w32_mask(NAND_CON_CE, 0, EBU_NAND_CON);
|
||||||
ltq_ebu_w32_mask(NAND_CON_NANDM, 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_NANDM, EBU_NAND_CON);
|
||||||
ltq_ebu_w32_mask(0, NAND_CON_CE, EBU_NAND_CON);
|
ltq_ebu_w32_mask(0, NAND_CON_CE, EBU_NAND_CON);
|
||||||
break;
|
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);
|
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)
|
if (cmd == NAND_CMD_NONE)
|
||||||
return;
|
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)
|
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)
|
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;
|
int err;
|
||||||
u32 cs;
|
u32 cs;
|
||||||
u32 cs_flag = 0;
|
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) */
|
/* Allocate memory for the device structure (and zero it) */
|
||||||
data = devm_kzalloc(&pdev->dev, sizeof(struct xway_nand_data),
|
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)
|
if (!err && cs == 1)
|
||||||
cs_flag = NAND_CON_IN_CS1 | NAND_CON_OUT_CS1;
|
cs_flag = NAND_CON_IN_CS1 | NAND_CON_OUT_CS1;
|
||||||
|
|
||||||
|
|
|
@ -700,7 +700,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
+ int max;
|
+ int max;
|
||||||
|
|
||||||
dev->mtu = new_mtu;
|
WRITE_ONCE(dev->mtu, new_mtu);
|
||||||
|
|
||||||
+ max = ETH_HLEN + VLAN_HLEN + new_mtu + ETH_FCS_LEN;
|
+ 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);
|
err = register_netdev(dev);
|
||||||
if (err)
|
if (err)
|
||||||
@@ -735,31 +968,22 @@ ltq_etop_remove(struct platform_device *
|
@@ -733,31 +966,22 @@ static void ltq_etop_remove(struct platf
|
||||||
return 0;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+static const struct of_device_id ltq_etop_match[] = {
|
+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 = {
|
static struct platform_driver ltq_mii_driver = {
|
||||||
+ .probe = ltq_etop_probe,
|
+ .probe = ltq_etop_probe,
|
||||||
.remove = ltq_etop_remove,
|
.remove_new = ltq_etop_remove,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "ltq_etop",
|
.name = "ltq_etop",
|
||||||
+ .of_match_table = ltq_etop_match,
|
+ .of_match_table = ltq_etop_match,
|
||||||
|
|
|
@ -18,7 +18,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||||
|
|
||||||
--- a/drivers/i2c/busses/Kconfig
|
--- a/drivers/i2c/busses/Kconfig
|
||||||
+++ b/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
|
This driver can also be built as a module. If so, the module will be
|
||||||
called i2c-microchip-core.
|
called i2c-microchip-core.
|
||||||
|
|
||||||
|
@ -37,9 +37,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||||
depends on PPC
|
depends on PPC
|
||||||
--- a/drivers/i2c/busses/Makefile
|
--- a/drivers/i2c/busses/Makefile
|
||||||
+++ b/drivers/i2c/busses/Makefile
|
+++ b/drivers/i2c/busses/Makefile
|
||||||
@@ -76,6 +76,7 @@ obj-$(CONFIG_I2C_IMX_LPI2C) += i2c-imx-l
|
@@ -78,6 +78,7 @@ obj-$(CONFIG_I2C_IOP3XX) += i2c-iop3xx.o
|
||||||
obj-$(CONFIG_I2C_IOP3XX) += i2c-iop3xx.o
|
|
||||||
obj-$(CONFIG_I2C_JZ4780) += i2c-jz4780.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_KEMPLD) += i2c-kempld.o
|
||||||
+obj-$(CONFIG_I2C_LANTIQ) += i2c-lantiq.o
|
+obj-$(CONFIG_I2C_LANTIQ) += i2c-lantiq.o
|
||||||
obj-$(CONFIG_I2C_LPC2K) += i2c-lpc2k.o
|
obj-$(CONFIG_I2C_LPC2K) += i2c-lpc2k.o
|
||||||
|
|
|
@ -15,7 +15,7 @@ Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
|
||||||
|
|
||||||
--- a/arch/mips/Kconfig
|
--- a/arch/mips/Kconfig
|
||||||
+++ b/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
|
Includes a loader for loading an elf relocatable object
|
||||||
onto another VPE and running it.
|
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 read_c0_tcstatus() __read_32bit_c0_register($2, 1)
|
||||||
#define write_c0_tcstatus(val) __write_32bit_c0_register($2, 1, val)
|
#define write_c0_tcstatus(val) __write_32bit_c0_register($2, 1, val)
|
||||||
|
|
||||||
@@ -377,6 +380,8 @@ do { \
|
@@ -429,6 +432,8 @@ do { \
|
||||||
#define write_vpe_c0_vpeconf0(val) mttc0(1, 2, val)
|
#define write_vpe_c0_vpeconf0(val) mttc0($1, 2, val)
|
||||||
#define read_vpe_c0_vpeconf1() mftc0(1, 3)
|
#define read_vpe_c0_vpeconf1() mftc0($1, 3)
|
||||||
#define write_vpe_c0_vpeconf1(val) mttc0(1, 3, val)
|
#define write_vpe_c0_vpeconf1(val) mttc0($1, 3, val)
|
||||||
+#define read_vpe_c0_vpeopt() mftc0(1, 7)
|
+#define read_vpe_c0_vpeopt() mftc0($1, 7)
|
||||||
+#define write_vpe_c0_vpeopt(val) mttc0(1, 7, val)
|
+#define write_vpe_c0_vpeopt(val) mttc0($1, 7, val)
|
||||||
#define read_vpe_c0_count() mftc0(9, 0)
|
#define read_vpe_c0_count() mftc0($9, 0)
|
||||||
#define write_vpe_c0_count(val) mttc0(9, 0, val)
|
#define write_vpe_c0_count(val) mttc0($9, 0, val)
|
||||||
#define read_vpe_c0_status() mftc0(12, 0)
|
#define read_vpe_c0_status() mftc0($12, 0)
|
||||||
--- a/arch/mips/include/asm/vpe.h
|
--- a/arch/mips/include/asm/vpe.h
|
||||||
+++ b/arch/mips/include/asm/vpe.h
|
+++ b/arch/mips/include/asm/vpe.h
|
||||||
@@ -119,4 +119,13 @@ void cleanup_tc(struct tc *tc);
|
@@ -119,4 +119,13 @@ void cleanup_tc(struct tc *tc);
|
||||||
|
|
|
@ -85,7 +85,7 @@ Signed-off-by: Maikel Bloemendal <openwrt@maikelenyvonne.nl>
|
||||||
|
|
||||||
ltq_mtd = devm_kzalloc(&pdev->dev, sizeof(struct ltq_mtd), GFP_KERNEL);
|
ltq_mtd = devm_kzalloc(&pdev->dev, sizeof(struct ltq_mtd), GFP_KERNEL);
|
||||||
if (!ltq_mtd)
|
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);
|
platform_set_drvdata(pdev, ltq_mtd);
|
||||||
|
|
||||||
|
@ -211,8 +211,7 @@ Signed-off-by: Maikel Bloemendal <openwrt@maikelenyvonne.nl>
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
-static int
|
-static void ltq_mtd_remove(struct platform_device *pdev)
|
||||||
-ltq_mtd_remove(struct platform_device *pdev)
|
|
||||||
-{
|
-{
|
||||||
- struct ltq_mtd *ltq_mtd = platform_get_drvdata(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);
|
- mtd_device_unregister(ltq_mtd->mtd);
|
||||||
- map_destroy(ltq_mtd->mtd);
|
- map_destroy(ltq_mtd->mtd);
|
||||||
- }
|
- }
|
||||||
- return 0;
|
|
||||||
-}
|
-}
|
||||||
-
|
-
|
||||||
static const struct of_device_id ltq_mtd_match[] = {
|
static const struct of_device_id ltq_mtd_match[] = {
|
||||||
|
|
|
@ -21,7 +21,7 @@ Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
|
||||||
|
|
||||||
--- a/drivers/mtd/nand/raw/xway_nand.c
|
--- a/drivers/mtd/nand/raw/xway_nand.c
|
||||||
+++ b/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)
|
static int xway_dev_ready(struct nand_chip *chip)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue