[brcm63xx] renumber board patches
authorFlorian Fainelli <florian@openwrt.org>
Thu, 26 May 2011 12:09:15 +0000 (12:09 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 26 May 2011 12:09:15 +0000 (12:09 +0000)
SVN-Revision: 27012

20 files changed:
target/linux/brcm63xx/patches-2.6.37/170-board_livebox.patch [deleted file]
target/linux/brcm63xx/patches-2.6.37/210-no_ehci_over_current_check.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-2.6.37/220-board-D4PW.patch [deleted file]
target/linux/brcm63xx/patches-2.6.37/220-wl_exports.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-2.6.37/221-board-NB4.patch [deleted file]
target/linux/brcm63xx/patches-2.6.37/230-6358-enet1-external-mii-clk.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-2.6.37/240-spi.patch
target/linux/brcm63xx/patches-2.6.37/250-6358-enet1-external-mii-clk.patch [deleted file]
target/linux/brcm63xx/patches-2.6.37/250-board-D4PW.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-2.6.37/260-board-NB4.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-2.6.37/260-no_ehci_over_current_check.patch [deleted file]
target/linux/brcm63xx/patches-2.6.37/270-board-96338W2_E7T.patch
target/linux/brcm63xx/patches-2.6.37/300-wl_exports.patch [deleted file]
target/linux/brcm63xx/patches-2.6.37/310-CPVA642_board.patch [deleted file]
target/linux/brcm63xx/patches-2.6.37/310-board-CPVA642.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-2.6.37/455-board_BTV2110.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-2.6.37/456-board_livebox.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-2.6.37/500-ssb-add-callback-for-sprom.patch
target/linux/brcm63xx/patches-2.6.37/977-ssb_export_fallback_sprom.patch
target/linux/brcm63xx/patches-2.6.37/980-board_BTV2110.patch [deleted file]

diff --git a/target/linux/brcm63xx/patches-2.6.37/170-board_livebox.patch b/target/linux/brcm63xx/patches-2.6.37/170-board_livebox.patch
deleted file mode 100644 (file)
index 6c39045..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
---- a/arch/mips/bcm63xx/boards/Kconfig
-+++ b/arch/mips/bcm63xx/boards/Kconfig
-@@ -8,4 +8,10 @@ config BOARD_BCM963XX
-       select SSB
-        help
-+config BOARD_LIVEBOX
-+      bool "Inventel Livebox(es) boards"
-+      select SSB
-+      help
-+       Inventel Livebox boards using the RedBoot bootloader.
-+
- endchoice
---- a/arch/mips/bcm63xx/boards/Makefile
-+++ b/arch/mips/bcm63xx/boards/Makefile
-@@ -1,3 +1,4 @@
- obj-$(CONFIG_BOARD_BCM963XX)          += board_bcm963xx.o
-+obj-$(CONFIG_BOARD_LIVEBOX)           += board_livebox.o
- EXTRA_CFLAGS += -Werror
---- /dev/null
-+++ b/arch/mips/bcm63xx/boards/board_livebox.c
-@@ -0,0 +1,228 @@
-+/*
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License.  See the file "COPYING" in the main directory of this archive
-+ * for more details.
-+ *
-+ * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org>
-+ */
-+
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/string.h>
-+#include <linux/platform_device.h>
-+#include <linux/mtd/mtd.h>
-+#include <linux/mtd/partitions.h>
-+#include <linux/mtd/physmap.h>
-+#include <linux/input.h>
-+#include <linux/gpio_buttons.h>
-+#include <asm/addrspace.h>
-+#include <bcm63xx_board.h>
-+#include <bcm63xx_cpu.h>
-+#include <bcm63xx_regs.h>
-+#include <bcm63xx_io.h>
-+#include <bcm63xx_dev_uart.h>
-+#include <bcm63xx_dev_pci.h>
-+#include <bcm63xx_dev_enet.h>
-+#include <bcm63xx_dev_pcmcia.h>
-+#include <bcm63xx_dev_usb_ohci.h>
-+#include <bcm63xx_dev_usb_ehci.h>
-+#include <board_bcm963xx.h>
-+
-+#define PFX   "board_livebox: "
-+
-+static unsigned int mac_addr_used = 0;
-+static struct board_info board;
-+
-+/*
-+ * known 6348 boards
-+ */
-+#ifdef CONFIG_BCM63XX_CPU_6348
-+static struct board_info __initdata board_livebox = {
-+      .name                           = "Livebox",
-+      .expected_cpu_id                = 0x6348,
-+
-+      .has_uart0                      = 1,
-+      .has_enet0                      = 1,
-+      .has_enet1                      = 1,
-+      .has_pci                        = 1,
-+
-+      .enet0 = {
-+              .has_phy                = 1,
-+              .use_internal_phy       = 1,
-+      },
-+
-+      .enet1 = {
-+              .force_speed_100        = 1,
-+              .force_duplex_full      = 1,
-+      },
-+
-+      .has_ohci0                      = 1,
-+      .has_pccard                     = 1,
-+      .has_ehci0                      = 1,
-+};
-+#endif
-+
-+/*
-+ * all boards
-+ */
-+static const struct board_info __initdata *bcm963xx_boards[] = {
-+#ifdef CONFIG_BCM63XX_CPU_6348
-+      &board_livebox
-+#endif
-+};
-+
-+/*
-+ * early init callback
-+ */
-+void __init board_prom_init(void)
-+{
-+      u32 val;
-+
-+      /* read base address of boot chip select (0) */
-+      val = bcm_mpi_readl(MPI_CSBASE_REG(0));
-+      val &= MPI_CSBASE_BASE_MASK;
-+
-+      /* assume board is a Livebox */
-+      memcpy(&board, bcm963xx_boards[0], sizeof(board));
-+
-+      /* setup pin multiplexing depending on board enabled device,
-+       * this has to be done this early since PCI init is done
-+       * inside arch_initcall */
-+      val = 0;
-+
-+      if (board.has_pci) {
-+              bcm63xx_pci_enabled = 1;
-+              if (BCMCPU_IS_6348())
-+                      val |= GPIO_MODE_6348_G2_PCI;
-+      }
-+
-+      if (board.has_pccard) {
-+              if (BCMCPU_IS_6348())
-+                      val |= GPIO_MODE_6348_G1_MII_PCCARD;
-+      }
-+
-+      if (board.has_enet0 && !board.enet0.use_internal_phy) {
-+              if (BCMCPU_IS_6348())
-+                      val |= GPIO_MODE_6348_G3_EXT_MII |
-+                              GPIO_MODE_6348_G0_EXT_MII;
-+      }
-+
-+      if (board.has_enet1 && !board.enet1.use_internal_phy) {
-+              if (BCMCPU_IS_6348())
-+                      val |= GPIO_MODE_6348_G3_EXT_MII |
-+                              GPIO_MODE_6348_G0_EXT_MII;
-+      }
-+
-+      bcm_gpio_writel(val, GPIO_MODE_REG);
-+}
-+
-+/*
-+ * second stage init callback, good time to panic if we couldn't
-+ * identify on which board we're running since early printk is working
-+ */
-+void __init board_setup(void)
-+{
-+      if (!board.name[0])
-+              panic("unable to detect bcm963xx board");
-+      printk(KERN_INFO PFX "board name: %s\n", board.name);
-+
-+      /* make sure we're running on expected cpu */
-+      if (bcm63xx_get_cpu_id() != board.expected_cpu_id)
-+              panic("unexpected CPU for bcm963xx board");
-+}
-+
-+/*
-+ * return board name for /proc/cpuinfo
-+ */
-+const char *board_get_name(void)
-+{
-+      return board.name;
-+}
-+
-+/*
-+ * register & return a new board mac address
-+ */
-+
-+static int board_get_mac_address(u8 *mac)
-+{
-+      u8 default_mac[ETH_ALEN] = {0x00, 0x07, 0x3A, 0x00, 0x00, 0x00};
-+      u8 *p;
-+      int count;
-+
-+      memcpy(mac, default_mac, ETH_ALEN);
-+
-+      p = mac + ETH_ALEN - 1;
-+      count = mac_addr_used;
-+
-+      while (count--) {
-+              do {
-+                      (*p)++;
-+                      if (*p != 0)
-+                              break;
-+                      p--;
-+              } while (p != mac);
-+      }
-+
-+      if (p == mac) {
-+              printk(KERN_ERR PFX "unable to fetch mac address\n");
-+              return -ENODEV;
-+      }
-+        mac_addr_used++;
-+
-+      return 0;
-+}
-+
-+static struct resource mtd_resources[] = {
-+      {
-+              .start          = 0,    /* filled at runtime */
-+              .end            = 0,    /* filled at runtime */
-+              .flags          = IORESOURCE_MEM,
-+      }
-+};
-+
-+static struct platform_device mtd_dev = {
-+      .name                   = "bcm963xx-flash",
-+      .resource               = mtd_resources,
-+      .num_resources          = ARRAY_SIZE(mtd_resources),
-+};
-+
-+
-+/*
-+ * third stage init callback, register all board devices.
-+ */
-+int __init board_register_devices(void)
-+{
-+      u32 val;
-+
-+      if (board.has_uart0)
-+              bcm63xx_uart_register(0);
-+
-+      if (board.has_pccard)
-+              bcm63xx_pcmcia_register();
-+
-+      if (board.has_enet0 &&
-+          !board_get_mac_address(board.enet0.mac_addr))
-+              bcm63xx_enet_register(0, &board.enet0);
-+
-+      if (board.has_enet1 &&
-+          !board_get_mac_address(board.enet1.mac_addr))
-+              bcm63xx_enet_register(1, &board.enet1);
-+
-+      if (board.has_ohci0)
-+              bcm63xx_ohci_register();
-+
-+      if (board.has_ehci0)
-+              bcm63xx_ehci_register();
-+
-+
-+      /* read base address of boot chip select (0) */
-+      val = bcm_mpi_readl(MPI_CSBASE_REG(0));
-+      val &= MPI_CSBASE_BASE_MASK;
-+      mtd_resources[0].start = val;
-+      mtd_resources[0].end = 0x1FFFFFFF;
-+
-+      platform_device_register(&mtd_dev);
-+
-+      return 0;
-+}
-+
diff --git a/target/linux/brcm63xx/patches-2.6.37/210-no_ehci_over_current_check.patch b/target/linux/brcm63xx/patches-2.6.37/210-no_ehci_over_current_check.patch
new file mode 100644 (file)
index 0000000..513ff99
--- /dev/null
@@ -0,0 +1,16 @@
+--- a/drivers/usb/host/ehci-hub.c
++++ b/drivers/usb/host/ehci-hub.c
+@@ -882,11 +882,13 @@ static int ehci_hub_control (
+                        * power switching; they're allowed to just limit the
+                        * current.  khubd will turn the power back on.
+                        */
++#ifndef CONFIG_BCM63XX
+                       if (HCS_PPC (ehci->hcs_params)){
+                               ehci_writel(ehci,
+                                       temp & ~(PORT_RWC_BITS | PORT_POWER),
+                                       status_reg);
+                       }
++#endif
+               }
+               /* whoever resumes must GetPortStatus to complete it!! */
diff --git a/target/linux/brcm63xx/patches-2.6.37/220-board-D4PW.patch b/target/linux/brcm63xx/patches-2.6.37/220-board-D4PW.patch
deleted file mode 100644 (file)
index 1e630d1..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -464,6 +464,49 @@ static struct board_info __initdata boar
-       .has_ohci0 = 1,
- };
-+
-+static struct board_info __initdata board_96348_D4PW = {
-+      .name                           = "D-4P-W",
-+      .expected_cpu_id                = 0x6348,
-+
-+      .has_enet0                      = 1,
-+      .has_enet1                      = 1,
-+      .has_pci                        = 1,
-+
-+      .enet0 = {
-+              .has_phy                = 1,
-+              .use_internal_phy       = 1,
-+      },
-+      .enet1 = {
-+              .force_speed_100        = 1,
-+              .force_duplex_full      = 1,
-+      },
-+
-+      .has_ohci0                      = 1,
-+      .has_ehci0                      = 1,
-+
-+      .leds = {
-+              {
-+                      .name           = "ppp",
-+                      .gpio           = 4,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "ppp-fail",
-+                      .gpio           = 5,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "power",
-+                      .gpio           = 0,
-+                      .active_low     = 1,
-+                      .default_trigger = "default-on",
-+
-+              },
-+      },
-+
-+};
-+
- #endif
- /*
-@@ -728,6 +771,7 @@ static const struct board_info __initdat
-       &board_DV201AMR,
-       &board_96348gw_a,
-       &board_rta1025w_16,
-+      &board_96348_D4PW,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6358
diff --git a/target/linux/brcm63xx/patches-2.6.37/220-wl_exports.patch b/target/linux/brcm63xx/patches-2.6.37/220-wl_exports.patch
new file mode 100644 (file)
index 0000000..fcd5c64
--- /dev/null
@@ -0,0 +1,34 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -39,6 +39,13 @@ static unsigned int mac_addr_used;
+ static struct board_info board;
+ /*
++ * Required export for WL
++ */
++#define NVRAM_SPACE 0x8000
++char nvram_buf[NVRAM_SPACE];
++EXPORT_SYMBOL(nvram_buf);
++
++/*
+  * known 6338 boards
+  */
+ #ifdef CONFIG_BCM63XX_CPU_6338
+@@ -840,6 +847,7 @@ void __init board_prom_init(void)
+       /* extract nvram data */
+       memcpy(&nvram, boot_addr + BCM963XX_NVRAM_OFFSET, sizeof(nvram));
++      memcpy(&nvram_buf, boot_addr + BCM963XX_NVRAM_OFFSET, NVRAM_SPACE);
+       /* check checksum before using data */
+       if (nvram.version <= 4)
+--- a/arch/mips/mm/cache.c
++++ b/arch/mips/mm/cache.c
+@@ -52,6 +52,7 @@ void (*_dma_cache_wback)(unsigned long s
+ void (*_dma_cache_inv)(unsigned long start, unsigned long size);
+ EXPORT_SYMBOL(_dma_cache_wback_inv);
++EXPORT_SYMBOL(_dma_cache_inv);
+ #endif /* CONFIG_DMA_NONCOHERENT */
diff --git a/target/linux/brcm63xx/patches-2.6.37/221-board-NB4.patch b/target/linux/brcm63xx/patches-2.6.37/221-board-NB4.patch
deleted file mode 100644 (file)
index c2d1056..0000000
+++ /dev/null
@@ -1,569 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -17,6 +17,9 @@
- #include <linux/ssb/ssb.h>
- #include <linux/gpio_buttons.h>
- #include <linux/input.h>
-+#include <linux/spi/spi.h>
-+#include <linux/spi/spi_gpio.h>
-+#include <linux/spi/74x164.h>
- #include <asm/addrspace.h>
- #include <bcm63xx_board.h>
- #include <bcm63xx_cpu.h>
-@@ -34,6 +37,12 @@
- #define PFX   "board_bcm963xx: "
-+#define NB4_PID_OFFSET                0xff80
-+#define NB4_74X164_GPIO_BASE  64
-+#define NB4_SPI_GPIO_MOSI     7
-+#define NB4_SPI_GPIO_CLK      6
-+#define NB4_74HC64_GPIO(X)    (NB4_74X164_GPIO_BASE + (X))
-+
- static struct bcm963xx_nvram nvram;
- static unsigned int mac_addr_used;
- static struct board_info board;
-@@ -749,6 +758,502 @@ static struct board_info __initdata boar
-       .has_ohci0                      = 1,
- };
-+
-+struct spi_gpio_platform_data nb4_spi_gpio_data = {
-+      .sck            = NB4_SPI_GPIO_CLK,
-+      .mosi           = NB4_SPI_GPIO_MOSI,
-+      .miso           = SPI_GPIO_NO_MISO,
-+      .num_chipselect = 1,
-+};
-+
-+
-+static struct platform_device nb4_spi_gpio = {
-+      .name = "spi_gpio",
-+      .id   = 1,
-+      .dev = {
-+              .platform_data = &nb4_spi_gpio_data,
-+      },
-+};
-+
-+static struct platform_device * __initdata nb4_devices[] = {
-+      &nb4_spi_gpio,
-+};
-+
-+const struct gen_74x164_chip_platform_data nb4_74x164_platform_data = {
-+      .base = NB4_74X164_GPIO_BASE
-+};
-+
-+static struct spi_board_info nb4_spi_devices[] = {
-+      {
-+              .modalias = "74x164",
-+              .max_speed_hz = 781000,
-+              .bus_num = 1,
-+              .controller_data = (void *) SPI_GPIO_NO_CHIPSELECT,
-+              .mode = SPI_MODE_0,
-+              .platform_data = &nb4_74x164_platform_data
-+      }
-+};
-+
-+static struct board_info __initdata board_nb4_ser_r0 = {
-+      .name                           = "NB4-SER-r0",
-+      .expected_cpu_id                = 0x6358,
-+
-+      .has_uart0                      = 1,
-+      .has_enet0                      = 1,
-+      .has_enet1                      = 1,
-+      .has_pci                        = 1,
-+
-+      .enet0 = {
-+              .has_phy                = 1,
-+              .use_internal_phy       = 1,
-+      },
-+
-+      .enet1 = {
-+              .force_speed_100        = 1,
-+              .force_duplex_full      = 1,
-+      },
-+
-+
-+      .has_ohci0 = 1,
-+      .has_pccard = 1,
-+      .has_ehci0 = 1,
-+
-+      .has_udc0                       = 1,
-+
-+      .leds = {
-+              {
-+                      .name           = "adsl",
-+                      .gpio           = NB4_74HC64_GPIO(4),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "traffic",
-+                      .gpio           = 2,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "tel",
-+                      .gpio           = NB4_74HC64_GPIO(3),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "tv",
-+                      .gpio           = NB4_74HC64_GPIO(2),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "wifi",
-+                      .gpio           = 15,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "alarm",
-+                      .gpio           = NB4_74HC64_GPIO(0),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "service:red",
-+                      .gpio           = 29,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "service:green",
-+                      .gpio           = 30,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "service:blue",
-+                      .gpio           = 4,
-+                      .active_low     = 1,
-+              },
-+      },
-+      .buttons = {
-+              {
-+                      .desc           = "reset",
-+                      .gpio           = 34,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
-+              },
-+              {
-+                      .desc           = "wps",
-+                      .gpio           = 37,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
-+              },
-+      },
-+      .devs = nb4_devices,
-+      .num_devs = ARRAY_SIZE(nb4_devices),
-+      .spis = nb4_spi_devices,
-+      .num_spis = ARRAY_SIZE(nb4_spi_devices),
-+};
-+
-+static struct board_info __initdata board_nb4_ser_r1 = {
-+      .name                           = "NB4-SER-r1",
-+      .expected_cpu_id                = 0x6358,
-+
-+      .has_uart0                      = 1,
-+      .has_enet0                      = 1,
-+      .has_enet1                      = 1,
-+      .has_pci                        = 1,
-+
-+      .enet0 = {
-+              .has_phy                = 1,
-+              .use_internal_phy       = 1,
-+      },
-+
-+      .enet1 = {
-+              .force_speed_100        = 1,
-+              .force_duplex_full      = 1,
-+      },
-+
-+
-+      .has_ohci0 = 1,
-+      .has_pccard = 1,
-+      .has_ehci0 = 1,
-+
-+      .has_udc0                       = 1,
-+
-+      .leds = {
-+              {
-+                      .name           = "adsl",
-+                      .gpio           = NB4_74HC64_GPIO(4),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "traffic",
-+                      .gpio           = 2,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "tel",
-+                      .gpio           = NB4_74HC64_GPIO(3),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "tv",
-+                      .gpio           = NB4_74HC64_GPIO(2),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "wifi",
-+                      .gpio           = 15,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "alarm",
-+                      .gpio           = NB4_74HC64_GPIO(0),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "service:red",
-+                      .gpio           = 29,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "service:green",
-+                      .gpio           = 30,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "service:blue",
-+                      .gpio           = 4,
-+                      .active_low     = 1,
-+              },
-+      },
-+      .buttons = {
-+              {
-+                      .desc           = "reset",
-+                      .gpio           = 34,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
-+              },
-+              {
-+                      .desc           = "wps",
-+                      .gpio           = 37,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
-+              },
-+      },
-+      .devs = nb4_devices,
-+      .num_devs = ARRAY_SIZE(nb4_devices),
-+      .spis = nb4_spi_devices,
-+      .num_spis = ARRAY_SIZE(nb4_spi_devices),
-+};
-+
-+static struct board_info __initdata board_nb4_ser_r2 = {
-+      .name                           = "NB4-SER-r2",
-+      .expected_cpu_id                = 0x6358,
-+
-+      .has_uart0                      = 1,
-+      .has_enet0                      = 1,
-+      .has_enet1                      = 1,
-+      .has_pci                        = 1,
-+
-+      .enet0 = {
-+              .has_phy                = 1,
-+              .use_internal_phy       = 1,
-+      },
-+
-+      .enet1 = {
-+              .force_speed_100        = 1,
-+              .force_duplex_full      = 1,
-+      },
-+
-+
-+      .has_ohci0 = 1,
-+      .has_pccard = 1,
-+      .has_ehci0 = 1,
-+
-+      .leds = {
-+              {
-+                      .name           = "adsl",
-+                      .gpio           = NB4_74HC64_GPIO(4),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "traffic",
-+                      .gpio           = 2,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "tel",
-+                      .gpio           = NB4_74HC64_GPIO(3),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "tv",
-+                      .gpio           = NB4_74HC64_GPIO(2),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "wifi",
-+                      .gpio           = 15,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "alarm",
-+                      .gpio           = NB4_74HC64_GPIO(0),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "service:red",
-+                      .gpio           = 29,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "service:green",
-+                      .gpio           = 30,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "service:blue",
-+                      .gpio           = 4,
-+                      .active_low     = 1,
-+              },
-+      },
-+      .buttons = {
-+              {
-+                      .desc           = "reset",
-+                      .gpio           = 34,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
-+              },
-+              {
-+                      .desc           = "wps",
-+                      .gpio           = 37,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
-+              },
-+      },
-+      .devs = nb4_devices,
-+      .num_devs = ARRAY_SIZE(nb4_devices),
-+      .spis = nb4_spi_devices,
-+      .num_spis = ARRAY_SIZE(nb4_spi_devices),
-+};
-+
-+static struct board_info __initdata board_nb4_fxc_r1 = {
-+      .name                           = "NB4-FXC-r1",
-+      .expected_cpu_id                = 0x6358,
-+
-+      .has_uart0                      = 1,
-+      .has_enet0                      = 1,
-+      .has_enet1                      = 1,
-+      .has_pci                        = 1,
-+
-+      .enet0 = {
-+              .has_phy                = 1,
-+              .use_internal_phy       = 1,
-+      },
-+
-+      .enet1 = {
-+              .force_speed_100        = 1,
-+              .force_duplex_full      = 1,
-+      },
-+
-+
-+      .has_ohci0 = 1,
-+      .has_pccard = 1,
-+      .has_ehci0 = 1,
-+
-+      .has_udc0                       = 1,
-+
-+      .leds = {
-+              {
-+                      .name           = "adsl",
-+                      .gpio           = NB4_74HC64_GPIO(4),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "traffic",
-+                      .gpio           = 2,
-+              },
-+              {
-+                      .name           = "tel",
-+                      .gpio           = NB4_74HC64_GPIO(3),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "tv",
-+                      .gpio           = NB4_74HC64_GPIO(2),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "wifi",
-+                      .gpio           = 15,
-+              },
-+              {
-+                      .name           = "alarm",
-+                      .gpio           = NB4_74HC64_GPIO(0),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "service:red",
-+                      .gpio           = 29,
-+              },
-+              {
-+                      .name           = "service:green",
-+                      .gpio           = 30,
-+              },
-+              {
-+                      .name           = "service:blue",
-+                      .gpio           = 4,
-+              },
-+      },
-+      .buttons = {
-+              {
-+                      .desc           = "reset",
-+                      .gpio           = 34,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
-+              },
-+              {
-+                      .desc           = "wps",
-+                      .gpio           = 37,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
-+              },
-+      },
-+      .devs = nb4_devices,
-+      .num_devs = ARRAY_SIZE(nb4_devices),
-+      .spis = nb4_spi_devices,
-+      .num_spis = ARRAY_SIZE(nb4_spi_devices),
-+};
-+
-+static struct board_info __initdata board_nb4_fxc_r2 = {
-+      .name                           = "NB4-FXC-r2",
-+      .expected_cpu_id                = 0x6358,
-+
-+      .has_uart0                      = 1,
-+      .has_enet0                      = 1,
-+      .has_enet1                      = 1,
-+      .has_pci                        = 1,
-+
-+      .enet0 = {
-+              .has_phy                = 1,
-+              .use_internal_phy       = 1,
-+      },
-+
-+      .enet1 = {
-+              .force_speed_100        = 1,
-+              .force_duplex_full      = 1,
-+      },
-+
-+
-+      .has_ohci0 = 1,
-+      .has_pccard = 1,
-+      .has_ehci0 = 1,
-+
-+      .leds = {
-+              {
-+                      .name           = "adsl",
-+                      .gpio           = NB4_74HC64_GPIO(4),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "traffic",
-+                      .gpio           = 2,
-+              },
-+              {
-+                      .name           = "tel",
-+                      .gpio           = NB4_74HC64_GPIO(3),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "tv",
-+                      .gpio           = NB4_74HC64_GPIO(2),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "wifi",
-+                      .gpio           = 15,
-+              },
-+              {
-+                      .name           = "alarm",
-+                      .gpio           = NB4_74HC64_GPIO(0),
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "service:red",
-+                      .gpio           = 29,
-+              },
-+              {
-+                      .name           = "service:green",
-+                      .gpio           = 30,
-+              },
-+              {
-+                      .name           = "service:blue",
-+                      .gpio           = 4,
-+              },
-+      },
-+      .buttons = {
-+              {
-+                      .desc           = "reset",
-+                      .gpio           = 34,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
-+              },
-+              {
-+                      .desc           = "wps",
-+                      .gpio           = 37,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
-+              },
-+      },
-+      .devs = nb4_devices,
-+      .num_devs = ARRAY_SIZE(nb4_devices),
-+      .spis = nb4_spi_devices,
-+      .num_spis = ARRAY_SIZE(nb4_spi_devices),
-+};
- #endif
- /*
-@@ -779,9 +1284,30 @@ static const struct board_info __initdat
-       &board_96358vw2,
-       &board_AGPFS0,
-       &board_DWVS0,
-+      &board_nb4_ser_r0,
-+      &board_nb4_ser_r1,
-+      &board_nb4_ser_r2,
-+      &board_nb4_fxc_r1,
-+      &board_nb4_fxc_r2,
- #endif
- };
-+static void __init nb4_nvram_fixup(void)
-+{
-+      u8 *boot_addr, *p;
-+      u32 val;
-+
-+      if (BCMCPU_IS_6358() && (!strcmp(nvram.name, "96358VW"))) {
-+              val = bcm_mpi_readl(MPI_CSBASE_REG(0));
-+              val &= MPI_CSBASE_BASE_MASK;
-+              boot_addr = (u8 *)KSEG1ADDR(val);
-+              /* Extract nb4 PID */
-+              p = boot_addr + NB4_PID_OFFSET;
-+              if (!memcmp(p, "NB4-", 4))
-+                      memcpy(nvram.name, p, sizeof("NB4-XXX-rX"));
-+      }
-+}
-+
- /*
-  * Register a sane SPROMv2 to make the on-board
-  * bcm4318 WLAN work
-@@ -899,6 +1425,9 @@ void __init board_prom_init(void)
-               return;
-       }
-+      /* Fixup broken nb4 board name */
-+      nb4_nvram_fixup();
-+
-       /* find board by name */
-       for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) {
-               if (strncmp(nvram.name, bcm963xx_boards[i]->name,
diff --git a/target/linux/brcm63xx/patches-2.6.37/230-6358-enet1-external-mii-clk.patch b/target/linux/brcm63xx/patches-2.6.37/230-6358-enet1-external-mii-clk.patch
new file mode 100644 (file)
index 0000000..51055b8
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -911,6 +911,8 @@ void __init board_prom_init(void)
+               if (BCMCPU_IS_6348())
+                       val |= GPIO_MODE_6348_G3_EXT_MII |
+                               GPIO_MODE_6348_G0_EXT_MII;
++              else if (BCMCPU_IS_6358())
++                      val |= GPIO_MODE_6358_ENET1_MII_CLK_INV;
+       }
+       bcm_gpio_writel(val, GPIO_MODE_REG);
+--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
++++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+@@ -402,6 +402,8 @@
+ #define GPIO_MODE_6358_EXTRA_SPI_SS   (1 << 7)
+ #define GPIO_MODE_6358_SERIAL_LED     (1 << 10)
+ #define GPIO_MODE_6358_UTOPIA         (1 << 12)
++#define GPIO_MODE_6358_ENET0_MII_CLK_INV (1 << 30)
++#define GPIO_MODE_6358_ENET1_MII_CLK_INV (1 << 31)
+ /*************************************************************************
index 35c490c..611bf59 100644 (file)
  #define BCM_6358_OHCI0_IRQ            (IRQ_INTERNAL_BASE + 5)
 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
 +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -769,4 +769,116 @@
+@@ -771,4 +771,116 @@
  #define DMIPSPLLCFG_N2_SHIFT          29
  #define DMIPSPLLCFG_N2_MASK           (0x7 << DMIPSPLLCFG_N2_SHIFT)
  
  obj-y         += boards/
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -33,6 +33,7 @@
+@@ -30,6 +30,7 @@
  #include <bcm63xx_dev_usb_ohci.h>
  #include <bcm63xx_dev_usb_ehci.h>
  #include <bcm63xx_dev_usb_udc.h>
  #include <board_bcm963xx.h>
  
  #define PFX   "board_bcm963xx: "
-@@ -1587,6 +1588,9 @@ int __init board_register_devices(void)
+@@ -1024,6 +1025,9 @@ int __init board_register_devices(void)
        if (board.num_spis)
                spi_register_board_info(board.spis, board.num_spis);
  
diff --git a/target/linux/brcm63xx/patches-2.6.37/250-6358-enet1-external-mii-clk.patch b/target/linux/brcm63xx/patches-2.6.37/250-6358-enet1-external-mii-clk.patch
deleted file mode 100644 (file)
index 3e033fb..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1477,6 +1477,8 @@ void __init board_prom_init(void)
-               if (BCMCPU_IS_6348())
-                       val |= GPIO_MODE_6348_G3_EXT_MII |
-                               GPIO_MODE_6348_G0_EXT_MII;
-+              else if (BCMCPU_IS_6358())
-+                      val |= GPIO_MODE_6358_ENET1_MII_CLK_INV;
-       }
-       bcm_gpio_writel(val, GPIO_MODE_REG);
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -402,6 +402,8 @@
- #define GPIO_MODE_6358_EXTRA_SPI_SS   (1 << 7)
- #define GPIO_MODE_6358_SERIAL_LED     (1 << 10)
- #define GPIO_MODE_6358_UTOPIA         (1 << 12)
-+#define GPIO_MODE_6358_ENET0_MII_CLK_INV (1 << 30)
-+#define GPIO_MODE_6358_ENET1_MII_CLK_INV (1 << 31)
- /*************************************************************************
diff --git a/target/linux/brcm63xx/patches-2.6.37/250-board-D4PW.patch b/target/linux/brcm63xx/patches-2.6.37/250-board-D4PW.patch
new file mode 100644 (file)
index 0000000..0a710f6
--- /dev/null
@@ -0,0 +1,60 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -472,6 +472,49 @@ static struct board_info __initdata boar
+       .has_ohci0 = 1,
+ };
++
++static struct board_info __initdata board_96348_D4PW = {
++      .name                           = "D-4P-W",
++      .expected_cpu_id                = 0x6348,
++
++      .has_enet0                      = 1,
++      .has_enet1                      = 1,
++      .has_pci                        = 1,
++
++      .enet0 = {
++              .has_phy                = 1,
++              .use_internal_phy       = 1,
++      },
++      .enet1 = {
++              .force_speed_100        = 1,
++              .force_duplex_full      = 1,
++      },
++
++      .has_ohci0                      = 1,
++      .has_ehci0                      = 1,
++
++      .leds = {
++              {
++                      .name           = "ppp",
++                      .gpio           = 4,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "ppp-fail",
++                      .gpio           = 5,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "power",
++                      .gpio           = 0,
++                      .active_low     = 1,
++                      .default_trigger = "default-on",
++
++              },
++      },
++
++};
++
+ #endif
+ /*
+@@ -736,6 +779,7 @@ static const struct board_info __initdat
+       &board_DV201AMR,
+       &board_96348gw_a,
+       &board_rta1025w_16,
++      &board_96348_D4PW,
+ #endif
+ #ifdef CONFIG_BCM63XX_CPU_6358
diff --git a/target/linux/brcm63xx/patches-2.6.37/260-board-NB4.patch b/target/linux/brcm63xx/patches-2.6.37/260-board-NB4.patch
new file mode 100644 (file)
index 0000000..88122bb
--- /dev/null
@@ -0,0 +1,569 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -17,6 +17,9 @@
+ #include <linux/ssb/ssb.h>
+ #include <linux/gpio_buttons.h>
+ #include <linux/input.h>
++#include <linux/spi/spi.h>
++#include <linux/spi/spi_gpio.h>
++#include <linux/spi/74x164.h>
+ #include <asm/addrspace.h>
+ #include <bcm63xx_board.h>
+ #include <bcm63xx_cpu.h>
+@@ -35,6 +38,12 @@
+ #define PFX   "board_bcm963xx: "
++#define NB4_PID_OFFSET                0xff80
++#define NB4_74X164_GPIO_BASE  64
++#define NB4_SPI_GPIO_MOSI     7
++#define NB4_SPI_GPIO_CLK      6
++#define NB4_74HC64_GPIO(X)    (NB4_74X164_GPIO_BASE + (X))
++
+ static struct bcm963xx_nvram nvram;
+ static unsigned int mac_addr_used;
+ static struct board_info board;
+@@ -757,6 +766,502 @@ static struct board_info __initdata boar
+       .has_ohci0                      = 1,
+ };
++
++struct spi_gpio_platform_data nb4_spi_gpio_data = {
++      .sck            = NB4_SPI_GPIO_CLK,
++      .mosi           = NB4_SPI_GPIO_MOSI,
++      .miso           = SPI_GPIO_NO_MISO,
++      .num_chipselect = 1,
++};
++
++
++static struct platform_device nb4_spi_gpio = {
++      .name = "spi_gpio",
++      .id   = 1,
++      .dev = {
++              .platform_data = &nb4_spi_gpio_data,
++      },
++};
++
++static struct platform_device * __initdata nb4_devices[] = {
++      &nb4_spi_gpio,
++};
++
++const struct gen_74x164_chip_platform_data nb4_74x164_platform_data = {
++      .base = NB4_74X164_GPIO_BASE
++};
++
++static struct spi_board_info nb4_spi_devices[] = {
++      {
++              .modalias = "74x164",
++              .max_speed_hz = 781000,
++              .bus_num = 1,
++              .controller_data = (void *) SPI_GPIO_NO_CHIPSELECT,
++              .mode = SPI_MODE_0,
++              .platform_data = &nb4_74x164_platform_data
++      }
++};
++
++static struct board_info __initdata board_nb4_ser_r0 = {
++      .name                           = "NB4-SER-r0",
++      .expected_cpu_id                = 0x6358,
++
++      .has_uart0                      = 1,
++      .has_enet0                      = 1,
++      .has_enet1                      = 1,
++      .has_pci                        = 1,
++
++      .enet0 = {
++              .has_phy                = 1,
++              .use_internal_phy       = 1,
++      },
++
++      .enet1 = {
++              .force_speed_100        = 1,
++              .force_duplex_full      = 1,
++      },
++
++
++      .has_ohci0 = 1,
++      .has_pccard = 1,
++      .has_ehci0 = 1,
++
++      .has_udc0                       = 1,
++
++      .leds = {
++              {
++                      .name           = "adsl",
++                      .gpio           = NB4_74HC64_GPIO(4),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "traffic",
++                      .gpio           = 2,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "tel",
++                      .gpio           = NB4_74HC64_GPIO(3),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "tv",
++                      .gpio           = NB4_74HC64_GPIO(2),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "wifi",
++                      .gpio           = 15,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "alarm",
++                      .gpio           = NB4_74HC64_GPIO(0),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "service:red",
++                      .gpio           = 29,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "service:green",
++                      .gpio           = 30,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "service:blue",
++                      .gpio           = 4,
++                      .active_low     = 1,
++              },
++      },
++      .buttons = {
++              {
++                      .desc           = "reset",
++                      .gpio           = 34,
++                      .type           = EV_KEY,
++                      .code           = KEY_RESTART,
++                      .threshold      = 3,
++              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
++      },
++      .devs = nb4_devices,
++      .num_devs = ARRAY_SIZE(nb4_devices),
++      .spis = nb4_spi_devices,
++      .num_spis = ARRAY_SIZE(nb4_spi_devices),
++};
++
++static struct board_info __initdata board_nb4_ser_r1 = {
++      .name                           = "NB4-SER-r1",
++      .expected_cpu_id                = 0x6358,
++
++      .has_uart0                      = 1,
++      .has_enet0                      = 1,
++      .has_enet1                      = 1,
++      .has_pci                        = 1,
++
++      .enet0 = {
++              .has_phy                = 1,
++              .use_internal_phy       = 1,
++      },
++
++      .enet1 = {
++              .force_speed_100        = 1,
++              .force_duplex_full      = 1,
++      },
++
++
++      .has_ohci0 = 1,
++      .has_pccard = 1,
++      .has_ehci0 = 1,
++
++      .has_udc0                       = 1,
++
++      .leds = {
++              {
++                      .name           = "adsl",
++                      .gpio           = NB4_74HC64_GPIO(4),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "traffic",
++                      .gpio           = 2,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "tel",
++                      .gpio           = NB4_74HC64_GPIO(3),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "tv",
++                      .gpio           = NB4_74HC64_GPIO(2),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "wifi",
++                      .gpio           = 15,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "alarm",
++                      .gpio           = NB4_74HC64_GPIO(0),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "service:red",
++                      .gpio           = 29,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "service:green",
++                      .gpio           = 30,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "service:blue",
++                      .gpio           = 4,
++                      .active_low     = 1,
++              },
++      },
++      .buttons = {
++              {
++                      .desc           = "reset",
++                      .gpio           = 34,
++                      .type           = EV_KEY,
++                      .code           = KEY_RESTART,
++                      .threshold      = 3,
++              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
++      },
++      .devs = nb4_devices,
++      .num_devs = ARRAY_SIZE(nb4_devices),
++      .spis = nb4_spi_devices,
++      .num_spis = ARRAY_SIZE(nb4_spi_devices),
++};
++
++static struct board_info __initdata board_nb4_ser_r2 = {
++      .name                           = "NB4-SER-r2",
++      .expected_cpu_id                = 0x6358,
++
++      .has_uart0                      = 1,
++      .has_enet0                      = 1,
++      .has_enet1                      = 1,
++      .has_pci                        = 1,
++
++      .enet0 = {
++              .has_phy                = 1,
++              .use_internal_phy       = 1,
++      },
++
++      .enet1 = {
++              .force_speed_100        = 1,
++              .force_duplex_full      = 1,
++      },
++
++
++      .has_ohci0 = 1,
++      .has_pccard = 1,
++      .has_ehci0 = 1,
++
++      .leds = {
++              {
++                      .name           = "adsl",
++                      .gpio           = NB4_74HC64_GPIO(4),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "traffic",
++                      .gpio           = 2,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "tel",
++                      .gpio           = NB4_74HC64_GPIO(3),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "tv",
++                      .gpio           = NB4_74HC64_GPIO(2),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "wifi",
++                      .gpio           = 15,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "alarm",
++                      .gpio           = NB4_74HC64_GPIO(0),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "service:red",
++                      .gpio           = 29,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "service:green",
++                      .gpio           = 30,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "service:blue",
++                      .gpio           = 4,
++                      .active_low     = 1,
++              },
++      },
++      .buttons = {
++              {
++                      .desc           = "reset",
++                      .gpio           = 34,
++                      .type           = EV_KEY,
++                      .code           = KEY_RESTART,
++                      .threshold      = 3,
++              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
++      },
++      .devs = nb4_devices,
++      .num_devs = ARRAY_SIZE(nb4_devices),
++      .spis = nb4_spi_devices,
++      .num_spis = ARRAY_SIZE(nb4_spi_devices),
++};
++
++static struct board_info __initdata board_nb4_fxc_r1 = {
++      .name                           = "NB4-FXC-r1",
++      .expected_cpu_id                = 0x6358,
++
++      .has_uart0                      = 1,
++      .has_enet0                      = 1,
++      .has_enet1                      = 1,
++      .has_pci                        = 1,
++
++      .enet0 = {
++              .has_phy                = 1,
++              .use_internal_phy       = 1,
++      },
++
++      .enet1 = {
++              .force_speed_100        = 1,
++              .force_duplex_full      = 1,
++      },
++
++
++      .has_ohci0 = 1,
++      .has_pccard = 1,
++      .has_ehci0 = 1,
++
++      .has_udc0                       = 1,
++
++      .leds = {
++              {
++                      .name           = "adsl",
++                      .gpio           = NB4_74HC64_GPIO(4),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "traffic",
++                      .gpio           = 2,
++              },
++              {
++                      .name           = "tel",
++                      .gpio           = NB4_74HC64_GPIO(3),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "tv",
++                      .gpio           = NB4_74HC64_GPIO(2),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "wifi",
++                      .gpio           = 15,
++              },
++              {
++                      .name           = "alarm",
++                      .gpio           = NB4_74HC64_GPIO(0),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "service:red",
++                      .gpio           = 29,
++              },
++              {
++                      .name           = "service:green",
++                      .gpio           = 30,
++              },
++              {
++                      .name           = "service:blue",
++                      .gpio           = 4,
++              },
++      },
++      .buttons = {
++              {
++                      .desc           = "reset",
++                      .gpio           = 34,
++                      .type           = EV_KEY,
++                      .code           = KEY_RESTART,
++                      .threshold      = 3,
++              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
++      },
++      .devs = nb4_devices,
++      .num_devs = ARRAY_SIZE(nb4_devices),
++      .spis = nb4_spi_devices,
++      .num_spis = ARRAY_SIZE(nb4_spi_devices),
++};
++
++static struct board_info __initdata board_nb4_fxc_r2 = {
++      .name                           = "NB4-FXC-r2",
++      .expected_cpu_id                = 0x6358,
++
++      .has_uart0                      = 1,
++      .has_enet0                      = 1,
++      .has_enet1                      = 1,
++      .has_pci                        = 1,
++
++      .enet0 = {
++              .has_phy                = 1,
++              .use_internal_phy       = 1,
++      },
++
++      .enet1 = {
++              .force_speed_100        = 1,
++              .force_duplex_full      = 1,
++      },
++
++
++      .has_ohci0 = 1,
++      .has_pccard = 1,
++      .has_ehci0 = 1,
++
++      .leds = {
++              {
++                      .name           = "adsl",
++                      .gpio           = NB4_74HC64_GPIO(4),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "traffic",
++                      .gpio           = 2,
++              },
++              {
++                      .name           = "tel",
++                      .gpio           = NB4_74HC64_GPIO(3),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "tv",
++                      .gpio           = NB4_74HC64_GPIO(2),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "wifi",
++                      .gpio           = 15,
++              },
++              {
++                      .name           = "alarm",
++                      .gpio           = NB4_74HC64_GPIO(0),
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "service:red",
++                      .gpio           = 29,
++              },
++              {
++                      .name           = "service:green",
++                      .gpio           = 30,
++              },
++              {
++                      .name           = "service:blue",
++                      .gpio           = 4,
++              },
++      },
++      .buttons = {
++              {
++                      .desc           = "reset",
++                      .gpio           = 34,
++                      .type           = EV_KEY,
++                      .code           = KEY_RESTART,
++                      .threshold      = 3,
++              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
++      },
++      .devs = nb4_devices,
++      .num_devs = ARRAY_SIZE(nb4_devices),
++      .spis = nb4_spi_devices,
++      .num_spis = ARRAY_SIZE(nb4_spi_devices),
++};
+ #endif
+ /*
+@@ -787,9 +1292,30 @@ static const struct board_info __initdat
+       &board_96358vw2,
+       &board_AGPFS0,
+       &board_DWVS0,
++      &board_nb4_ser_r0,
++      &board_nb4_ser_r1,
++      &board_nb4_ser_r2,
++      &board_nb4_fxc_r1,
++      &board_nb4_fxc_r2,
+ #endif
+ };
++static void __init nb4_nvram_fixup(void)
++{
++      u8 *boot_addr, *p;
++      u32 val;
++
++      if (BCMCPU_IS_6358() && (!strcmp(nvram.name, "96358VW"))) {
++              val = bcm_mpi_readl(MPI_CSBASE_REG(0));
++              val &= MPI_CSBASE_BASE_MASK;
++              boot_addr = (u8 *)KSEG1ADDR(val);
++              /* Extract nb4 PID */
++              p = boot_addr + NB4_PID_OFFSET;
++              if (!memcmp(p, "NB4-", 4))
++                      memcpy(nvram.name, p, sizeof("NB4-XXX-rX"));
++      }
++}
++
+ /*
+  * Register a sane SPROMv2 to make the on-board
+  * bcm4318 WLAN work
+@@ -908,6 +1434,9 @@ void __init board_prom_init(void)
+               return;
+       }
++      /* Fixup broken nb4 board name */
++      nb4_nvram_fixup();
++
+       /* find board by name */
+       for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) {
+               if (strncmp(nvram.name, bcm963xx_boards[i]->name,
diff --git a/target/linux/brcm63xx/patches-2.6.37/260-no_ehci_over_current_check.patch b/target/linux/brcm63xx/patches-2.6.37/260-no_ehci_over_current_check.patch
deleted file mode 100644 (file)
index 513ff99..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/drivers/usb/host/ehci-hub.c
-+++ b/drivers/usb/host/ehci-hub.c
-@@ -882,11 +882,13 @@ static int ehci_hub_control (
-                        * power switching; they're allowed to just limit the
-                        * current.  khubd will turn the power back on.
-                        */
-+#ifndef CONFIG_BCM63XX
-                       if (HCS_PPC (ehci->hcs_params)){
-                               ehci_writel(ehci,
-                                       temp & ~(PORT_RWC_BITS | PORT_POWER),
-                                       status_reg);
-                       }
-+#endif
-               }
-               /* whoever resumes must GetPortStatus to complete it!! */
index c6bd1c8..179a146 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -135,6 +135,38 @@ static struct board_info __initdata boar
+@@ -142,6 +142,38 @@ static struct board_info __initdata boar
                },
        },
  };
