From: Adrian Schmutzler Date: Fri, 3 Apr 2020 13:28:10 +0000 (+0200) Subject: bcm63xx: refresh patches for kernel 5.4 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=04c07e05a119d860b4d3b3191ff78d699aa5c209;p=openwrt%2Fstaging%2Fstintel.git bcm63xx: refresh patches for kernel 5.4 Refresh patches to make them apply to kernel 5.4. The removed patches have been merged upstream. Signed-off-by: Adrian Schmutzler --- diff --git a/target/linux/bcm63xx/patches-5.4/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch b/target/linux/bcm63xx/patches-5.4/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch index 64ea4731a1..ec90909d13 100644 --- a/target/linux/bcm63xx/patches-5.4/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch +++ b/target/linux/bcm63xx/patches-5.4/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch @@ -18,7 +18,7 @@ Signed-off-by: Florian Fainelli +++ b/arch/mips/bcm63xx/Kconfig @@ -7,10 +7,17 @@ config BCM63XX_CPU_3368 select SYS_HAS_CPU_BMIPS4350 - select HW_HAS_PCI + select HAVE_PCI +config BCM63XX_OHCI + bool @@ -29,7 +29,7 @@ Signed-off-by: Florian Fainelli config BCM63XX_CPU_6328 bool "support 6328 CPU" select SYS_HAS_CPU_BMIPS4350 - select HW_HAS_PCI + select HAVE_PCI + select BCM63XX_OHCI config BCM63XX_CPU_6338 @@ -37,25 +37,25 @@ Signed-off-by: Florian Fainelli @@ -25,21 +32,25 @@ config BCM63XX_CPU_6348 bool "support 6348 CPU" select SYS_HAS_CPU_BMIPS32_3300 - select HW_HAS_PCI + select HAVE_PCI + select BCM63XX_OHCI config BCM63XX_CPU_6358 bool "support 6358 CPU" select SYS_HAS_CPU_BMIPS4350 - select HW_HAS_PCI + select HAVE_PCI + select BCM63XX_OHCI config BCM63XX_CPU_6362 bool "support 6362 CPU" select SYS_HAS_CPU_BMIPS4350 - select HW_HAS_PCI + select HAVE_PCI + select BCM63XX_OHCI config BCM63XX_CPU_6368 bool "support 6368 CPU" select SYS_HAS_CPU_BMIPS4350 - select HW_HAS_PCI + select HAVE_PCI + select BCM63XX_OHCI endmenu diff --git a/target/linux/bcm63xx/patches-5.4/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch b/target/linux/bcm63xx/patches-5.4/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch index f7311a8f83..fed826c4cd 100644 --- a/target/linux/bcm63xx/patches-5.4/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch +++ b/target/linux/bcm63xx/patches-5.4/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch @@ -32,7 +32,7 @@ Signed-off-by: Florian Fainelli config BCM63XX_CPU_6328 bool "support 6328 CPU" select SYS_HAS_CPU_BMIPS4350 - select HW_HAS_PCI + select HAVE_PCI select BCM63XX_OHCI + select BCM63XX_EHCI @@ -40,21 +40,21 @@ Signed-off-by: Florian Fainelli bool "support 6338 CPU" @@ -39,18 +46,21 @@ config BCM63XX_CPU_6358 select SYS_HAS_CPU_BMIPS4350 - select HW_HAS_PCI + select HAVE_PCI select BCM63XX_OHCI + select BCM63XX_EHCI config BCM63XX_CPU_6362 bool "support 6362 CPU" select SYS_HAS_CPU_BMIPS4350 - select HW_HAS_PCI + select HAVE_PCI select BCM63XX_OHCI + select BCM63XX_EHCI config BCM63XX_CPU_6368 bool "support 6368 CPU" select SYS_HAS_CPU_BMIPS4350 - select HW_HAS_PCI + select HAVE_PCI select BCM63XX_OHCI + select BCM63XX_EHCI endmenu diff --git a/target/linux/bcm63xx/patches-5.4/121-mtd-bcm63xxpart-move-imagetag-parsing-to-its-own-par.patch b/target/linux/bcm63xx/patches-5.4/121-mtd-bcm63xxpart-move-imagetag-parsing-to-its-own-par.patch deleted file mode 100644 index 6fd5cbb9e5..0000000000 --- a/target/linux/bcm63xx/patches-5.4/121-mtd-bcm63xxpart-move-imagetag-parsing-to-its-own-par.patch +++ /dev/null @@ -1,482 +0,0 @@ -From a2b8c7f648e168573905818dbb4cb90ca3957c65 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 28 Jun 2017 18:29:43 +0200 -Subject: [PATCH] mtd: bcm63xxpart: move imagetag parsing to its own parser - -Move the bcm963xx Image Tag parsing into its own partition parser. This -Allows reusing the parser with different full flash parsers. - -While moving it, rename it to bcm963* to better reflect it isn't chip -but board specific. - -Signed-off-by: Jonas Gorski ---- -I tried to keep the code as-is, to keep the changes as small as -possible. - -One side effect is that the partitions get renumbered, which means any -root=/dev/mtdblock* will now point to the wrong mtd device. But since -bcm963xx boards will require these hardcoded in the kernel commandline -anyway this should b a non issue, as it can be easily updated. - -There is no such thing in the mips/bcm63xx defconfig, so nothing to update -there. - - drivers/mtd/Kconfig | 1 + - drivers/mtd/bcm63xxpart.c | 155 ++---------------------- - drivers/mtd/parsers/Kconfig | 11 ++ - drivers/mtd/parsers/Makefile | 1 + - drivers/mtd/parsers/parser_imagetag.c | 214 ++++++++++++++++++++++++++++++++++ - 5 files changed, 235 insertions(+), 147 deletions(-) - create mode 100644 drivers/mtd/parsers/parser_imagetag.c - ---- a/drivers/mtd/Kconfig -+++ b/drivers/mtd/Kconfig -@@ -162,6 +162,7 @@ config MTD_BCM63XX_PARTS - tristate "BCM63XX CFE partitioning support" - depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST - select CRC32 -+ select MTD_PARSER_IMAGETAG - help - This provides partions parsing for BCM63xx devices with CFE - bootloaders. ---- a/drivers/mtd/bcm63xxpart.c -+++ b/drivers/mtd/bcm63xxpart.c -@@ -93,51 +93,19 @@ static int bcm63xx_read_nvram(struct mtd - return 0; - } - --static int bcm63xx_read_image_tag(struct mtd_info *master, const char *name, -- loff_t tag_offset, struct bcm_tag *buf) --{ -- int ret; -- size_t retlen; -- u32 computed_crc; -- -- ret = mtd_read(master, tag_offset, sizeof(*buf), &retlen, (void *)buf); -- if (ret) -- return ret; -- -- if (retlen != sizeof(*buf)) -- return -EIO; -- -- computed_crc = crc32_le(IMAGETAG_CRC_START, (u8 *)buf, -- offsetof(struct bcm_tag, header_crc)); -- if (computed_crc == buf->header_crc) { -- STR_NULL_TERMINATE(buf->board_id); -- STR_NULL_TERMINATE(buf->tag_version); -- -- pr_info("%s: CFE image tag found at 0x%llx with version %s, board type %s\n", -- name, tag_offset, buf->tag_version, buf->board_id); -- -- return 0; -- } -- -- pr_warn("%s: CFE image tag at 0x%llx CRC invalid (expected %08x, actual %08x)\n", -- name, tag_offset, buf->header_crc, computed_crc); -- return 1; --} -+static const char * const bcm63xx_cfe_part_types[] = { -+ "bcm963xx-imagetag", -+ NULL, -+}; - - static int bcm63xx_parse_cfe_nor_partitions(struct mtd_info *master, - const struct mtd_partition **pparts, struct bcm963xx_nvram *nvram) - { -- /* CFE, NVRAM and global Linux are always present */ -- int nrparts = 3, curpart = 0; -- struct bcm_tag *buf = NULL; - struct mtd_partition *parts; -- int ret; -- unsigned int rootfsaddr, kerneladdr, spareaddr; -- unsigned int rootfslen, kernellen, sparelen, totallen; -+ int nrparts = 3, curpart = 0; - unsigned int cfelen, nvramlen; - unsigned int cfe_erasesize; - int i; -- bool rootfs_first = false; - - cfe_erasesize = max_t(uint32_t, master->erasesize, - BCM963XX_CFE_BLOCK_SIZE); -@@ -146,83 +114,9 @@ static int bcm63xx_parse_cfe_nor_partiti - nvramlen = nvram->psi_size * SZ_1K; - nvramlen = roundup(nvramlen, cfe_erasesize); - -- buf = vmalloc(sizeof(struct bcm_tag)); -- if (!buf) -- return -ENOMEM; -- -- /* Get the tag */ -- ret = bcm63xx_read_image_tag(master, "rootfs", cfelen, buf); -- if (!ret) { -- STR_NULL_TERMINATE(buf->flash_image_start); -- if (kstrtouint(buf->flash_image_start, 10, &rootfsaddr) || -- rootfsaddr < BCM963XX_EXTENDED_SIZE) { -- pr_err("invalid rootfs address: %*ph\n", -- (int)sizeof(buf->flash_image_start), -- buf->flash_image_start); -- goto invalid_tag; -- } -- -- STR_NULL_TERMINATE(buf->kernel_address); -- if (kstrtouint(buf->kernel_address, 10, &kerneladdr) || -- kerneladdr < BCM963XX_EXTENDED_SIZE) { -- pr_err("invalid kernel address: %*ph\n", -- (int)sizeof(buf->kernel_address), -- buf->kernel_address); -- goto invalid_tag; -- } -- -- STR_NULL_TERMINATE(buf->kernel_length); -- if (kstrtouint(buf->kernel_length, 10, &kernellen)) { -- pr_err("invalid kernel length: %*ph\n", -- (int)sizeof(buf->kernel_length), -- buf->kernel_length); -- goto invalid_tag; -- } -- -- STR_NULL_TERMINATE(buf->total_length); -- if (kstrtouint(buf->total_length, 10, &totallen)) { -- pr_err("invalid total length: %*ph\n", -- (int)sizeof(buf->total_length), -- buf->total_length); -- goto invalid_tag; -- } -- -- kerneladdr = kerneladdr - BCM963XX_EXTENDED_SIZE; -- rootfsaddr = rootfsaddr - BCM963XX_EXTENDED_SIZE; -- spareaddr = roundup(totallen, master->erasesize) + cfelen; -- -- if (rootfsaddr < kerneladdr) { -- /* default Broadcom layout */ -- rootfslen = kerneladdr - rootfsaddr; -- rootfs_first = true; -- } else { -- /* OpenWrt layout */ -- rootfsaddr = kerneladdr + kernellen; -- rootfslen = spareaddr - rootfsaddr; -- } -- } else if (ret > 0) { --invalid_tag: -- kernellen = 0; -- rootfslen = 0; -- rootfsaddr = 0; -- spareaddr = cfelen; -- } else { -- goto out; -- } -- sparelen = master->size - spareaddr - nvramlen; -- -- /* Determine number of partitions */ -- if (rootfslen > 0) -- nrparts++; -- -- if (kernellen > 0) -- nrparts++; -- - parts = kzalloc(sizeof(*parts) * nrparts + 10 * nrparts, GFP_KERNEL); -- if (!parts) { -- ret = -ENOMEM; -- goto out; -- } -+ if (!parts) -+ return -ENOMEM; - - /* Start building partition list */ - parts[curpart].name = "CFE"; -@@ -230,30 +124,6 @@ invalid_tag: - parts[curpart].size = cfelen; - curpart++; - -- if (kernellen > 0) { -- int kernelpart = curpart; -- -- if (rootfslen > 0 && rootfs_first) -- kernelpart++; -- parts[kernelpart].name = "kernel"; -- parts[kernelpart].offset = kerneladdr; -- parts[kernelpart].size = kernellen; -- curpart++; -- } -- -- if (rootfslen > 0) { -- int rootfspart = curpart; -- -- if (kernellen > 0 && rootfs_first) -- rootfspart--; -- parts[rootfspart].name = "rootfs"; -- parts[rootfspart].offset = rootfsaddr; -- parts[rootfspart].size = rootfslen; -- if (sparelen > 0 && !rootfs_first) -- parts[rootfspart].size += sparelen; -- curpart++; -- } -- - parts[curpart].name = "nvram"; - parts[curpart].offset = master->size - nvramlen; - parts[curpart].size = nvramlen; -@@ -263,22 +133,13 @@ invalid_tag: - parts[curpart].name = "linux"; - parts[curpart].offset = cfelen; - parts[curpart].size = master->size - cfelen - nvramlen; -+ parts[curpart].types = bcm63xx_cfe_part_types; - - for (i = 0; i < nrparts; i++) - pr_info("Partition %d is %s offset %llx and length %llx\n", i, - parts[i].name, parts[i].offset, parts[i].size); - -- pr_info("Spare partition is offset %x and length %x\n", spareaddr, -- sparelen); -- - *pparts = parts; -- ret = 0; -- --out: -- vfree(buf); -- -- if (ret) -- return ret; - - return nrparts; - } ---- a/drivers/mtd/parsers/Kconfig -+++ b/drivers/mtd/parsers/Kconfig -@@ -1,3 +1,14 @@ -+config MTD_PARSER_IMAGETAG -+ tristate "Parser for BCM963XX Image Tag format partitions" -+ depends on BCM63XX || BMIPS || COMPILE_TEST -+ select CRC32 -+ help -+ Image Tag is the firmware header used by broadcom on their xDSL line -+ of devices. It is used to describe the offsets and lengths of kernel -+ and rootfs partitions. -+ This driver adds support for parsing a partition with an Image Tag -+ header and creates up to two partitions, kernel and rootfs. -+ - config MTD_PARSER_TRX - tristate "Parser for TRX format partitions" - depends on MTD && (BCM47XX || ARCH_BCM_5301X || COMPILE_TEST) ---- a/drivers/mtd/parsers/Makefile -+++ b/drivers/mtd/parsers/Makefile -@@ -1,2 +1,3 @@ -+obj-$(CONFIG_MTD_PARSER_IMAGETAG) += parser_imagetag.o - obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o - obj-$(CONFIG_MTD_SHARPSL_PARTS) += sharpslpart.o ---- /dev/null -+++ b/drivers/mtd/parsers/parser_imagetag.c -@@ -0,0 +1,214 @@ -+/* -+ * BCM63XX CFE image tag parser -+ * -+ * Copyright © 2006-2008 Florian Fainelli -+ * Mike Albon -+ * Copyright © 2009-2010 Daniel Dickinson -+ * Copyright © 2011-2013 Jonas Gorski -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ */ -+ -+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+/* Ensure strings read from flash structs are null terminated */ -+#define STR_NULL_TERMINATE(x) \ -+ do { char *_str = (x); _str[sizeof(x) - 1] = 0; } while (0) -+ -+static int bcm963xx_read_imagetag(struct mtd_info *master, const char *name, -+ loff_t tag_offset, struct bcm_tag *buf) -+{ -+ int ret; -+ size_t retlen; -+ u32 computed_crc; -+ -+ ret = mtd_read(master, tag_offset, sizeof(*buf), &retlen, (void *)buf); -+ if (ret) -+ return ret; -+ -+ if (retlen != sizeof(*buf)) -+ return -EIO; -+ -+ computed_crc = crc32_le(IMAGETAG_CRC_START, (u8 *)buf, -+ offsetof(struct bcm_tag, header_crc)); -+ if (computed_crc == buf->header_crc) { -+ STR_NULL_TERMINATE(buf->board_id); -+ STR_NULL_TERMINATE(buf->tag_version); -+ -+ pr_info("%s: CFE image tag found at 0x%llx with version %s, board type %s\n", -+ name, tag_offset, buf->tag_version, buf->board_id); -+ -+ return 0; -+ } -+ -+ pr_warn("%s: CFE image tag at 0x%llx CRC invalid (expected %08x, actual %08x)\n", -+ name, tag_offset, buf->header_crc, computed_crc); -+ return -EINVAL; -+} -+ -+static int bcm963xx_parse_imagetag_partitions(struct mtd_info *master, -+ const struct mtd_partition **pparts, -+ struct mtd_part_parser_data *data) -+{ -+ /* CFE, NVRAM and global Linux are always present */ -+ int nrparts = 0, curpart = 0; -+ struct bcm_tag *buf = NULL; -+ struct mtd_partition *parts; -+ int ret; -+ unsigned int rootfsaddr, kerneladdr, spareaddr, offset; -+ unsigned int rootfslen, kernellen, sparelen, totallen; -+ int i; -+ bool rootfs_first = false; -+ -+ buf = vmalloc(sizeof(struct bcm_tag)); -+ if (!buf) -+ return -ENOMEM; -+ -+ /* Get the tag */ -+ ret = bcm963xx_read_imagetag(master, "rootfs", 0, buf); -+ if (!ret) { -+ STR_NULL_TERMINATE(buf->flash_image_start); -+ if (kstrtouint(buf->flash_image_start, 10, &rootfsaddr) || -+ rootfsaddr < BCM963XX_EXTENDED_SIZE) { -+ pr_err("invalid rootfs address: %*ph\n", -+ (int)sizeof(buf->flash_image_start), -+ buf->flash_image_start); -+ goto out; -+ } -+ -+ STR_NULL_TERMINATE(buf->kernel_address); -+ if (kstrtouint(buf->kernel_address, 10, &kerneladdr) || -+ kerneladdr < BCM963XX_EXTENDED_SIZE) { -+ pr_err("invalid kernel address: %*ph\n", -+ (int)sizeof(buf->kernel_address), -+ buf->kernel_address); -+ goto out; -+ } -+ -+ STR_NULL_TERMINATE(buf->kernel_length); -+ if (kstrtouint(buf->kernel_length, 10, &kernellen)) { -+ pr_err("invalid kernel length: %*ph\n", -+ (int)sizeof(buf->kernel_length), -+ buf->kernel_length); -+ goto out; -+ } -+ -+ STR_NULL_TERMINATE(buf->total_length); -+ if (kstrtouint(buf->total_length, 10, &totallen)) { -+ pr_err("invalid total length: %*ph\n", -+ (int)sizeof(buf->total_length), -+ buf->total_length); -+ goto out; -+ } -+ -+ /* -+ * Addresses are flash absolute, so convert to partition -+ * relative addresses. Assume either kernel or rootfs will -+ * directly follow the image tag. -+ */ -+ if (rootfsaddr < kerneladdr) -+ offset = rootfsaddr - sizeof(struct bcm_tag); -+ else -+ offset = kerneladdr - sizeof(struct bcm_tag); -+ -+ kerneladdr = kerneladdr - offset; -+ rootfsaddr = rootfsaddr - offset; -+ spareaddr = roundup(totallen, master->erasesize); -+ -+ if (rootfsaddr < kerneladdr) { -+ /* default Broadcom layout */ -+ rootfslen = kerneladdr - rootfsaddr; -+ rootfs_first = true; -+ } else { -+ /* OpenWrt layout */ -+ rootfsaddr = kerneladdr + kernellen; -+ rootfslen = spareaddr - rootfsaddr; -+ } -+ } else { -+ goto out; -+ } -+ sparelen = master->size - spareaddr; -+ -+ /* Determine number of partitions */ -+ if (rootfslen > 0) -+ nrparts++; -+ -+ if (kernellen > 0) -+ nrparts++; -+ -+ parts = kzalloc(sizeof(*parts) * nrparts + 10 * nrparts, GFP_KERNEL); -+ if (!parts) { -+ ret = -ENOMEM; -+ goto out; -+ } -+ -+ /* Start building partition list */ -+ if (kernellen > 0) { -+ int kernelpart = curpart; -+ -+ if (rootfslen > 0 && rootfs_first) -+ kernelpart++; -+ parts[kernelpart].name = "kernel"; -+ parts[kernelpart].offset = kerneladdr; -+ parts[kernelpart].size = kernellen; -+ curpart++; -+ } -+ -+ if (rootfslen > 0) { -+ int rootfspart = curpart; -+ -+ if (kernellen > 0 && rootfs_first) -+ rootfspart--; -+ parts[rootfspart].name = "rootfs"; -+ parts[rootfspart].offset = rootfsaddr; -+ parts[rootfspart].size = rootfslen; -+ if (sparelen > 0 && !rootfs_first) -+ parts[rootfspart].size += sparelen; -+ curpart++; -+ } -+ -+ for (i = 0; i < nrparts; i++) -+ pr_info("Partition %d is %s offset %llx and length %llx\n", i, -+ parts[i].name, parts[i].offset, parts[i].size); -+ -+ pr_info("Spare partition is offset %x and length %x\n", spareaddr, -+ sparelen); -+ -+ *pparts = parts; -+ ret = 0; -+ -+out: -+ vfree(buf); -+ -+ if (ret) -+ return ret; -+ -+ return nrparts; -+} -+ -+static struct mtd_part_parser bcm963xx_imagetag_parser = { -+ .parse_fn = bcm963xx_parse_imagetag_partitions, -+ .name = "bcm963xx-imagetag", -+}; -+module_mtd_part_parser(bcm963xx_imagetag_parser); -+ -+MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Daniel Dickinson "); -+MODULE_AUTHOR("Florian Fainelli "); -+MODULE_AUTHOR("Mike Albon "); -+MODULE_AUTHOR("Jonas Gorski -Date: Wed, 28 Jun 2017 18:34:42 +0200 -Subject: [PATCH 1/2] mtd: bcm63xxpart: add of_match_table - -Signed-off-by: Jonas Gorski ---- - drivers/mtd/bcm63xxpart.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - ---- a/drivers/mtd/bcm63xxpart.c -+++ b/drivers/mtd/bcm63xxpart.c -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - - #define BCM963XX_CFE_BLOCK_SIZE SZ_64K /* always at least 64KiB */ - -@@ -172,9 +173,16 @@ out: - return ret; - }; - -+static const struct of_device_id parse_bcm63xx_cfe_match_table[] = { -+ { .compatible = "brcm,bcm963xx-cfe-nor-partitions" }, -+ {}, -+}; -+MODULE_DEVICE_TABLE(of, parse_bcm63xx_cfe_match_table); -+ - static struct mtd_part_parser bcm63xx_cfe_parser = { - .parse_fn = bcm63xx_parse_cfe_partitions, - .name = "bcm63xxpart", -+ .of_match_table = parse_bcm63xx_cfe_match_table, - }; - module_mtd_part_parser(bcm63xx_cfe_parser); - diff --git a/target/linux/bcm63xx/patches-5.4/123-mtd-parser_bcm63xx_imagetag-add-of_match_table-suppo.patch b/target/linux/bcm63xx/patches-5.4/123-mtd-parser_bcm63xx_imagetag-add-of_match_table-suppo.patch deleted file mode 100644 index 04978b374e..0000000000 --- a/target/linux/bcm63xx/patches-5.4/123-mtd-parser_bcm63xx_imagetag-add-of_match_table-suppo.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 3303dd9f5b197cc2efd9cbd7b9b45fc1e510a393 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 28 Jun 2017 18:37:12 +0200 -Subject: [PATCH 2/2] mtd: parser_bcm63xx_imagetag: add of_match_table support - -Signed-off-by: Jonas Gorski ---- - drivers/mtd/parsers/parser_imagetag.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - ---- a/drivers/mtd/parsers/parser_imagetag.c -+++ b/drivers/mtd/parsers/parser_imagetag.c -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - - /* Ensure strings read from flash structs are null terminated */ - #define STR_NULL_TERMINATE(x) \ -@@ -200,9 +201,16 @@ out: - return nrparts; - } - -+static const struct of_device_id parse_bcm963xx_imagetag_match_table[] = { -+ { .compatible = "brcm,bcm963xx-imagetag" }, -+ {}, -+}; -+MODULE_DEVICE_TABLE(of, parse_bcm963xx_imagetag_match_table); -+ - static struct mtd_part_parser bcm963xx_imagetag_parser = { - .parse_fn = bcm963xx_parse_imagetag_partitions, - .name = "bcm963xx-imagetag", -+ .of_match_table = parse_bcm963xx_imagetag_match_table, - }; - module_mtd_part_parser(bcm963xx_imagetag_parser); - diff --git a/target/linux/bcm63xx/patches-5.4/130-pinctrl-add-bcm63xx-base-code.patch b/target/linux/bcm63xx/patches-5.4/130-pinctrl-add-bcm63xx-base-code.patch index 19ea476ca5..559ec94c2e 100644 --- a/target/linux/bcm63xx/patches-5.4/130-pinctrl-add-bcm63xx-base-code.patch +++ b/target/linux/bcm63xx/patches-5.4/130-pinctrl-add-bcm63xx-base-code.patch @@ -21,7 +21,7 @@ Signed-off-by: Jonas Gorski --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig -@@ -341,6 +341,7 @@ config PINCTRL_OCELOT +@@ -387,6 +387,7 @@ config PINCTRL_OCELOT source "drivers/pinctrl/actions/Kconfig" source "drivers/pinctrl/aspeed/Kconfig" source "drivers/pinctrl/bcm/Kconfig" @@ -31,7 +31,7 @@ Signed-off-by: Jonas Gorski source "drivers/pinctrl/intel/Kconfig" --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile -@@ -46,6 +46,7 @@ obj-$(CONFIG_PINCTRL_OCELOT) += pinctrl- +@@ -50,6 +50,7 @@ obj-$(CONFIG_PINCTRL_OCELOT) += pinctrl- obj-y += actions/ obj-$(CONFIG_ARCH_ASPEED) += aspeed/ obj-y += bcm/ diff --git a/target/linux/bcm63xx/patches-5.4/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch b/target/linux/bcm63xx/patches-5.4/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch index 13225beae6..ea836b8a80 100644 --- a/target/linux/bcm63xx/patches-5.4/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch +++ b/target/linux/bcm63xx/patches-5.4/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch @@ -29,7 +29,7 @@ Signed-off-by: Jonas Gorski --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c -@@ -363,12 +363,15 @@ static struct gpio_desc *of_parse_own_gp +@@ -621,12 +621,15 @@ static struct gpio_desc *of_parse_own_gp /** * of_gpiochip_scan_gpios - Scan gpio-controller for gpio definitions * @chip: gpio chip to act on @@ -48,8 +48,8 @@ Signed-off-by: Jonas Gorski { struct gpio_desc *desc = NULL; struct device_node *np; -@@ -376,7 +379,7 @@ static int of_gpiochip_scan_gpios(struct - enum gpio_lookup_flags lflags; +@@ -634,7 +637,7 @@ static int of_gpiochip_scan_gpios(struct + unsigned long lflags; enum gpiod_flags dflags; unsigned int i; - int ret; @@ -57,7 +57,7 @@ Signed-off-by: Jonas Gorski for_each_available_child_of_node(chip->of_node, np) { if (!of_property_read_bool(np, "gpio-hog")) -@@ -388,6 +391,10 @@ static int of_gpiochip_scan_gpios(struct +@@ -646,6 +649,10 @@ static int of_gpiochip_scan_gpios(struct if (IS_ERR(desc)) break; @@ -68,28 +68,24 @@ Signed-off-by: Jonas Gorski ret = gpiod_hog(desc, name, lflags, dflags); if (ret < 0) { of_node_put(np); -@@ -646,12 +653,13 @@ int of_gpiochip_add(struct gpio_chip *ch +@@ -904,9 +911,11 @@ int of_gpiochip_add(struct gpio_chip *ch of_node_get(chip->of_node); -- status = of_gpiochip_scan_gpios(chip); -- if (status) { +- ret = of_gpiochip_scan_gpios(chip); +- if (ret) - of_node_put(chip->of_node); -- gpiochip_remove_pin_ranges(chip); + if (!chip->request) { -+ status = of_gpiochip_scan_gpios(chip, 0, chip->ngpio); -+ if (status) { ++ ret = of_gpiochip_scan_gpios(chip, 0, chip->ngpio); ++ if (ret) + of_node_put(chip->of_node); -+ gpiochip_remove_pin_ranges(chip); -+ } - } -- - return status; - } ++ } + return ret; + } --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c -@@ -2205,7 +2205,8 @@ int gpiochip_add_pingroup_range(struct g +@@ -2580,7 +2580,8 @@ int gpiochip_add_pingroup_range(struct g list_add_tail(&pin_range->node, &gdev->pin_ranges); @@ -99,7 +95,7 @@ Signed-off-by: Jonas Gorski } EXPORT_SYMBOL_GPL(gpiochip_add_pingroup_range); -@@ -2262,7 +2263,7 @@ int gpiochip_add_pin_range(struct gpio_c +@@ -2637,7 +2638,7 @@ int gpiochip_add_pin_range(struct gpio_c list_add_tail(&pin_range->node, &gdev->pin_ranges); @@ -108,18 +104,18 @@ Signed-off-by: Jonas Gorski } EXPORT_SYMBOL_GPL(gpiochip_add_pin_range); ---- a/drivers/gpio/gpiolib.h -+++ b/drivers/gpio/gpiolib.h -@@ -103,6 +103,8 @@ struct gpio_desc *of_get_named_gpiod_fla - const char *list_name, int index, enum of_gpio_flags *flags); +--- a/drivers/gpio/gpiolib-of.h ++++ b/drivers/gpio/gpiolib-of.h +@@ -13,6 +13,8 @@ struct gpio_desc *of_find_gpio(struct de + unsigned long *lookupflags); int of_gpiochip_add(struct gpio_chip *gc); void of_gpiochip_remove(struct gpio_chip *gc); +int of_gpiochip_scan_gpios(struct gpio_chip *chip, unsigned int start, + unsigned int num); + int of_gpio_get_count(struct device *dev, const char *con_id); + bool of_gpio_need_valid_mask(const struct gpio_chip *gc); #else - static inline struct gpio_desc *of_find_gpio(struct device *dev, - const char *con_id, -@@ -118,6 +120,12 @@ static inline struct gpio_desc *of_get_n +@@ -25,6 +27,12 @@ static inline struct gpio_desc *of_find_ } static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; } static inline void of_gpiochip_remove(struct gpio_chip *gc) { } @@ -129,6 +125,6 @@ Signed-off-by: Jonas Gorski +{ + return 0; +} - #endif /* CONFIG_OF_GPIO */ - - #ifdef CONFIG_ACPI + static inline int of_gpio_get_count(struct device *dev, const char *con_id) + { + return 0; diff --git a/target/linux/bcm63xx/patches-5.4/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch b/target/linux/bcm63xx/patches-5.4/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch index 90b1640d16..652eb6c9bf 100644 --- a/target/linux/bcm63xx/patches-5.4/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch +++ b/target/linux/bcm63xx/patches-5.4/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch @@ -19,7 +19,8 @@ Signed-off-by: Jonas Gorski --- a/arch/mips/bcm63xx/boards/Makefile +++ b/arch/mips/bcm63xx/boards/Makefile -@@ -1 +1,2 @@ +@@ -1,2 +1,3 @@ + # SPDX-License-Identifier: GPL-2.0-only +obj-y += board_common.o obj-$(CONFIG_BOARD_BCM963XX) += board_bcm963xx.o --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c diff --git a/target/linux/bcm63xx/patches-5.4/311-bcm63xxpart_use_cfedetection.patch b/target/linux/bcm63xx/patches-5.4/311-bcm63xxpart_use_cfedetection.patch index bca6adbf3c..19ed994b85 100644 --- a/target/linux/bcm63xx/patches-5.4/311-bcm63xxpart_use_cfedetection.patch +++ b/target/linux/bcm63xx/patches-5.4/311-bcm63xxpart_use_cfedetection.patch @@ -1,6 +1,6 @@ ---- a/drivers/mtd/bcm63xxpart.c -+++ b/drivers/mtd/bcm63xxpart.c -@@ -35,6 +35,8 @@ +--- a/drivers/mtd/parsers/bcm63xxpart.c ++++ b/drivers/mtd/parsers/bcm63xxpart.c +@@ -21,6 +21,8 @@ #include #include #include @@ -9,7 +9,7 @@ #define BCM963XX_CFE_BLOCK_SIZE SZ_64K /* always at least 64KiB */ -@@ -46,30 +48,6 @@ +@@ -32,30 +34,6 @@ #define STR_NULL_TERMINATE(x) \ do { char *_str = (x); _str[sizeof(x) - 1] = 0; } while (0) @@ -40,7 +40,7 @@ static int bcm63xx_read_nvram(struct mtd_info *master, struct bcm963xx_nvram *nvram) { -@@ -152,7 +130,7 @@ static int bcm63xx_parse_cfe_partitions( +@@ -138,7 +116,7 @@ static int bcm63xx_parse_cfe_partitions( struct bcm963xx_nvram *nvram = NULL; int ret; diff --git a/target/linux/bcm63xx/patches-5.4/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch b/target/linux/bcm63xx/patches-5.4/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch index b75987ef35..00bbadcb95 100644 --- a/target/linux/bcm63xx/patches-5.4/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch +++ b/target/linux/bcm63xx/patches-5.4/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch @@ -71,7 +71,7 @@ Signed-off-by: Jonas Gorski +}; --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig -@@ -129,6 +129,10 @@ config BRCMSTB_L2_IRQ +@@ -145,6 +145,10 @@ config DAVINCI_CP_INTC select GENERIC_IRQ_CHIP select IRQ_DOMAIN @@ -84,7 +84,7 @@ Signed-off-by: Jonas Gorski select GENERIC_IRQ_CHIP --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile -@@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_MMP) += irq-mmp.o +@@ -17,6 +17,7 @@ obj-$(CONFIG_ARCH_MMP) += irq-mmp.o obj-$(CONFIG_IRQ_MXS) += irq-mxs.o obj-$(CONFIG_ARCH_TEGRA) += irq-tegra.o obj-$(CONFIG_ARCH_S3C24XX) += irq-s3c24xx.o diff --git a/target/linux/bcm63xx/patches-5.4/321-irqchip-add-support-for-bcm6345-style-external-inter.patch b/target/linux/bcm63xx/patches-5.4/321-irqchip-add-support-for-bcm6345-style-external-inter.patch index 4db80ef533..9c265ade90 100644 --- a/target/linux/bcm63xx/patches-5.4/321-irqchip-add-support-for-bcm6345-style-external-inter.patch +++ b/target/linux/bcm63xx/patches-5.4/321-irqchip-add-support-for-bcm6345-style-external-inter.patch @@ -50,7 +50,7 @@ Signed-off-by: Jonas Gorski +}; --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig -@@ -129,6 +129,10 @@ config BRCMSTB_L2_IRQ +@@ -145,6 +145,10 @@ config DAVINCI_CP_INTC select GENERIC_IRQ_CHIP select IRQ_DOMAIN @@ -63,7 +63,7 @@ Signed-off-by: Jonas Gorski select IRQ_DOMAIN --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile -@@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_MMP) += irq-mmp.o +@@ -17,6 +17,7 @@ obj-$(CONFIG_ARCH_MMP) += irq-mmp.o obj-$(CONFIG_IRQ_MXS) += irq-mxs.o obj-$(CONFIG_ARCH_TEGRA) += irq-tegra.o obj-$(CONFIG_ARCH_S3C24XX) += irq-s3c24xx.o diff --git a/target/linux/bcm63xx/patches-5.4/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch b/target/linux/bcm63xx/patches-5.4/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch index f0ffc654f7..ec978a031d 100644 --- a/target/linux/bcm63xx/patches-5.4/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch +++ b/target/linux/bcm63xx/patches-5.4/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch @@ -14,7 +14,7 @@ Signed-off-by: Jonas Gorski --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -283,6 +283,9 @@ config BCM63XX +@@ -290,6 +290,9 @@ config BCM63XX select SYNC_R4K select DMA_NONCOHERENT select IRQ_MIPS_CPU diff --git a/target/linux/bcm63xx/patches-5.4/339-MIPS-BCM63XX-add-support-for-BCM63268.patch b/target/linux/bcm63xx/patches-5.4/339-MIPS-BCM63XX-add-support-for-BCM63268.patch index 54ec472326..efd5f10534 100644 --- a/target/linux/bcm63xx/patches-5.4/339-MIPS-BCM63XX-add-support-for-BCM63268.patch +++ b/target/linux/bcm63xx/patches-5.4/339-MIPS-BCM63XX-add-support-for-BCM63268.patch @@ -22,14 +22,14 @@ Signed-off-by: Jonas Gorski --- a/arch/mips/bcm63xx/Kconfig +++ b/arch/mips/bcm63xx/Kconfig @@ -61,6 +61,11 @@ config BCM63XX_CPU_6368 - select HW_HAS_PCI + select HAVE_PCI select BCM63XX_OHCI select BCM63XX_EHCI + +config BCM63XX_CPU_63268 + bool "support 63268 CPU" + select SYS_HAS_CPU_BMIPS4350 -+ select HW_HAS_PCI ++ select HAVE_PCI endmenu source "arch/mips/bcm63xx/boards/Kconfig" @@ -260,19 +260,19 @@ Signed-off-by: Jonas Gorski break; --- a/arch/mips/bcm63xx/dev-flash.c +++ b/arch/mips/bcm63xx/dev-flash.c -@@ -94,6 +94,12 @@ static int __init bcm63xx_detect_flash_t - case STRAPBUS_6368_BOOT_SEL_PARALLEL: - return BCM63XX_FLASH_TYPE_PARALLEL; - } +@@ -84,6 +84,12 @@ static int __init bcm63xx_detect_flash_t + return BCM63XX_FLASH_TYPE_SERIAL; + else + return BCM63XX_FLASH_TYPE_NAND; + case BCM63268_CPU_ID: + val = bcm_misc_readl(MISC_STRAPBUS_63268_REG); + if (val & STRAPBUS_63268_BOOT_SEL_SERIAL) + return BCM63XX_FLASH_TYPE_SERIAL; + else + return BCM63XX_FLASH_TYPE_NAND; - default: - return -EINVAL; - } + case BCM6368_CPU_ID: + val = bcm_gpio_readl(GPIO_STRAPBUS_REG); + switch (val & STRAPBUS_6368_BOOT_SEL_MASK) { --- a/arch/mips/bcm63xx/dev-spi.c +++ b/arch/mips/bcm63xx/dev-spi.c @@ -51,7 +51,7 @@ int __init bcm63xx_spi_register(void) diff --git a/target/linux/bcm63xx/patches-5.4/341-MIPS-BCM63XX-add-support-for-BCM6318.patch b/target/linux/bcm63xx/patches-5.4/341-MIPS-BCM63XX-add-support-for-BCM6318.patch index b6119e91e4..5f4c900813 100644 --- a/target/linux/bcm63xx/patches-5.4/341-MIPS-BCM63XX-add-support-for-BCM6318.patch +++ b/target/linux/bcm63xx/patches-5.4/341-MIPS-BCM63XX-add-support-for-BCM6318.patch @@ -28,7 +28,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 +config BCM63XX_CPU_6318 + bool "support 6318 CPU" + select SYS_HAS_CPU_BMIPS32_3300 -+ select HW_HAS_PCI ++ select HAVE_PCI + config BCM63XX_CPU_6328 bool "support 6328 CPU" diff --git a/target/linux/bcm63xx/patches-5.4/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch b/target/linux/bcm63xx/patches-5.4/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch index 3d9835df2c..1ebb451b59 100644 --- a/target/linux/bcm63xx/patches-5.4/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch +++ b/target/linux/bcm63xx/patches-5.4/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch @@ -146,7 +146,7 @@ Subject: [PATCH 53/53] MIPS: BCM63XX: add PCIe support for BCM6318 * _REG relative to RSET_OTP --- a/arch/mips/pci/ops-bcm63xx.c +++ b/arch/mips/pci/ops-bcm63xx.c -@@ -488,8 +488,12 @@ static int bcm63xx_pcie_read(struct pci_ +@@ -489,8 +489,12 @@ static int bcm63xx_pcie_read(struct pci_ if (!bcm63xx_pcie_can_access(bus, devfn)) return PCIBIOS_DEVICE_NOT_FOUND; @@ -161,7 +161,7 @@ Subject: [PATCH 53/53] MIPS: BCM63XX: add PCIe support for BCM6318 data = bcm_pcie_readl(reg); -@@ -508,8 +512,12 @@ static int bcm63xx_pcie_write(struct pci +@@ -509,8 +513,12 @@ static int bcm63xx_pcie_write(struct pci if (!bcm63xx_pcie_can_access(bus, devfn)) return PCIBIOS_DEVICE_NOT_FOUND; diff --git a/target/linux/bcm63xx/patches-5.4/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch b/target/linux/bcm63xx/patches-5.4/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch index 298fffdfa1..cbe095c038 100644 --- a/target/linux/bcm63xx/patches-5.4/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch +++ b/target/linux/bcm63xx/patches-5.4/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch @@ -22,7 +22,7 @@ Signed-off-by: Jonas Gorski static struct mtd_partition mtd_partitions[] = { { .name = "cfe", -@@ -108,13 +110,15 @@ static int __init bcm63xx_detect_flash_t +@@ -109,13 +111,15 @@ static int __init bcm63xx_detect_flash_t } } diff --git a/target/linux/bcm63xx/patches-5.4/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch b/target/linux/bcm63xx/patches-5.4/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch index 329a156fe1..91dae6e3d8 100644 --- a/target/linux/bcm63xx/patches-5.4/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch +++ b/target/linux/bcm63xx/patches-5.4/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch @@ -22,7 +22,7 @@ Signed-off-by: Jonas Gorski #include #include -@@ -110,9 +111,59 @@ static int __init bcm63xx_detect_flash_t +@@ -111,9 +112,59 @@ static int __init bcm63xx_detect_flash_t } } diff --git a/target/linux/bcm63xx/patches-5.4/347-MIPS-BCM6318-USB-support.patch b/target/linux/bcm63xx/patches-5.4/347-MIPS-BCM6318-USB-support.patch index 92c37c130f..15d4679670 100644 --- a/target/linux/bcm63xx/patches-5.4/347-MIPS-BCM6318-USB-support.patch +++ b/target/linux/bcm63xx/patches-5.4/347-MIPS-BCM6318-USB-support.patch @@ -116,7 +116,7 @@ @@ -23,6 +23,8 @@ config BCM63XX_CPU_6318 bool "support 6318 CPU" select SYS_HAS_CPU_BMIPS32_3300 - select HW_HAS_PCI + select HAVE_PCI + select BCM63XX_OHCI + select BCM63XX_EHCI diff --git a/target/linux/bcm63xx/patches-5.4/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch b/target/linux/bcm63xx/patches-5.4/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch index 41f48b93da..3f98ddfdc3 100644 --- a/target/linux/bcm63xx/patches-5.4/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch +++ b/target/linux/bcm63xx/patches-5.4/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch @@ -26,7 +26,7 @@ @@ -73,6 +73,8 @@ config BCM63XX_CPU_63268 bool "support 63268 CPU" select SYS_HAS_CPU_BMIPS4350 - select HW_HAS_PCI + select HAVE_PCI + select BCM63XX_OHCI + select BCM63XX_EHCI endmenu diff --git a/target/linux/bcm63xx/patches-5.4/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch b/target/linux/bcm63xx/patches-5.4/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch index deca2260f1..51908d99d2 100644 --- a/target/linux/bcm63xx/patches-5.4/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch +++ b/target/linux/bcm63xx/patches-5.4/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch @@ -27,7 +27,7 @@ Signed-off-by: Jonas Gorski - default BOARD_BCM963XX config BOARD_BCM963XX - bool "Generic Broadcom 963xx boards" + bool "Generic Broadcom 963xx boards" select SSB + default y diff --git a/target/linux/bcm63xx/patches-5.4/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch b/target/linux/bcm63xx/patches-5.4/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch index 846f0b81df..bf1c4a2842 100644 --- a/target/linux/bcm63xx/patches-5.4/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch +++ b/target/linux/bcm63xx/patches-5.4/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch @@ -27,7 +27,7 @@ Signed-off-by: Jonas Gorski static int __init bcm63xx_detect_flash_type(void) { u32 val; -@@ -172,12 +178,15 @@ int __init bcm63xx_flash_register(void) +@@ -173,12 +179,15 @@ int __init bcm63xx_flash_register(void) switch (flash_type) { case BCM63XX_FLASH_TYPE_PARALLEL: diff --git a/target/linux/bcm63xx/patches-5.4/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch b/target/linux/bcm63xx/patches-5.4/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch index 11153c1b19..24ae8c35c7 100644 --- a/target/linux/bcm63xx/patches-5.4/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch +++ b/target/linux/bcm63xx/patches-5.4/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch @@ -15,7 +15,7 @@ Signed-off-by: Jonas Gorski +++ b/arch/mips/bcm63xx/boards/Kconfig @@ -5,6 +5,7 @@ menu "Board support" config BOARD_BCM963XX - bool "Generic Broadcom 963xx boards" + bool "Generic Broadcom 963xx boards" select SSB + select BCMA default y diff --git a/target/linux/bcm63xx/patches-5.4/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch b/target/linux/bcm63xx/patches-5.4/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch index a49181640c..fee5f769b1 100644 --- a/target/linux/bcm63xx/patches-5.4/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch +++ b/target/linux/bcm63xx/patches-5.4/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch @@ -21,7 +21,7 @@ Signed-off-by: Jonas Gorski + select USE_OF + config BOARD_BCM963XX - bool "Generic Broadcom 963xx boards" + bool "Generic Broadcom 963xx boards" select SSB --- a/arch/mips/bcm63xx/boards/board_common.c +++ b/arch/mips/bcm63xx/boards/board_common.c @@ -99,7 +99,7 @@ Signed-off-by: Jonas Gorski @@ -8,6 +8,7 @@ #include - #include + #include +#include #include #include diff --git a/target/linux/bcm63xx/patches-5.4/372_dont_register_pflash_when_available_in_dtb.patch b/target/linux/bcm63xx/patches-5.4/372_dont_register_pflash_when_available_in_dtb.patch index 25384ebb68..af0800f5aa 100644 --- a/target/linux/bcm63xx/patches-5.4/372_dont_register_pflash_when_available_in_dtb.patch +++ b/target/linux/bcm63xx/patches-5.4/372_dont_register_pflash_when_available_in_dtb.patch @@ -9,7 +9,7 @@ static int flash_type; static struct mtd_partition mtd_partitions[] = { -@@ -178,6 +180,9 @@ int __init bcm63xx_flash_register(void) +@@ -179,6 +181,9 @@ int __init bcm63xx_flash_register(void) switch (flash_type) { case BCM63XX_FLASH_TYPE_PARALLEL: diff --git a/target/linux/bcm63xx/patches-5.4/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch b/target/linux/bcm63xx/patches-5.4/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch index 6307d56407..56317410c1 100644 --- a/target/linux/bcm63xx/patches-5.4/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch +++ b/target/linux/bcm63xx/patches-5.4/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch @@ -14,7 +14,7 @@ Signed-off-by: Jonas Gorski --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -151,6 +151,13 @@ config GPIO_BCM_KONA +@@ -147,6 +147,13 @@ config GPIO_BCM_KONA help Turn on GPIO support for Broadcom "Kona" chips. @@ -30,14 +30,14 @@ Signed-off-by: Jonas Gorski default y if (ARCH_BRCMSTB || BMIPS_GENERIC) --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile -@@ -34,6 +34,7 @@ obj-$(CONFIG_GPIO_ATH79) += gpio-ath79.o - obj-$(CONFIG_GPIO_ASPEED) += gpio-aspeed.o - obj-$(CONFIG_GPIO_RASPBERRYPI_EXP) += gpio-raspberrypi-exp.o - obj-$(CONFIG_GPIO_BCM_KONA) += gpio-bcm-kona.o -+obj-$(CONFIG_GPIO_BCM63XX) += gpio-bcm63xx.o - obj-$(CONFIG_GPIO_BD9571MWV) += gpio-bd9571mwv.o - obj-$(CONFIG_GPIO_BRCMSTB) += gpio-brcmstb.o - obj-$(CONFIG_GPIO_BT8XX) += gpio-bt8xx.o +@@ -34,6 +34,7 @@ obj-$(CONFIG_GPIO_ARIZONA) += gpio-ariz + obj-$(CONFIG_GPIO_ASPEED) += gpio-aspeed.o + obj-$(CONFIG_GPIO_ATH79) += gpio-ath79.o + obj-$(CONFIG_GPIO_BCM_KONA) += gpio-bcm-kona.o ++obj-$(CONFIG_GPIO_BCM63XX) += gpio-bcm63xx.o + obj-$(CONFIG_GPIO_BD70528) += gpio-bd70528.o + obj-$(CONFIG_GPIO_BD9571MWV) += gpio-bd9571mwv.o + obj-$(CONFIG_GPIO_BRCMSTB) += gpio-brcmstb.o --- /dev/null +++ b/drivers/gpio/gpio-bcm63xx.c @@ -0,0 +1,135 @@ diff --git a/target/linux/bcm63xx/patches-5.4/383-bcm63xx_select_pinctrl.patch b/target/linux/bcm63xx/patches-5.4/383-bcm63xx_select_pinctrl.patch index 67c8cee22c..cf655f55cc 100644 --- a/target/linux/bcm63xx/patches-5.4/383-bcm63xx_select_pinctrl.patch +++ b/target/linux/bcm63xx/patches-5.4/383-bcm63xx_select_pinctrl.patch @@ -1,7 +1,7 @@ --- a/arch/mips/bcm63xx/Kconfig +++ b/arch/mips/bcm63xx/Kconfig @@ -25,6 +25,8 @@ config BCM63XX_CPU_6318 - select HW_HAS_PCI + select HAVE_PCI select BCM63XX_OHCI select BCM63XX_EHCI + select PINCTRL @@ -10,7 +10,7 @@ config BCM63XX_CPU_6328 bool "support 6328 CPU" @@ -32,6 +34,8 @@ config BCM63XX_CPU_6328 - select HW_HAS_PCI + select HAVE_PCI select BCM63XX_OHCI select BCM63XX_EHCI + select PINCTRL @@ -20,7 +20,7 @@ bool "support 6338 CPU" @@ -47,6 +51,8 @@ config BCM63XX_CPU_6348 select SYS_HAS_CPU_BMIPS32_3300 - select HW_HAS_PCI + select HAVE_PCI select BCM63XX_OHCI + select PINCTRL + select PINCTRL_BCM6348 @@ -28,7 +28,7 @@ config BCM63XX_CPU_6358 bool "support 6358 CPU" @@ -54,6 +60,8 @@ config BCM63XX_CPU_6358 - select HW_HAS_PCI + select HAVE_PCI select BCM63XX_OHCI select BCM63XX_EHCI + select PINCTRL @@ -37,7 +37,7 @@ config BCM63XX_CPU_6362 bool "support 6362 CPU" @@ -61,6 +69,8 @@ config BCM63XX_CPU_6362 - select HW_HAS_PCI + select HAVE_PCI select BCM63XX_OHCI select BCM63XX_EHCI + select PINCTRL @@ -46,7 +46,7 @@ config BCM63XX_CPU_6368 bool "support 6368 CPU" @@ -68,6 +78,8 @@ config BCM63XX_CPU_6368 - select HW_HAS_PCI + select HAVE_PCI select BCM63XX_OHCI select BCM63XX_EHCI + select PINCTRL @@ -55,7 +55,7 @@ config BCM63XX_CPU_63268 bool "support 63268 CPU" @@ -75,6 +87,8 @@ config BCM63XX_CPU_63268 - select HW_HAS_PCI + select HAVE_PCI select BCM63XX_OHCI select BCM63XX_EHCI + select PINCTRL diff --git a/target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch b/target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch index c693ace363..b80f096413 100644 --- a/target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch +++ b/target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch @@ -21,9 +21,9 @@ Signed-off-by: Axel Gembe static struct physmap_flash_data flash_data = { .width = 2, ---- a/drivers/mtd/redboot.c -+++ b/drivers/mtd/redboot.c -@@ -72,6 +72,7 @@ static int parse_redboot_partitions(stru +--- a/drivers/mtd/parsers/redboot.c ++++ b/drivers/mtd/parsers/redboot.c +@@ -79,6 +79,7 @@ static int parse_redboot_partitions(stru int nulllen = 0; int numslots; unsigned long offset; @@ -31,7 +31,7 @@ Signed-off-by: Axel Gembe #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED static char nullstring[] = "unallocated"; #endif -@@ -176,6 +177,16 @@ static int parse_redboot_partitions(stru +@@ -185,6 +186,16 @@ static int parse_redboot_partitions(stru goto out; } @@ -48,7 +48,7 @@ Signed-off-by: Axel Gembe for (i = 0; i < numslots; i++) { struct fis_list *new_fl, **prev; -@@ -196,10 +207,10 @@ static int parse_redboot_partitions(stru +@@ -205,10 +216,10 @@ static int parse_redboot_partitions(stru goto out; } new_fl->img = &buf[i]; diff --git a/target/linux/bcm63xx/patches-5.4/401-bcm963xx_real_rootfs_length.patch b/target/linux/bcm63xx/patches-5.4/401-bcm963xx_real_rootfs_length.patch index efefba41b5..e92ec2d94c 100644 --- a/target/linux/bcm63xx/patches-5.4/401-bcm963xx_real_rootfs_length.patch +++ b/target/linux/bcm63xx/patches-5.4/401-bcm963xx_real_rootfs_length.patch @@ -15,7 +15,7 @@ /* 240-255: Unused at present */ --- a/drivers/mtd/parsers/parser_imagetag.c +++ b/drivers/mtd/parsers/parser_imagetag.c -@@ -137,7 +137,8 @@ static int bcm963xx_parse_imagetag_parti +@@ -132,7 +132,8 @@ static int bcm963xx_parse_imagetag_parti } else { /* OpenWrt layout */ rootfsaddr = kerneladdr + kernellen; diff --git a/target/linux/bcm63xx/patches-5.4/402_bcm63xx_enet_vlan_incoming_fixed.patch b/target/linux/bcm63xx/patches-5.4/402_bcm63xx_enet_vlan_incoming_fixed.patch index c3b5778e0a..389e3f71bb 100644 --- a/target/linux/bcm63xx/patches-5.4/402_bcm63xx_enet_vlan_incoming_fixed.patch +++ b/target/linux/bcm63xx/patches-5.4/402_bcm63xx_enet_vlan_incoming_fixed.patch @@ -1,6 +1,6 @@ --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -1634,7 +1634,7 @@ static int bcm_enet_change_mtu(struct ne +@@ -1612,7 +1612,7 @@ static int bcm_enet_change_mtu(struct ne return -EBUSY; /* add ethernet header + vlan tag size */ diff --git a/target/linux/bcm63xx/patches-5.4/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch b/target/linux/bcm63xx/patches-5.4/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch index e30bd5b107..11059b3bb0 100644 --- a/target/linux/bcm63xx/patches-5.4/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch +++ b/target/linux/bcm63xx/patches-5.4/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch @@ -15,7 +15,7 @@ Signed-off-by: Jonas Gorski --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -867,10 +867,8 @@ static int bcm_enet_open(struct net_devi +@@ -854,10 +854,8 @@ static int bcm_enet_open(struct net_devi struct bcm_enet_priv *priv; struct sockaddr addr; struct device *kdev; @@ -26,7 +26,7 @@ Signed-off-by: Jonas Gorski void *p; u32 val; -@@ -878,40 +876,10 @@ static int bcm_enet_open(struct net_devi +@@ -865,31 +863,10 @@ static int bcm_enet_open(struct net_devi kdev = &priv->pdev->dev; if (priv->has_phy) { @@ -43,19 +43,10 @@ Signed-off-by: Jonas Gorski - } - - /* mask with MAC supported features */ -- phydev->supported &= (SUPPORTED_10baseT_Half | -- SUPPORTED_10baseT_Full | -- SUPPORTED_100baseT_Half | -- SUPPORTED_100baseT_Full | -- SUPPORTED_Autoneg | -- SUPPORTED_Pause | -- SUPPORTED_MII); -- phydev->advertising = phydev->supported; -- -- if (priv->pause_auto && priv->pause_rx && priv->pause_tx) -- phydev->advertising |= SUPPORTED_Pause; -- else -- phydev->advertising &= ~SUPPORTED_Pause; +- phy_support_sym_pause(phydev); +- phy_set_max_speed(phydev, SPEED_100); +- phy_set_sym_pause(phydev, priv->pause_rx, priv->pause_rx, +- priv->pause_auto); - - phy_attached_info(phydev); - @@ -68,7 +59,7 @@ Signed-off-by: Jonas Gorski } /* mask all interrupts and request them */ -@@ -921,7 +889,7 @@ static int bcm_enet_open(struct net_devi +@@ -899,7 +876,7 @@ static int bcm_enet_open(struct net_devi ret = request_irq(dev->irq, bcm_enet_isr_mac, 0, dev->name, dev); if (ret) @@ -77,7 +68,7 @@ Signed-off-by: Jonas Gorski ret = request_irq(priv->irq_rx, bcm_enet_isr_dma, 0, dev->name, dev); -@@ -1083,8 +1051,8 @@ static int bcm_enet_open(struct net_devi +@@ -1061,8 +1038,8 @@ static int bcm_enet_open(struct net_devi enet_dmac_writel(priv, priv->dma_chan_int_mask, ENETDMAC_IRMASK, priv->tx_chan); @@ -88,7 +79,7 @@ Signed-off-by: Jonas Gorski else bcm_enet_adjust_link(dev); -@@ -1125,10 +1093,6 @@ out_freeirq_rx: +@@ -1103,10 +1080,6 @@ out_freeirq_rx: out_freeirq: free_irq(dev->irq, dev); @@ -99,7 +90,7 @@ Signed-off-by: Jonas Gorski return ret; } -@@ -1233,10 +1197,6 @@ static int bcm_enet_stop(struct net_devi +@@ -1211,10 +1184,6 @@ static int bcm_enet_stop(struct net_devi free_irq(priv->irq_rx, dev); free_irq(dev->irq, dev); @@ -110,7 +101,7 @@ Signed-off-by: Jonas Gorski return 0; } -@@ -1802,14 +1762,47 @@ static int bcm_enet_probe(struct platfor +@@ -1779,14 +1748,47 @@ static int bcm_enet_probe(struct platfor /* do minimal hardware init to be able to probe mii bus */ bcm_enet_hw_preinit(priv); @@ -159,7 +150,7 @@ Signed-off-by: Jonas Gorski } bus = priv->mii_bus; -@@ -1833,6 +1826,35 @@ static int bcm_enet_probe(struct platfor +@@ -1810,6 +1812,26 @@ static int bcm_enet_probe(struct platfor dev_err(&pdev->dev, "unable to register mdio bus\n"); goto out_free_mdio; } @@ -177,25 +168,16 @@ Signed-off-by: Jonas Gorski + } + + /* mask with MAC supported features */ -+ phydev->supported &= (SUPPORTED_10baseT_Half | -+ SUPPORTED_10baseT_Full | -+ SUPPORTED_100baseT_Half | -+ SUPPORTED_100baseT_Full | -+ SUPPORTED_Autoneg | -+ SUPPORTED_Pause | -+ SUPPORTED_MII); -+ phydev->advertising = phydev->supported; -+ -+ if (priv->pause_auto && priv->pause_rx && priv->pause_tx) -+ phydev->advertising |= SUPPORTED_Pause; -+ else -+ phydev->advertising &= ~SUPPORTED_Pause; ++ phy_support_sym_pause(phydev); ++ phy_set_max_speed(phydev, SPEED_100); ++ phy_set_sym_pause(phydev, priv->pause_rx, priv->pause_rx, ++ priv->pause_auto); + + phy_attached_info(phydev); } else { /* run platform code to initialize PHY device */ -@@ -1840,45 +1862,16 @@ static int bcm_enet_probe(struct platfor +@@ -1817,45 +1839,16 @@ static int bcm_enet_probe(struct platfor pd->mii_config(dev, 1, bcm_enet_mdio_read_mii, bcm_enet_mdio_write_mii)) { dev_err(&pdev->dev, "unable to configure mdio bus\n"); @@ -245,7 +227,7 @@ Signed-off-by: Jonas Gorski if (priv->mii_bus) mdiobus_unregister(priv->mii_bus); -@@ -1886,6 +1879,9 @@ out_free_mdio: +@@ -1863,6 +1856,9 @@ out_free_mdio: if (priv->mii_bus) mdiobus_free(priv->mii_bus); @@ -255,7 +237,7 @@ Signed-off-by: Jonas Gorski out_uninit_hw: /* turn off mdc clock */ enet_writel(priv, 0, ENET_MIISC_REG); -@@ -1916,6 +1912,7 @@ static int bcm_enet_remove(struct platfo +@@ -1893,6 +1889,7 @@ static int bcm_enet_remove(struct platfo enet_writel(priv, 0, ENET_MIISC_REG); if (priv->has_phy) { diff --git a/target/linux/bcm63xx/patches-5.4/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch b/target/linux/bcm63xx/patches-5.4/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch index 86940ae14d..703b83a897 100644 --- a/target/linux/bcm63xx/patches-5.4/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch +++ b/target/linux/bcm63xx/patches-5.4/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch @@ -32,7 +32,7 @@ Subject: [PATCH 54/81] bcm63xx_enet: enable rgmii clock on external ports #define ENETSW_MDIOC_EXT_MASK (1 << 16) --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -2185,6 +2185,18 @@ static int bcm_enetsw_open(struct net_de +@@ -2162,6 +2162,18 @@ static int bcm_enetsw_open(struct net_de priv->sw_port_link[i] = 0; } diff --git a/target/linux/bcm63xx/patches-5.4/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch b/target/linux/bcm63xx/patches-5.4/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch index a91494db41..7912c26696 100644 --- a/target/linux/bcm63xx/patches-5.4/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch +++ b/target/linux/bcm63xx/patches-5.4/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch @@ -79,7 +79,7 @@ Signed-off-by: Jonas Gorski if (val & STRAPBUS_6328_BOOT_SEL_SERIAL) return BCM63XX_FLASH_TYPE_SERIAL; else -@@ -94,12 +138,20 @@ static int __init bcm63xx_detect_flash_t +@@ -94,18 +138,31 @@ static int __init bcm63xx_detect_flash_t return BCM63XX_FLASH_TYPE_SERIAL; case BCM6362_CPU_ID: val = bcm_misc_readl(MISC_STRAPBUS_6362_REG); @@ -92,16 +92,6 @@ Signed-off-by: Jonas Gorski return BCM63XX_FLASH_TYPE_SERIAL; else return BCM63XX_FLASH_TYPE_NAND; - case BCM6368_CPU_ID: - val = bcm_gpio_readl(GPIO_STRAPBUS_REG); -+ if (val & STRAPBUS_6368_SPI_CLK_FAST) -+ bcm63xx_spi_flash_info[0].max_speed_hz = 20000000; -+ - switch (val & STRAPBUS_6368_BOOT_SEL_MASK) { - case STRAPBUS_6368_BOOT_SEL_NAND: - return BCM63XX_FLASH_TYPE_NAND; -@@ -110,6 +162,11 @@ static int __init bcm63xx_detect_flash_t - } case BCM63268_CPU_ID: val = bcm_misc_readl(MISC_STRAPBUS_63268_REG); + if (val & STRAPBUS_63268_HSSPI_CLK_FAST) @@ -112,7 +102,16 @@ Signed-off-by: Jonas Gorski if (val & STRAPBUS_63268_BOOT_SEL_SERIAL) return BCM63XX_FLASH_TYPE_SERIAL; else -@@ -176,6 +233,7 @@ void __init bcm63xx_flash_detect(void) + return BCM63XX_FLASH_TYPE_NAND; + case BCM6368_CPU_ID: + val = bcm_gpio_readl(GPIO_STRAPBUS_REG); ++ if (val & STRAPBUS_6368_SPI_CLK_FAST) ++ bcm63xx_spi_flash_info[0].max_speed_hz = 20000000; ++ + switch (val & STRAPBUS_6368_BOOT_SEL_MASK) { + case STRAPBUS_6368_BOOT_SEL_NAND: + return BCM63XX_FLASH_TYPE_NAND; +@@ -177,6 +234,7 @@ void __init bcm63xx_flash_detect(void) int __init bcm63xx_flash_register(void) { @@ -120,7 +119,7 @@ Signed-off-by: Jonas Gorski u32 val; switch (flash_type) { -@@ -195,8 +253,14 @@ int __init bcm63xx_flash_register(void) +@@ -196,8 +254,14 @@ int __init bcm63xx_flash_register(void) return platform_device_register(&mtd_dev); case BCM63XX_FLASH_TYPE_SERIAL: diff --git a/target/linux/bcm63xx/patches-5.4/415-MIPS-BCM63XX-export-the-attached-flash-type.patch b/target/linux/bcm63xx/patches-5.4/415-MIPS-BCM63XX-export-the-attached-flash-type.patch index 9fbfae4a06..729430325a 100644 --- a/target/linux/bcm63xx/patches-5.4/415-MIPS-BCM63XX-export-the-attached-flash-type.patch +++ b/target/linux/bcm63xx/patches-5.4/415-MIPS-BCM63XX-export-the-attached-flash-type.patch @@ -11,7 +11,7 @@ Signed-off-by: Jonas Gorski --- a/arch/mips/bcm63xx/dev-flash.c +++ b/arch/mips/bcm63xx/dev-flash.c -@@ -270,3 +270,8 @@ int __init bcm63xx_flash_register(void) +@@ -271,3 +271,8 @@ int __init bcm63xx_flash_register(void) return -ENODEV; } } diff --git a/target/linux/bcm63xx/patches-5.4/423-bcm63xx_enet_add_b53_support.patch b/target/linux/bcm63xx/patches-5.4/423-bcm63xx_enet_add_b53_support.patch index 3f093cf65c..490b59c3f8 100644 --- a/target/linux/bcm63xx/patches-5.4/423-bcm63xx_enet_add_b53_support.patch +++ b/target/linux/bcm63xx/patches-5.4/423-bcm63xx_enet_add_b53_support.patch @@ -12,7 +12,7 @@ spinlock_t enetsw_mdio_lock; --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -30,6 +30,7 @@ +@@ -17,6 +17,7 @@ #include #include #include @@ -20,7 +20,7 @@ #include #include "bcm63xx_enet.h" -@@ -1932,7 +1933,8 @@ static int bcm_enet_remove(struct platfo +@@ -1909,7 +1910,8 @@ static int bcm_enet_remove(struct platfo return 0; } @@ -30,7 +30,7 @@ .probe = bcm_enet_probe, .remove = bcm_enet_remove, .driver = { -@@ -1941,6 +1943,42 @@ struct platform_driver bcm63xx_enet_driv +@@ -1918,6 +1920,42 @@ struct platform_driver bcm63xx_enet_driv }, }; @@ -73,7 +73,7 @@ /* * switch mii access callbacks */ -@@ -2197,29 +2235,6 @@ static int bcm_enetsw_open(struct net_de +@@ -2174,29 +2212,6 @@ static int bcm_enetsw_open(struct net_de enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i)); } @@ -103,7 +103,7 @@ /* initialize flow control buffer allocation */ enet_dma_writel(priv, ENETDMA_BUFALLOC_FORCE_MASK | 0, ENETDMA_BUFALLOC_REG(priv->rx_chan)); -@@ -2675,6 +2690,9 @@ static int bcm_enetsw_probe(struct platf +@@ -2652,6 +2667,9 @@ static int bcm_enetsw_probe(struct platf struct bcm63xx_enetsw_platform_data *pd; struct resource *res_mem; int ret, irq_rx, irq_tx; @@ -113,7 +113,7 @@ if (!bcm_enet_shared_base[0]) return -EPROBE_DEFER; -@@ -2755,6 +2773,43 @@ static int bcm_enetsw_probe(struct platf +@@ -2731,6 +2749,43 @@ static int bcm_enetsw_probe(struct platf priv->pdev = pdev; priv->net_dev = dev; @@ -157,7 +157,7 @@ return 0; out_disable_clk: -@@ -2776,6 +2831,9 @@ static int bcm_enetsw_remove(struct plat +@@ -2752,6 +2807,9 @@ static int bcm_enetsw_remove(struct plat priv = netdev_priv(dev); unregister_netdev(dev); diff --git a/target/linux/bcm63xx/patches-5.4/424-bcm63xx_enet_no_request_mem_region.patch b/target/linux/bcm63xx/patches-5.4/424-bcm63xx_enet_no_request_mem_region.patch index e956deac1a..240525083c 100644 --- a/target/linux/bcm63xx/patches-5.4/424-bcm63xx_enet_no_request_mem_region.patch +++ b/target/linux/bcm63xx/patches-5.4/424-bcm63xx_enet_no_request_mem_region.patch @@ -1,6 +1,6 @@ --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -2734,9 +2734,9 @@ static int bcm_enetsw_probe(struct platf +@@ -2710,9 +2710,9 @@ static int bcm_enetsw_probe(struct platf if (ret) goto out; diff --git a/target/linux/bcm63xx/patches-5.4/511-board_V2500V.patch b/target/linux/bcm63xx/patches-5.4/511-board_V2500V.patch index c77eb00bff..e2a10846e0 100644 --- a/target/linux/bcm63xx/patches-5.4/511-board_V2500V.patch +++ b/target/linux/bcm63xx/patches-5.4/511-board_V2500V.patch @@ -76,7 +76,7 @@ #include #include #include -@@ -247,6 +248,13 @@ int __init bcm63xx_flash_register(void) +@@ -248,6 +249,13 @@ int __init bcm63xx_flash_register(void) val = bcm_mpi_readl(MPI_CSBASE_REG(0)); val &= MPI_CSBASE_BASE_MASK; diff --git a/target/linux/bcm63xx/patches-5.4/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch b/target/linux/bcm63xx/patches-5.4/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch index 53ea56b496..24815782d1 100644 --- a/target/linux/bcm63xx/patches-5.4/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch +++ b/target/linux/bcm63xx/patches-5.4/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch @@ -27,7 +27,8 @@ Subject: [PATCH] MIPS: BCM63XX: add inventel Livebox support endmenu --- a/arch/mips/bcm63xx/boards/Makefile +++ b/arch/mips/bcm63xx/boards/Makefile -@@ -1,2 +1,3 @@ +@@ -1,3 +1,4 @@ + # SPDX-License-Identifier: GPL-2.0-only obj-y += board_common.o obj-$(CONFIG_BOARD_BCM963XX) += board_bcm963xx.o +obj-$(CONFIG_BOARD_LIVEBOX) += board_livebox.o diff --git a/target/linux/bcm63xx/patches-5.4/800-wl_exports.patch b/target/linux/bcm63xx/patches-5.4/800-wl_exports.patch index a2f1f26464..7600a70c84 100644 --- a/target/linux/bcm63xx/patches-5.4/800-wl_exports.patch +++ b/target/linux/bcm63xx/patches-5.4/800-wl_exports.patch @@ -15,11 +15,13 @@ u32 crc, expected_crc; --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c -@@ -64,6 +64,7 @@ void (*_dma_cache_wback)(unsigned long s +@@ -62,6 +62,9 @@ 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); - EXPORT_SYMBOL(_dma_cache_wback_inv); ++EXPORT_SYMBOL(_dma_cache_wback_inv); +EXPORT_SYMBOL(_dma_cache_inv); - ++ #endif /* CONFIG_DMA_NONCOHERENT */ + /* diff --git a/target/linux/bcm63xx/patches-5.4/804-bcm63xx_enet_63268_rgmii_ports.patch b/target/linux/bcm63xx/patches-5.4/804-bcm63xx_enet_63268_rgmii_ports.patch index 683221d76e..c271436b3c 100644 --- a/target/linux/bcm63xx/patches-5.4/804-bcm63xx_enet_63268_rgmii_ports.patch +++ b/target/linux/bcm63xx/patches-5.4/804-bcm63xx_enet_63268_rgmii_ports.patch @@ -1,6 +1,6 @@ --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -2232,6 +2232,10 @@ static int bcm_enetsw_open(struct net_de +@@ -2209,6 +2209,10 @@ static int bcm_enetsw_open(struct net_de rgmii_ctrl = enetsw_readb(priv, ENETSW_RGMII_CTRL_REG(i)); rgmii_ctrl |= ENETSW_RGMII_CTRL_GMII_CLK_EN;