bcm63xx: refresh patches for kernel 5.4
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Fri, 3 Apr 2020 13:28:10 +0000 (15:28 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 12 Apr 2020 10:36:43 +0000 (12:36 +0200)
Refresh patches to make them apply to kernel 5.4.

The removed patches have been merged upstream.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
39 files changed:
target/linux/bcm63xx/patches-5.4/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch
target/linux/bcm63xx/patches-5.4/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch
target/linux/bcm63xx/patches-5.4/121-mtd-bcm63xxpart-move-imagetag-parsing-to-its-own-par.patch [deleted file]
target/linux/bcm63xx/patches-5.4/122-mtd-bcm63xxpart-add-of_match_table.patch [deleted file]
target/linux/bcm63xx/patches-5.4/123-mtd-parser_bcm63xx_imagetag-add-of_match_table-suppo.patch [deleted file]
target/linux/bcm63xx/patches-5.4/130-pinctrl-add-bcm63xx-base-code.patch
target/linux/bcm63xx/patches-5.4/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch
target/linux/bcm63xx/patches-5.4/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch
target/linux/bcm63xx/patches-5.4/311-bcm63xxpart_use_cfedetection.patch
target/linux/bcm63xx/patches-5.4/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch
target/linux/bcm63xx/patches-5.4/321-irqchip-add-support-for-bcm6345-style-external-inter.patch
target/linux/bcm63xx/patches-5.4/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch
target/linux/bcm63xx/patches-5.4/339-MIPS-BCM63XX-add-support-for-BCM63268.patch
target/linux/bcm63xx/patches-5.4/341-MIPS-BCM63XX-add-support-for-BCM6318.patch
target/linux/bcm63xx/patches-5.4/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch
target/linux/bcm63xx/patches-5.4/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch
target/linux/bcm63xx/patches-5.4/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch
target/linux/bcm63xx/patches-5.4/347-MIPS-BCM6318-USB-support.patch
target/linux/bcm63xx/patches-5.4/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch
target/linux/bcm63xx/patches-5.4/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch
target/linux/bcm63xx/patches-5.4/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch
target/linux/bcm63xx/patches-5.4/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch
target/linux/bcm63xx/patches-5.4/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch
target/linux/bcm63xx/patches-5.4/372_dont_register_pflash_when_available_in_dtb.patch
target/linux/bcm63xx/patches-5.4/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch
target/linux/bcm63xx/patches-5.4/383-bcm63xx_select_pinctrl.patch
target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch
target/linux/bcm63xx/patches-5.4/401-bcm963xx_real_rootfs_length.patch
target/linux/bcm63xx/patches-5.4/402_bcm63xx_enet_vlan_incoming_fixed.patch
target/linux/bcm63xx/patches-5.4/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch
target/linux/bcm63xx/patches-5.4/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch
target/linux/bcm63xx/patches-5.4/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch
target/linux/bcm63xx/patches-5.4/415-MIPS-BCM63XX-export-the-attached-flash-type.patch
target/linux/bcm63xx/patches-5.4/423-bcm63xx_enet_add_b53_support.patch
target/linux/bcm63xx/patches-5.4/424-bcm63xx_enet_no_request_mem_region.patch
target/linux/bcm63xx/patches-5.4/511-board_V2500V.patch
target/linux/bcm63xx/patches-5.4/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch
target/linux/bcm63xx/patches-5.4/800-wl_exports.patch
target/linux/bcm63xx/patches-5.4/804-bcm63xx_enet_63268_rgmii_ports.patch

index 64ea4731a1598c69258c8539491357938bf23eb6..ec90909d13bf4c5379f4fa850e3a19ad6c72a981 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
 +++ 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 <florian@openwrt.org>
  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 <florian@openwrt.org>
 @@ -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
  
index f7311a8f832d2ddd1dc6f51f720200a0eb6bee91..fed826c4cd14f60196047a5bf4710608edef9c0b 100644 (file)
@@ -32,7 +32,7 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
  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 <florian@openwrt.org>
        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 (file)
index 6fd5cbb..0000000
+++ /dev/null
@@ -1,482 +0,0 @@
-From a2b8c7f648e168573905818dbb4cb90ca3957c65 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-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 <jonas.gorski@gmail.com>
----
-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 <florian@openwrt.org>
-+ *                      Mike Albon <malbon@openwrt.org>
-+ * Copyright Â© 2009-2010  Daniel Dickinson <openwrt@cshore.neomailbox.net>
-+ * Copyright Â© 2011-2013  Jonas Gorski <jonas.gorski@gmail.com>
-+ *
-+ * 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 <linux/bcm963xx_tag.h>
-+#include <linux/crc32.h>
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/sizes.h>
-+#include <linux/slab.h>
-+#include <linux/vmalloc.h>
-+#include <linux/mtd/mtd.h>
-+#include <linux/mtd/partitions.h>
-+
-+/* 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 <openwrt@cshore.neomailbox.net>");
-+MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>");
-+MODULE_AUTHOR("Mike Albon <malbon@openwrt.org>");
-+MODULE_AUTHOR("Jonas Gorski <jonas.gorski@gmail.com");
-+MODULE_DESCRIPTION("MTD parser for BCM963XX CFE Image Tag partitions");
diff --git a/target/linux/bcm63xx/patches-5.4/122-mtd-bcm63xxpart-add-of_match_table.patch b/target/linux/bcm63xx/patches-5.4/122-mtd-bcm63xxpart-add-of_match_table.patch
deleted file mode 100644 (file)
index 9b3f2c4..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-From 89cd5efa4a0d342b860a726bb1d382e4db4b96a4 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Wed, 28 Jun 2017 18:34:42 +0200
-Subject: [PATCH 1/2] mtd: bcm63xxpart: add of_match_table
-
-Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
----
- 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 <linux/vmalloc.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/partitions.h>
-+#include <linux/of.h>
- #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 (file)
index 04978b3..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-From 3303dd9f5b197cc2efd9cbd7b9b45fc1e510a393 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-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 <jonas.gorski@gmail.com>
----
- 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 <linux/vmalloc.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/partitions.h>
-+#include <linux/of.h>
- /* 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);
index 19ea476ca5016f070e8e74735be4a1f1d177642d..559ec94c2e190417bf9716d0f2679d1e10b4b680 100644 (file)
@@ -21,7 +21,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
 
 --- 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 <jonas.gorski@gmail.com>
  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/
index 13225beae62b017ce0e8a1918a623067a3e11859..ea836b8a806d71db256e83a9e89f957ee4e6aa4a 100644 (file)
@@ -29,7 +29,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
 
 --- 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 <jonas.gorski@gmail.com>
  {
        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 <jonas.gorski@gmail.com>
  
        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 <jonas.gorski@gmail.com>
                        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 <jonas.gorski@gmail.com>
  }
  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 <jonas.gorski@gmail.com>
  }
  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 <jonas.gorski@gmail.com>
 +{
 +      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;
index 90b1640d16af4fde42e184bb355d02b336b175f9..652eb6c9bfa13670469ff9b8383a1a64a5b7275e 100644 (file)
@@ -19,7 +19,8 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 
 --- 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
index bca6adbf3c21e0af629b1dc35ac63bbf688b51b2..19ed994b850c9588cb0ef3015a9ec690799a3e88 100644 (file)
@@ -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 <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
  #include <linux/of.h>
@@ -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;
  
index b75987ef354af0a49c72f47fe4087a7b8572ffca..00bbadcb95b9f7cf1327c4731de4dfc972ce9ee6 100644 (file)
@@ -71,7 +71,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 +};
 --- 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 <jogo@openwrt.org>
        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
index 4db80ef53321d3ef5ffbb889d4f8b3ee59703a4c..9c265ade909cf2c648150a9b613d98d9083df0f8 100644 (file)
@@ -50,7 +50,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 +};
 --- 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 <jogo@openwrt.org>
        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
index f0ffc654f796c4ad31cad876fc749ba7d7201e67..ec978a031d22ee33c88557071e80c7eaea8e78ba 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 
 --- 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
index 54ec472326100b6d55204a6aa56017232fe62d1c..efd5f10534d126bb0676c9659ae6e2daf6de0098 100644 (file)
@@ -22,14 +22,14 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 --- 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 <jogo@openwrt.org>
                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)
index b6119e91e4538ec59c885d10a64ff95650221690..5f4c900813cf97ea5023fc6c407b5dfd63940cdf 100644 (file)
@@ -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"
index 3d9835df2c70050be0a4310f90958eae13a673e3..1ebb451b59e3fe744cea0beb67b83255d1e1ba85 100644 (file)
@@ -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;
  
index 298fffdfa171e097fe4b0f54944cdc0bb0f10eb8..cbe095c038dc452dd6b1e9e04d6a9e6f90543fae 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  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
        }
  }
  
index 329a156fe11d7d9f56d52c3a69172c2a0f3a0acc..91dae6e3d8eab96ac0010d2576ede61c596d8955 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  
  #include <bcm63xx_cpu.h>
  #include <bcm63xx_dev_flash.h>
-@@ -110,9 +111,59 @@ static int __init bcm63xx_detect_flash_t
+@@ -111,9 +112,59 @@ static int __init bcm63xx_detect_flash_t
        }
  }
  
index 92c37c130f2d32d90e412e55b4a846a36053dbf0..15d4679670ee6e4d9c4af6a9fdca9129ea1aa788 100644 (file)
 @@ -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
  
index 41f48b93da1d5be9403377840da08361f2cd38fe..3f98ddfdc36eac309dffa0636ee8fb2fd45b5945 100644 (file)
@@ -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
index deca2260f1f94ad4f9ff6bceb292156a94426ab2..51908d99d2ccc089925ec9644b6ab8fa43bef28d 100644 (file)
@@ -27,7 +27,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 -      default BOARD_BCM963XX
  
  config BOARD_BCM963XX
-        bool "Generic Broadcom 963xx boards"
+       bool "Generic Broadcom 963xx boards"
        select SSB
 +      default y
  
index 846f0b81dfb8c7d34e254ea4505ef58fa057f3be..bf1c4a2842d4df1f33550f619365dfa3d8865f14 100644 (file)
@@ -27,7 +27,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  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:
index 11153c1b19fdb76cfd47a55874570246b532a249..24ae8c35c70c3e203dd896ffd3fd3ca4e0f9331e 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 +++ 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
index a49181640cc255c87be4225277bb3baacdbe2f1a..fee5f769b1500b7c0c40cfc6ce04cb25a8b52218 100644 (file)
@@ -21,7 +21,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 +      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 <jogo@openwrt.org>
 @@ -8,6 +8,7 @@
  
  #include <linux/init.h>
- #include <linux/bootmem.h>
+ #include <linux/memblock.h>
 +#include <linux/of_fdt.h>
  #include <linux/smp.h>
  #include <asm/bootinfo.h>
index 25384ebb68d3381d19504211df7b33462bfef79a..af0800f5aa1aebabb7e8f85822237e5113b62592 100644 (file)
@@ -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:
index 6307d5640765848fe94d942ec38bf5f47c6a07d2..56317410c103baaef3bfdaeb12ce254270634cb4 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 
 --- 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 <jogo@openwrt.org>
        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 @@
index 67c8cee22cd1b6a834172b38568f7af45cf426e2..cf655f55ccebcf17f3f193d14ab85529aaf01c1e 100644 (file)
@@ -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
index c693ace36324587bc76f49a617b738758b3be5cd..b80f096413b326bdaf1edbb9d8bb5ec65d6336cf 100644 (file)
@@ -21,9 +21,9 @@ Signed-off-by: Axel Gembe <ago@bastart.eu.org>
  
  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 <ago@bastart.eu.org>
  #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 <ago@bastart.eu.org>
        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];
index efefba41b5022935a5cf982b0d94f72c06ff5aef..e92ec2d94c1e664dd46437b8359bf4f012a8c2bf 100644 (file)
@@ -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;
index c3b5778e0a396eac8ee9edbbb1cf0d290788e58e..389e3f71bb838dac46c46944765c331ab3be12cd 100644 (file)
@@ -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 */
index e30bd5b107cc7775446adbf676f18c04d0f8c00c..11059b3bb01ebeb3d62aed2d1f1115a63719f322 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
 
 --- 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 <jonas.gorski@gmail.com>
        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 <jonas.gorski@gmail.com>
 -              }
 -
 -              /* 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 <jonas.gorski@gmail.com>
        }
  
        /* 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 <jonas.gorski@gmail.com>
  
        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 <jonas.gorski@gmail.com>
        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 <jonas.gorski@gmail.com>
        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 <jonas.gorski@gmail.com>
        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 <jonas.gorski@gmail.com>
                }
  
                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 <jonas.gorski@gmail.com>
 +              }
 +
 +              /* 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 <jonas.gorski@gmail.com>
        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 <jonas.gorski@gmail.com>
  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) {
index 86940ae14d92b168688e23cf872fc91afd3c62c5..703b83a89759379330aa5aed0ff4fc8dab13a07c 100644 (file)
@@ -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;
        }
  
index a91494db416eb4c2d2a170883266e9dba00b366e..7912c26696508b78626e6f4a767ee97dd522860a 100644 (file)
@@ -79,7 +79,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
                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 <jonas.gorski@gmail.com>
                        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 <jonas.gorski@gmail.com>
                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 <jonas.gorski@gmail.com>
        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:
index 9fbfae4a06e57f8344e64d1f91098a2c6c4684ae..729430325aa66c12a9566849668b0898ab29c47d 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 
 --- 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;
        }
  }
index 3f093cf65c158acaec0935fc6d0c27f2beb1ff93..490b59c3f8fa6685a28c2f76b4ed55dd832ea12d 100644 (file)
@@ -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 <linux/dma-mapping.h>
  #include <linux/platform_device.h>
  #include <linux/if_vlan.h>
@@ -20,7 +20,7 @@
  
  #include <bcm63xx_dev_enet.h>
  #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));
        }
  
        /* 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;
  
        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;
  
        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);
  
index e956deac1ae6d1a5ae734a968dbe48afb37f3bc8..240525083cb2439bdb46a945ab21c422b6238c20 100644 (file)
@@ -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;
  
index c77eb00bffbf11f466b9cfe0807c9d8381fab2af..e2a10846e0f59c7e2803c1bbae6e98cdc77ce965 100644 (file)
@@ -76,7 +76,7 @@
  #include <bcm63xx_cpu.h>
  #include <bcm63xx_dev_flash.h>
  #include <bcm63xx_regs.h>
-@@ -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;
  
index 53ea56b4964a23e32868afdbf371a73b30d98956..24815782d1c870baee39ea452b486f6de37f659a 100644 (file)
@@ -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
index a2f1f26464ea237c848ce30418fb35e7cc0abc62..7600a70c846f6252728aa9bca58d2d4715401aee 100644 (file)
        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 */
  
+ /*
index 683221d76e16ce09572592eb56b35226d7f3251b..c271436b3c3817404c5d98ac5b70feba93fc10c3 100644 (file)
@@ -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;