@@ -39,7 +39,7 @@
  #endif
  
  /*
-@@ -1264,6 +1296,7 @@ static const struct board_info __initdat
+@@ -1271,6 +1303,7 @@ static const struct board_info __initdat
  #ifdef CONFIG_BCM63XX_CPU_6338
        &board_96338gw,
        &board_96338w,
diff --git a/target/linux/brcm63xx/patches-2.6.37/300-wl_exports.patch b/target/linux/brcm63xx/patches-2.6.37/300-wl_exports.patch
deleted file mode 100644 (file)
index aa7322d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -49,6 +49,13 @@ static unsigned int mac_addr_used;
- static struct board_info board;
- /*
-+ * Required export for WL
-+ */
-+#define NVRAM_SPACE 0x8000
-+char nvram_buf[NVRAM_SPACE];
-+EXPORT_SYMBOL(nvram_buf);
-+
-+/*
-  * known 6338 boards
-  */
- #ifdef CONFIG_BCM63XX_CPU_6338
-@@ -1444,6 +1451,7 @@ void __init board_prom_init(void)
-       /* extract nvram data */
-       memcpy(&nvram, boot_addr + BCM963XX_NVRAM_OFFSET, sizeof(nvram));
-+      memcpy(&nvram_buf, boot_addr + BCM963XX_NVRAM_OFFSET, NVRAM_SPACE);
-       /* check checksum before using data */
-       if (nvram.version <= 4)
---- a/arch/mips/mm/cache.c
-+++ b/arch/mips/mm/cache.c
-@@ -52,6 +52,7 @@ void (*_dma_cache_wback)(unsigned long s
- void (*_dma_cache_inv)(unsigned long start, unsigned long size);
- EXPORT_SYMBOL(_dma_cache_wback_inv);
-+EXPORT_SYMBOL(_dma_cache_inv);
- #endif /* CONFIG_DMA_NONCOHERENT */
diff --git a/target/linux/brcm63xx/patches-2.6.37/310-CPVA642_board.patch b/target/linux/brcm63xx/patches-2.6.37/310-CPVA642_board.patch
deleted file mode 100644 (file)
index 480e190..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -662,6 +662,98 @@ static struct board_info __initdata boar
-       },
- };
-+static struct board_info __initdata board_CPVA642 = {
-+      .name                           = "CPVA642",
-+      .expected_cpu_id                = 0x6358,
-+
-+      .has_uart0                      = 1,
-+      .has_enet1                      = 1,
-+      .has_pci                        = 1,
-+
-+      .enet1 = {
-+              .force_speed_100        = 1,
-+              .force_duplex_full      = 1,
-+      },
-+
-+      .has_ohci0 = 1,
-+      .has_ehci0 = 1,
-+
-+      .leds = {
-+          /* bi-color */
-+              {
-+                      .name           = "power:red",
-+                      .gpio           = 14,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "power:green",
-+                      .gpio           = 11,
-+                      .active_low     = 1,
-+                      .default_trigger = "default-on",
-+              },
-+              {
-+                      .name           = "wifi:red",
-+                      .gpio           = 6,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "wifi:green",
-+                      .gpio           = 28,
-+                      .active_low     = 0,
-+              },
-+              {
-+                      .name           = "link:red",
-+                      .gpio           = 9,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "link:green",
-+                      .gpio           = 10,
-+                      .active_low     = 1,
-+              },
-+              /* green only */
-+              {
-+                      .name           = "ether",
-+                      .gpio           = 1,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "phone1",
-+                      .gpio           = 4,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "phone2",
-+                      .gpio           = 2,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "usb",
-+                      .gpio           = 3,
-+                      .active_low     = 1,
-+              },
-+    },
-+
-+      .buttons = {
-+              {
-+                      .desc           = "reset",
-+                      .gpio           = 36,
-+                      .active_low     = 1,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
-+              },
-+              {
-+                      .desc           = "wps",
-+                      .gpio           = 37,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_WPS_BUTTON,
-+                      .threshold      = 3,
-+              },
-+      },
-+};
-+
-+
- static struct board_info __initdata board_AGPFS0 = {
-       .name                           = "AGPF-S0",
-       .expected_cpu_id                = 0x6358,
-@@ -1324,6 +1416,7 @@ static const struct board_info __initdat
-       &board_96358vw,
-       &board_96358vw2,
-       &board_AGPFS0,
-+      &board_CPVA642,
-       &board_DWVS0,
-       &board_nb4_ser_r0,
-       &board_nb4_ser_r1,
diff --git a/target/linux/brcm63xx/patches-2.6.37/310-board-CPVA642.patch b/target/linux/brcm63xx/patches-2.6.37/310-board-CPVA642.patch
new file mode 100644 (file)
index 0000000..480e190
--- /dev/null
@@ -0,0 +1,109 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -662,6 +662,98 @@ static struct board_info __initdata boar
+       },
+ };
++static struct board_info __initdata board_CPVA642 = {
++      .name                           = "CPVA642",
++      .expected_cpu_id                = 0x6358,
++
++      .has_uart0                      = 1,
++      .has_enet1                      = 1,
++      .has_pci                        = 1,
++
++      .enet1 = {
++              .force_speed_100        = 1,
++              .force_duplex_full      = 1,
++      },
++
++      .has_ohci0 = 1,
++      .has_ehci0 = 1,
++
++      .leds = {
++          /* bi-color */
++              {
++                      .name           = "power:red",
++                      .gpio           = 14,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "power:green",
++                      .gpio           = 11,
++                      .active_low     = 1,
++                      .default_trigger = "default-on",
++              },
++              {
++                      .name           = "wifi:red",
++                      .gpio           = 6,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "wifi:green",
++                      .gpio           = 28,
++                      .active_low     = 0,
++              },
++              {
++                      .name           = "link:red",
++                      .gpio           = 9,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "link:green",
++                      .gpio           = 10,
++                      .active_low     = 1,
++              },
++              /* green only */
++              {
++                      .name           = "ether",
++                      .gpio           = 1,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "phone1",
++                      .gpio           = 4,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "phone2",
++                      .gpio           = 2,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "usb",
++                      .gpio           = 3,
++                      .active_low     = 1,
++              },
++    },
++
++      .buttons = {
++              {
++                      .desc           = "reset",
++                      .gpio           = 36,
++                      .active_low     = 1,
++                      .type           = EV_KEY,
++                      .code           = KEY_RESTART,
++                      .threshold      = 3,
++              },
++              {
++                      .desc           = "wps",
++                      .gpio           = 37,
++                      .type           = EV_KEY,
++                      .code           = KEY_WPS_BUTTON,
++                      .threshold      = 3,
++              },
++      },
++};
++
++
+ static struct board_info __initdata board_AGPFS0 = {
+       .name                           = "AGPF-S0",
+       .expected_cpu_id                = 0x6358,
+@@ -1324,6 +1416,7 @@ static const struct board_info __initdat
+       &board_96358vw,
+       &board_96358vw2,
+       &board_AGPFS0,
++      &board_CPVA642,
+       &board_DWVS0,
+       &board_nb4_ser_r0,
+       &board_nb4_ser_r1,
diff --git a/target/linux/brcm63xx/patches-2.6.37/455-board_BTV2110.patch b/target/linux/brcm63xx/patches-2.6.37/455-board_BTV2110.patch
new file mode 100644 (file)
index 0000000..505fb81
--- /dev/null
@@ -0,0 +1,73 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -444,6 +444,62 @@ static struct board_info __initdata boar
+       },
+ };
++
++/* BT Voyager 2110 */
++static struct board_info __initdata board_V2110 = {
++      .name                           = "V2110",
++      .expected_cpu_id                = 0x6348,
++
++      .has_uart0                      = 1,
++      .has_enet1                      = 1,
++      .has_pci                        = 1,
++
++      .enet1 = {
++              .force_speed_100        = 1,
++              .force_duplex_full      = 1,
++      },
++
++      .leds = {
++              {
++                      .name           = "V2110:green:power",
++                      .gpio           = 0,
++                      .active_low     = 1,
++                      .default_trigger = "default-on",
++              },
++              {
++                      .name           = "V2110:red:power",
++                      .gpio           = 1,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "V2110:green:adsl",
++                      .gpio           = 2,
++                      .active_low     = 1,
++              },
++              {       .name           = "V2110:green:ppp",
++                      .gpio           = 3,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "V2110:green:wireless",
++                      .gpio           = 6,
++                      .active_low     = 1,
++              },
++      },
++
++      .buttons = {
++              {
++                      .desc           = "reset",
++                      .gpio           = 33,
++                      .active_low     = 1,
++                      .type           = EV_KEY,
++                      .code           = KEY_RESTART,
++                      .threshold      = 3,
++              },
++      },
++};
++
++
+ static struct board_info __initdata board_96348gw = {
+       .name                           = "96348GW",
+       .expected_cpu_id                = 0x6348,
+@@ -2009,6 +2065,7 @@ static const struct board_info __initdat
+       &board_96348_D4PW,
+       &board_spw500v,
+       &board_ct536_ct5621,
++      &board_V2110,
+       &board_96348sv,
+       &board_V2500V_BB,
+ #endif
diff --git a/target/linux/brcm63xx/patches-2.6.37/456-board_livebox.patch b/target/linux/brcm63xx/patches-2.6.37/456-board_livebox.patch
new file mode 100644 (file)
index 0000000..6c39045
--- /dev/null
@@ -0,0 +1,251 @@
+--- a/arch/mips/bcm63xx/boards/Kconfig
++++ b/arch/mips/bcm63xx/boards/Kconfig
+@@ -8,4 +8,10 @@ config BOARD_BCM963XX
+       select SSB
+        help
++config BOARD_LIVEBOX
++      bool "Inventel Livebox(es) boards"
++      select SSB
++      help
++       Inventel Livebox boards using the RedBoot bootloader.
++
+ endchoice
+--- a/arch/mips/bcm63xx/boards/Makefile
++++ b/arch/mips/bcm63xx/boards/Makefile
+@@ -1,3 +1,4 @@
+ obj-$(CONFIG_BOARD_BCM963XX)          += board_bcm963xx.o
++obj-$(CONFIG_BOARD_LIVEBOX)           += board_livebox.o
+ EXTRA_CFLAGS += -Werror
+--- /dev/null
++++ b/arch/mips/bcm63xx/boards/board_livebox.c
+@@ -0,0 +1,228 @@
++/*
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.  See the file "COPYING" in the main directory of this archive
++ * for more details.
++ *
++ * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org>
++ */
++
++#include <linux/init.h>
++#include <linux/kernel.h>
++#include <linux/string.h>
++#include <linux/platform_device.h>
++#include <linux/mtd/mtd.h>
++#include <linux/mtd/partitions.h>
++#include <linux/mtd/physmap.h>
++#include <linux/input.h>
++#include <linux/gpio_buttons.h>
++#include <asm/addrspace.h>
++#include <bcm63xx_board.h>
++#include <bcm63xx_cpu.h>
++#include <bcm63xx_regs.h>
++#include <bcm63xx_io.h>
++#include <bcm63xx_dev_uart.h>
++#include <bcm63xx_dev_pci.h>
++#include <bcm63xx_dev_enet.h>
++#include <bcm63xx_dev_pcmcia.h>
++#include <bcm63xx_dev_usb_ohci.h>
++#include <bcm63xx_dev_usb_ehci.h>
++#include <board_bcm963xx.h>
++
++#define PFX   "board_livebox: "
++
++static unsigned int mac_addr_used = 0;
++static struct board_info board;
++
++/*
++ * known 6348 boards
++ */
++#ifdef CONFIG_BCM63XX_CPU_6348
++static struct board_info __initdata board_livebox = {
++      .name                           = "Livebox",
++      .expected_cpu_id                = 0x6348,
++
++      .has_uart0                      = 1,
++      .has_enet0                      = 1,
++      .has_enet1                      = 1,
++      .has_pci                        = 1,
++
++      .enet0 = {
++              .has_phy                = 1,
++              .use_internal_phy       = 1,
++      },
++
++      .enet1 = {
++              .force_speed_100        = 1,
++              .force_duplex_full      = 1,
++      },
++
++      .has_ohci0                      = 1,
++      .has_pccard                     = 1,
++      .has_ehci0                      = 1,
++};
++#endif
++
++/*
++ * all boards
++ */
++static const struct board_info __initdata *bcm963xx_boards[] = {
++#ifdef CONFIG_BCM63XX_CPU_6348
++      &board_livebox
++#endif
++};
++
++/*
++ * early init callback
++ */
++void __init board_prom_init(void)
++{
++      u32 val;
++
++      /* read base address of boot chip select (0) */
++      val = bcm_mpi_readl(MPI_CSBASE_REG(0));
++      val &= MPI_CSBASE_BASE_MASK;
++
++      /* assume board is a Livebox */
++      memcpy(&board, bcm963xx_boards[0], sizeof(board));
++
++      /* setup pin multiplexing depending on board enabled device,
++       * this has to be done this early since PCI init is done
++       * inside arch_initcall */
++      val = 0;
++
++      if (board.has_pci) {
++              bcm63xx_pci_enabled = 1;
++              if (BCMCPU_IS_6348())
++                      val |= GPIO_MODE_6348_G2_PCI;
++      }
++
++      if (board.has_pccard) {
++              if (BCMCPU_IS_6348())
++                      val |= GPIO_MODE_6348_G1_MII_PCCARD;
++      }
++
++      if (board.has_enet0 && !board.enet0.use_internal_phy) {
++              if (BCMCPU_IS_6348())
++                      val |= GPIO_MODE_6348_G3_EXT_MII |
++                              GPIO_MODE_6348_G0_EXT_MII;
++      }
++
++      if (board.has_enet1 && !board.enet1.use_internal_phy) {
++              if (BCMCPU_IS_6348())
++                      val |= GPIO_MODE_6348_G3_EXT_MII |
++                              GPIO_MODE_6348_G0_EXT_MII;
++      }
++
++      bcm_gpio_writel(val, GPIO_MODE_REG);
++}
++
++/*
++ * second stage init callback, good time to panic if we couldn't
++ * identify on which board we're running since early printk is working
++ */
++void __init board_setup(void)
++{
++      if (!board.name[0])
++              panic("unable to detect bcm963xx board");
++      printk(KERN_INFO PFX "board name: %s\n", board.name);
++
++      /* make sure we're running on expected cpu */
++      if (bcm63xx_get_cpu_id() != board.expected_cpu_id)
++              panic("unexpected CPU for bcm963xx board");
++}
++
++/*
++ * return board name for /proc/cpuinfo
++ */
++const char *board_get_name(void)
++{
++      return board.name;
++}
++
++/*
++ * register & return a new board mac address
++ */
++
++static int board_get_mac_address(u8 *mac)
++{
++      u8 default_mac[ETH_ALEN] = {0x00, 0x07, 0x3A, 0x00, 0x00, 0x00};
++      u8 *p;
++      int count;
++
++      memcpy(mac, default_mac, ETH_ALEN);
++
++      p = mac + ETH_ALEN - 1;
++      count = mac_addr_used;
++
++      while (count--) {
++              do {
++                      (*p)++;
++                      if (*p != 0)
++                              break;
++                      p--;
++              } while (p != mac);
++      }
++
++      if (p == mac) {
++              printk(KERN_ERR PFX "unable to fetch mac address\n");
++              return -ENODEV;
++      }
++        mac_addr_used++;
++
++      return 0;
++}
++
++static struct resource mtd_resources[] = {
++      {
++              .start          = 0,    /* filled at runtime */
++              .end            = 0,    /* filled at runtime */
++              .flags          = IORESOURCE_MEM,
++      }
++};
++
++static struct platform_device mtd_dev = {
++      .name                   = "bcm963xx-flash",
++      .resource               = mtd_resources,
++      .num_resources          = ARRAY_SIZE(mtd_resources),
++};
++
++
++/*
++ * third stage init callback, register all board devices.
++ */
++int __init board_register_devices(void)
++{
++      u32 val;
++
++      if (board.has_uart0)
++              bcm63xx_uart_register(0);
++
++      if (board.has_pccard)
++              bcm63xx_pcmcia_register();
++
++      if (board.has_enet0 &&
++          !board_get_mac_address(board.enet0.mac_addr))
++              bcm63xx_enet_register(0, &board.enet0);
++
++      if (board.has_enet1 &&
++          !board_get_mac_address(board.enet1.mac_addr))
++              bcm63xx_enet_register(1, &board.enet1);
++
++      if (board.has_ohci0)
++              bcm63xx_ohci_register();
++
++      if (board.has_ehci0)
++              bcm63xx_ehci_register();
++
++
++      /* read base address of boot chip select (0) */
++      val = bcm_mpi_readl(MPI_CSBASE_REG(0));
++      val &= MPI_CSBASE_BASE_MASK;
++      mtd_resources[0].start = val;
++      mtd_resources[0].end = 0x1FFFFFFF;
++
++      platform_device_register(&mtd_dev);
++
++      return 0;
++}
++
index ef77c69..349e5f5 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -2071,6 +2071,17 @@ static struct ssb_sprom bcm63xx_sprom =
+@@ -2128,6 +2128,17 @@ static struct ssb_sprom bcm63xx_sprom =
        .boardflags_lo          = 0x2848,
        .boardflags_hi          = 0x0000,
  };
@@ -18,7 +18,7 @@
  #endif
  
  /*
-@@ -2271,8 +2282,9 @@ void __init board_prom_init(void)
+@@ -2328,8 +2339,9 @@ void __init board_prom_init(void)
        if (!board_get_mac_address(bcm63xx_sprom.il0mac)) {
                memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
                memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
index 8f92945..478019d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -2051,7 +2051,7 @@ static void __init nb4_nvram_fixup(void)
+@@ -2108,7 +2108,7 @@ static void __init nb4_nvram_fixup(void)
   * bcm4318 WLAN work
   */
  #ifdef CONFIG_SSB_PCIHOST
@@ -9,7 +9,7 @@
        .revision               = 0x02,
        .board_rev              = 0x17,
        .country_code           = 0x0,
-@@ -2071,6 +2071,7 @@ static struct ssb_sprom bcm63xx_sprom =
+@@ -2128,6 +2128,7 @@ static struct ssb_sprom bcm63xx_sprom =
        .boardflags_lo          = 0x2848,
        .boardflags_hi          = 0x0000,
  };
diff --git a/target/linux/brcm63xx/patches-2.6.37/980-board_BTV2110.patch b/target/linux/brcm63xx/patches-2.6.37/980-board_BTV2110.patch
deleted file mode 100644 (file)
index 95b2b33..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -444,6 +444,62 @@ static struct board_info __initdata boar
-       },
- };
-+
-+/* BT Voyager 2110 */
-+static struct board_info __initdata board_V2110 = {
-+      .name                           = "V2110",
-+      .expected_cpu_id                = 0x6348,
-+
-+      .has_uart0                      = 1,
-+      .has_enet1                      = 1,
-+      .has_pci                        = 1,
-+
-+      .enet1 = {
-+              .force_speed_100        = 1,
-+              .force_duplex_full      = 1,
-+      },
-+
-+      .leds = {
-+              {
-+                      .name           = "V2110:green:power",
-+                      .gpio           = 0,
-+                      .active_low     = 1,
-+                      .default_trigger = "default-on",
-+              },
-+              {
-+                      .name           = "V2110:red:power",
-+                      .gpio           = 1,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "V2110:green:adsl",
-+                      .gpio           = 2,
-+                      .active_low     = 1,
-+              },
-+              {       .name           = "V2110:green:ppp",
-+                      .gpio           = 3,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "V2110:green:wireless",
-+                      .gpio           = 6,
-+                      .active_low     = 1,
-+              },
-+      },
-+
-+      .buttons = {
-+              {
-+                      .desc           = "reset",
-+                      .gpio           = 33,
-+                      .active_low     = 1,
-+                      .type           = EV_KEY,
-+                      .code           = KEY_RESTART,
-+                      .threshold      = 3,
-+              },
-+      },
-+};
-+
-+
- static struct board_info __initdata board_96348gw = {
-       .name                           = "96348GW",
-       .expected_cpu_id                = 0x6348,
-@@ -1933,6 +1989,7 @@ static const struct board_info __initdat
-       &board_96348_D4PW,
-       &board_spw500v,
-       &board_ct536_ct5621,
-+      &board_V2110,
-       &board_96348sv,
- #endif