summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-02-15 12:23:49 +0000
committerJonas Gorski <jogo@openwrt.org>2013-02-15 12:23:49 +0000
commit485e52e1d8325c433ee6351a441dc2dd70948814 (patch)
treecc6e883e2ff09bff0dddbc7de468a93a6c975632
parent162b8e23a5b6ddc158bd382cbd8ae8b31cac9082 (diff)
downloadmtk-20170518-485e52e1d8325c433ee6351a441dc2dd70948814.zip
mtk-20170518-485e52e1d8325c433ee6351a441dc2dd70948814.tar.gz
mtk-20170518-485e52e1d8325c433ee6351a441dc2dd70948814.tar.bz2
bcm63xx: make nvram checksum failures non fatal
fixes #12982. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 35605
-rw-r--r--target/linux/brcm63xx/patches-3.7/108-MIPS-BCM63XX-handle-huawei-nvram-layout.patch49
-rw-r--r--target/linux/brcm63xx/patches-3.7/108-MIPS-BCM63XX-make-nvram-checksum-failure-non-fatal.patch67
-rw-r--r--target/linux/brcm63xx/patches-3.7/300-reset_buttons.patch4
-rw-r--r--target/linux/brcm63xx/patches-3.7/301-led_count.patch4
-rw-r--r--target/linux/brcm63xx/patches-3.7/302-extended-platform-devices.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.7/303-spi-board-info.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.7/304-boardid_fixup.patch6
-rw-r--r--target/linux/brcm63xx/patches-3.7/401-MIPS-BCM63XX-register-ohci-device.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.7/403-MIPS-BCM63XX-register-ehci-device.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.7/408-6358-enet1-external-mii-clk.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.7/415-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.7/425-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.7/429-MIPS-BCM63XX-export-PSI-size-from-nvram.patch4
-rw-r--r--target/linux/brcm63xx/patches-3.7/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch6
-rw-r--r--target/linux/brcm63xx/patches-3.7/437-MIPS-BCM63XX-pass-caldata-info-to-flash.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.7/444-BCM63XX-add-endian-check-for-ath9k.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.7/445-BCM63XX-add-led-pin-for-ath9k.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.7/446-BCM63XX-add-a-fixup-for-rt2x00-devices.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.7/511-board_V2500V.patch4
-rw-r--r--target/linux/brcm63xx/patches-3.7/520-bcm63xx-add-support-for-96368MVWG-board.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.7/800-wl_exports.patch4
-rw-r--r--target/linux/brcm63xx/patches-3.8/119-MIPS-BCM63XX-handle-huawei-nvram-layout.patch49
-rw-r--r--target/linux/brcm63xx/patches-3.8/119-MIPS-BCM63XX-make-nvram-checksum-failure-non-fatal.patch67
-rw-r--r--target/linux/brcm63xx/patches-3.8/300-reset_buttons.patch4
-rw-r--r--target/linux/brcm63xx/patches-3.8/301-led_count.patch4
-rw-r--r--target/linux/brcm63xx/patches-3.8/302-extended-platform-devices.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.8/303-spi-board-info.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.8/304-boardid_fixup.patch6
-rw-r--r--target/linux/brcm63xx/patches-3.8/408-6358-enet1-external-mii-clk.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.8/415-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.8/425-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.8/429-MIPS-BCM63XX-export-PSI-size-from-nvram.patch4
-rw-r--r--target/linux/brcm63xx/patches-3.8/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch6
-rw-r--r--target/linux/brcm63xx/patches-3.8/437-MIPS-BCM63XX-pass-caldata-info-to-flash.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.8/444-BCM63XX-add-endian-check-for-ath9k.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.8/445-BCM63XX-add-led-pin-for-ath9k.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.8/446-BCM63XX-add-a-fixup-for-rt2x00-devices.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.8/511-board_V2500V.patch4
-rw-r--r--target/linux/brcm63xx/patches-3.8/520-bcm63xx-add-support-for-96368MVWG-board.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.8/800-wl_exports.patch4
40 files changed, 188 insertions, 152 deletions
diff --git a/target/linux/brcm63xx/patches-3.7/108-MIPS-BCM63XX-handle-huawei-nvram-layout.patch b/target/linux/brcm63xx/patches-3.7/108-MIPS-BCM63XX-handle-huawei-nvram-layout.patch
deleted file mode 100644
index 14d8339..0000000
--- a/target/linux/brcm63xx/patches-3.7/108-MIPS-BCM63XX-handle-huawei-nvram-layout.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From fb1e2c8a1073297f4674ca90c7d533de5187d158 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sat, 9 Feb 2013 12:09:53 +0100
-Subject: [PATCH] MIPS: BCM63XX: handle huawei nvram layout
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Huawei uses a custom nvram layout, extending it with additional 32
-byte field. This pushes also the checksum further, causing it to
-always fail the check.
-
-Add an additional crc check for handling this modified nvram layout
-based on the different size.
-
-Reported-by: Álvaro Fernández Rojas <noltari@gmail.com>
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/nvram.c | 18 +++++++++++++++++-
- 1 file changed, 17 insertions(+), 1 deletion(-)
-
---- a/arch/mips/bcm63xx/nvram.c
-+++ b/arch/mips/bcm63xx/nvram.c
-@@ -59,8 +59,24 @@ int __init bcm63xx_nvram_init(void *addr
-
- crc = crc32_le(~0, (u8 *)&nvram, check_len);
-
-- if (crc != expected_crc)
-+ if (crc != expected_crc) {
-+ /* huawei uses a modified nvram that is 32 bytes longer */
-+ if (nvram.version == 2 && !strncmp(nvram.name, "HW5", 3)) {
-+ check_len += 32;
-+
-+ /* restore old value */
-+ nvram.checksum_old = expected_crc;
-+ expected_crc = *(u32 *)&nvram.reserved3[28];
-+ /* zero the checksum field */
-+ memset(&nvram.reserved3[28], 0, 4);
-+
-+ crc = crc32_le(~0, (u8 *)&nvram, check_len);
-+
-+ if (crc == expected_crc)
-+ return 0;
-+ }
- return -EINVAL;
-+ }
-
- return 0;
- }
diff --git a/target/linux/brcm63xx/patches-3.7/108-MIPS-BCM63XX-make-nvram-checksum-failure-non-fatal.patch b/target/linux/brcm63xx/patches-3.7/108-MIPS-BCM63XX-make-nvram-checksum-failure-non-fatal.patch
new file mode 100644
index 0000000..2822031
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.7/108-MIPS-BCM63XX-make-nvram-checksum-failure-non-fatal.patch
@@ -0,0 +1,67 @@
+From 5e6669fe7487c58b123da1df5c2d95db43185264 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Tue, 12 Feb 2013 22:00:10 +0100
+Subject: [PATCH] MIPS: BCM63XX: make nvram checksum failure non fatal
+
+Some vendors modify the nvram layout moving the checksum to a different
+place or drop it entirely, so reduce the checksum failure to a warning.
+
+Reported-by: Álvaro Fernández Rojas <noltari@gmail.com>
+Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+---
+ arch/mips/bcm63xx/boards/board_bcm963xx.c | 5 +----
+ arch/mips/bcm63xx/nvram.c | 7 +++----
+ arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h | 4 +---
+ 3 files changed, 5 insertions(+), 11 deletions(-)
+
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -745,10 +745,7 @@ void __init board_prom_init(void)
+ strcpy(cfe_version, "unknown");
+ printk(KERN_INFO PFX "CFE version: %s\n", cfe_version);
+
+- if (bcm63xx_nvram_init(boot_addr + BCM963XX_NVRAM_OFFSET)) {
+- printk(KERN_ERR PFX "invalid nvram checksum\n");
+- return;
+- }
++ bcm63xx_nvram_init(boot_addr + BCM963XX_NVRAM_OFFSET);
+
+ board_name = bcm63xx_nvram_get_name();
+ /* find board by name */
+--- a/arch/mips/bcm63xx/nvram.c
++++ b/arch/mips/bcm63xx/nvram.c
+@@ -38,7 +38,7 @@ struct bcm963xx_nvram {
+ static struct bcm963xx_nvram nvram;
+ static int mac_addr_used;
+
+-int __init bcm63xx_nvram_init(void *addr)
++void __init bcm63xx_nvram_init(void *addr)
+ {
+ unsigned int check_len;
+ u32 crc, expected_crc;
+@@ -60,9 +60,8 @@ int __init bcm63xx_nvram_init(void *addr
+ crc = crc32_le(~0, (u8 *)&nvram, check_len);
+
+ if (crc != expected_crc)
+- return -EINVAL;
+-
+- return 0;
++ pr_warn("nvram checksum invalid (expected %08x, actual %08x)\n",
++ expected_crc, crc);
+ }
+
+ u8 *bcm63xx_nvram_get_name(void)
+--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
++++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
+@@ -9,10 +9,8 @@
+ *
+ * Initialized the local nvram copy from the target address and checks
+ * its checksum.
+- *
+- * Returns 0 on success.
+ */
+-int __init bcm63xx_nvram_init(void *nvram);
++void bcm63xx_nvram_init(void *nvram);
+
+ /**
+ * bcm63xx_nvram_get_name() - returns the board name according to nvram
diff --git a/target/linux/brcm63xx/patches-3.7/300-reset_buttons.patch b/target/linux/brcm63xx/patches-3.7/300-reset_buttons.patch
index 6bdfdc8..8d8df70 100644
--- a/target/linux/brcm63xx/patches-3.7/300-reset_buttons.patch
+++ b/target/linux/brcm63xx/patches-3.7/300-reset_buttons.patch
@@ -53,7 +53,7 @@
};
static struct board_info __initdata board_FAST2404 = {
-@@ -826,11 +851,23 @@ static struct platform_device bcm63xx_gp
+@@ -823,11 +848,23 @@ static struct platform_device bcm63xx_gp
.dev.platform_data = &bcm63xx_led_data,
};
@@ -77,7 +77,7 @@
if (board.has_uart0)
bcm63xx_uart_register(0);
-@@ -876,5 +913,16 @@ int __init board_register_devices(void)
+@@ -873,5 +910,16 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_leds);
diff --git a/target/linux/brcm63xx/patches-3.7/301-led_count.patch b/target/linux/brcm63xx/patches-3.7/301-led_count.patch
index 7271db5..bb49b3d 100644
--- a/target/linux/brcm63xx/patches-3.7/301-led_count.patch
+++ b/target/linux/brcm63xx/patches-3.7/301-led_count.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -867,6 +867,7 @@ static struct platform_device bcm63xx_gp
+@@ -864,6 +864,7 @@ static struct platform_device bcm63xx_gp
int __init board_register_devices(void)
{
int button_count = 0;
@@ -8,7 +8,7 @@
if (board.has_uart0)
bcm63xx_uart_register(0);
-@@ -908,10 +909,16 @@ int __init board_register_devices(void)
+@@ -905,10 +906,16 @@ int __init board_register_devices(void)
bcm63xx_flash_register();
diff --git a/target/linux/brcm63xx/patches-3.7/302-extended-platform-devices.patch b/target/linux/brcm63xx/patches-3.7/302-extended-platform-devices.patch
index 1d1cf98..eb663f3 100644
--- a/target/linux/brcm63xx/patches-3.7/302-extended-platform-devices.patch
+++ b/target/linux/brcm63xx/patches-3.7/302-extended-platform-devices.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -907,6 +907,9 @@ int __init board_register_devices(void)
+@@ -904,6 +904,9 @@ int __init board_register_devices(void)
bcm63xx_spi_register();
diff --git a/target/linux/brcm63xx/patches-3.7/303-spi-board-info.patch b/target/linux/brcm63xx/patches-3.7/303-spi-board-info.patch
index 13ff4c4..0133531 100644
--- a/target/linux/brcm63xx/patches-3.7/303-spi-board-info.patch
+++ b/target/linux/brcm63xx/patches-3.7/303-spi-board-info.patch
@@ -8,7 +8,7 @@
#include <asm/addrspace.h>
#include <bcm63xx_board.h>
#include <bcm63xx_cpu.h>
-@@ -910,6 +911,9 @@ int __init board_register_devices(void)
+@@ -907,6 +908,9 @@ int __init board_register_devices(void)
if (board.num_devs)
platform_add_devices(board.devs, board.num_devs);
diff --git a/target/linux/brcm63xx/patches-3.7/304-boardid_fixup.patch b/target/linux/brcm63xx/patches-3.7/304-boardid_fixup.patch
index 9df5e56..8163ce2 100644
--- a/target/linux/brcm63xx/patches-3.7/304-boardid_fixup.patch
+++ b/target/linux/brcm63xx/patches-3.7/304-boardid_fixup.patch
@@ -48,9 +48,9 @@
/*
* early init callback, read nvram data from flash and checksum it
*/
-@@ -776,6 +805,11 @@ void __init board_prom_init(void)
- return;
- }
+@@ -773,6 +802,11 @@ void __init board_prom_init(void)
+
+ bcm63xx_nvram_init(boot_addr + BCM963XX_NVRAM_OFFSET);
+ if (strcmp(cfe_version, "unknown") != 0) {
+ /* cfe present */
diff --git a/target/linux/brcm63xx/patches-3.7/401-MIPS-BCM63XX-register-ohci-device.patch b/target/linux/brcm63xx/patches-3.7/401-MIPS-BCM63XX-register-ohci-device.patch
index 8e8a422..80ff1c2 100644
--- a/target/linux/brcm63xx/patches-3.7/401-MIPS-BCM63XX-register-ohci-device.patch
+++ b/target/linux/brcm63xx/patches-3.7/401-MIPS-BCM63XX-register-ohci-device.patch
@@ -71,7 +71,7 @@ Subject: [PATCH 31/72] MIPS: BCM63XX: register ohci device.
#include <bcm63xx_dev_usb_usbd.h>
#include <board_bcm963xx.h>
-@@ -926,6 +927,9 @@ int __init board_register_devices(void)
+@@ -923,6 +924,9 @@ int __init board_register_devices(void)
if (board.has_usbd)
bcm63xx_usbd_register(&board.usbd);
diff --git a/target/linux/brcm63xx/patches-3.7/403-MIPS-BCM63XX-register-ehci-device.patch b/target/linux/brcm63xx/patches-3.7/403-MIPS-BCM63XX-register-ehci-device.patch
index 1c5615f..10af689 100644
--- a/target/linux/brcm63xx/patches-3.7/403-MIPS-BCM63XX-register-ehci-device.patch
+++ b/target/linux/brcm63xx/patches-3.7/403-MIPS-BCM63XX-register-ehci-device.patch
@@ -52,7 +52,7 @@ Subject: [PATCH 33/72] MIPS: BCM63XX: register ehci device.
#include <bcm63xx_dev_usb_usbd.h>
#include <board_bcm963xx.h>
-@@ -927,6 +928,9 @@ int __init board_register_devices(void)
+@@ -924,6 +925,9 @@ int __init board_register_devices(void)
if (board.has_usbd)
bcm63xx_usbd_register(&board.usbd);
diff --git a/target/linux/brcm63xx/patches-3.7/408-6358-enet1-external-mii-clk.patch b/target/linux/brcm63xx/patches-3.7/408-6358-enet1-external-mii-clk.patch
index a678c8a..6b4886d 100644
--- a/target/linux/brcm63xx/patches-3.7/408-6358-enet1-external-mii-clk.patch
+++ b/target/linux/brcm63xx/patches-3.7/408-6358-enet1-external-mii-clk.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -862,6 +862,8 @@ void __init board_prom_init(void)
+@@ -859,6 +859,8 @@ void __init board_prom_init(void)
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G3_EXT_MII |
GPIO_MODE_6348_G0_EXT_MII;
diff --git a/target/linux/brcm63xx/patches-3.7/415-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch b/target/linux/brcm63xx/patches-3.7/415-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch
index dab4613..5dec825 100644
--- a/target/linux/brcm63xx/patches-3.7/415-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch
+++ b/target/linux/brcm63xx/patches-3.7/415-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch
@@ -13,7 +13,7 @@ Subject: [PATCH 31/63] bcm63xx_enet: add support for bcm6368 internal ethernet s
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -930,6 +930,10 @@ int __init board_register_devices(void)
+@@ -927,6 +927,10 @@ int __init board_register_devices(void)
if (board.has_usbd)
bcm63xx_usbd_register(&board.usbd);
diff --git a/target/linux/brcm63xx/patches-3.7/425-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch b/target/linux/brcm63xx/patches-3.7/425-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch
index ee3b5d4..15240ce 100644
--- a/target/linux/brcm63xx/patches-3.7/425-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch
+++ b/target/linux/brcm63xx/patches-3.7/425-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch
@@ -36,7 +36,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
#include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_spi.h>
#include <bcm63xx_dev_usb_ohci.h>
-@@ -955,6 +956,7 @@ int __init board_register_devices(void)
+@@ -952,6 +953,7 @@ int __init board_register_devices(void)
pr_err(PFX "failed to register fallback SPROM\n");
}
#endif
diff --git a/target/linux/brcm63xx/patches-3.7/429-MIPS-BCM63XX-export-PSI-size-from-nvram.patch b/target/linux/brcm63xx/patches-3.7/429-MIPS-BCM63XX-export-PSI-size-from-nvram.patch
index 3c3559a..6841338 100644
--- a/target/linux/brcm63xx/patches-3.7/429-MIPS-BCM63XX-export-PSI-size-from-nvram.patch
+++ b/target/linux/brcm63xx/patches-3.7/429-MIPS-BCM63XX-export-PSI-size-from-nvram.patch
@@ -20,7 +20,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
static struct bcm963xx_nvram nvram;
static int mac_addr_used;
-@@ -121,3 +123,12 @@ int bcm63xx_nvram_get_mac_address(u8 *ma
+@@ -104,3 +106,12 @@ int bcm63xx_nvram_get_mac_address(u8 *ma
return 0;
}
EXPORT_SYMBOL(bcm63xx_nvram_get_mac_address);
@@ -35,7 +35,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
+EXPORT_SYMBOL(bcm63xx_nvram_get_psi_size);
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
-@@ -32,4 +32,6 @@ u8 *bcm63xx_nvram_get_name(void);
+@@ -30,4 +30,6 @@ u8 *bcm63xx_nvram_get_name(void);
*/
int bcm63xx_nvram_get_mac_address(u8 *mac);
diff --git a/target/linux/brcm63xx/patches-3.7/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch b/target/linux/brcm63xx/patches-3.7/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch
index 71f3a14..033a8a5 100644
--- a/target/linux/brcm63xx/patches-3.7/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch
+++ b/target/linux/brcm63xx/patches-3.7/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch
@@ -18,7 +18,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data
#include <uapi/linux/bcm963xx_tag.h>
-@@ -910,6 +911,7 @@ int __init board_register_devices(void)
+@@ -907,6 +908,7 @@ int __init board_register_devices(void)
{
int button_count = 0;
int led_count = 0;
@@ -26,7 +26,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data
if (board.has_uart0)
bcm63xx_uart_register(0);
-@@ -948,7 +950,8 @@ int __init board_register_devices(void)
+@@ -945,7 +947,8 @@ int __init board_register_devices(void)
* do this after registering enet devices
*/
#ifdef CONFIG_SSB_PCIHOST
@@ -36,7 +36,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data
memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
if (ssb_arch_register_fallback_sprom(
-@@ -990,5 +993,9 @@ int __init board_register_devices(void)
+@@ -987,5 +990,9 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_keys_device);
}
diff --git a/target/linux/brcm63xx/patches-3.7/437-MIPS-BCM63XX-pass-caldata-info-to-flash.patch b/target/linux/brcm63xx/patches-3.7/437-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
index 08d6a91..fb3b4f0 100644
--- a/target/linux/brcm63xx/patches-3.7/437-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
+++ b/target/linux/brcm63xx/patches-3.7/437-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
@@ -11,7 +11,7 @@ Subject: [PATCH 69/80] MIPS: BCM63XX: pass caldata info to flash
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -969,7 +969,7 @@ int __init board_register_devices(void)
+@@ -966,7 +966,7 @@ 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-3.7/444-BCM63XX-add-endian-check-for-ath9k.patch b/target/linux/brcm63xx/patches-3.7/444-BCM63XX-add-endian-check-for-ath9k.patch
index cfe18cc..2127bf3 100644
--- a/target/linux/brcm63xx/patches-3.7/444-BCM63XX-add-endian-check-for-ath9k.patch
+++ b/target/linux/brcm63xx/patches-3.7/444-BCM63XX-add-endian-check-for-ath9k.patch
@@ -41,7 +41,7 @@ Subject: [PATCH] BCM63XX: add endian check for ath9k
return;
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -995,7 +995,8 @@ int __init board_register_devices(void)
+@@ -992,7 +992,8 @@ int __init board_register_devices(void)
/* register any fixups */
for (i = 0; i < board.has_caldata; i++)
diff --git a/target/linux/brcm63xx/patches-3.7/445-BCM63XX-add-led-pin-for-ath9k.patch b/target/linux/brcm63xx/patches-3.7/445-BCM63XX-add-led-pin-for-ath9k.patch
index 6baf0c2..cb724e6 100644
--- a/target/linux/brcm63xx/patches-3.7/445-BCM63XX-add-led-pin-for-ath9k.patch
+++ b/target/linux/brcm63xx/patches-3.7/445-BCM63XX-add-led-pin-for-ath9k.patch
@@ -2,7 +2,7 @@ From: Álvaro Fernández Rojas <noltari@gmail.com>
Subject: BCM63XX: add led pin for ath9k
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -996,7 +996,7 @@ int __init board_register_devices(void)
+@@ -993,7 +993,7 @@ int __init board_register_devices(void)
/* register any fixups */
for (i = 0; i < board.has_caldata; i++)
pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset,
diff --git a/target/linux/brcm63xx/patches-3.7/446-BCM63XX-add-a-fixup-for-rt2x00-devices.patch b/target/linux/brcm63xx/patches-3.7/446-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
index c7176e0..033cdb4 100644
--- a/target/linux/brcm63xx/patches-3.7/446-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
+++ b/target/linux/brcm63xx/patches-3.7/446-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
@@ -36,7 +36,7 @@ Subject: [PATCH 72/72] 446-BCM63XX-add-a-fixup-for-rt2x00-devices
#include <uapi/linux/bcm963xx_tag.h>
-@@ -994,9 +995,19 @@ int __init board_register_devices(void)
+@@ -991,9 +992,19 @@ int __init board_register_devices(void)
}
/* register any fixups */
diff --git a/target/linux/brcm63xx/patches-3.7/511-board_V2500V.patch b/target/linux/brcm63xx/patches-3.7/511-board_V2500V.patch
index 402336f..20ce84c 100644
--- a/target/linux/brcm63xx/patches-3.7/511-board_V2500V.patch
+++ b/target/linux/brcm63xx/patches-3.7/511-board_V2500V.patch
@@ -88,8 +88,8 @@
+ if (boot_addr == (u8 *)0xbf800000) {
+ u8 *tmp_boot_addr = (u8*)0xbfc00000;
+
-+ if (!bcm63xx_nvram_init(tmp_boot_addr + BCM963XX_NVRAM_OFFSET) &&
-+ !strcmp(bcm63xx_nvram_get_name(), "V2500V_BB")) {
++ bcm63xx_nvram_init(tmp_boot_addr + BCM963XX_NVRAM_OFFSET);
++ if(!strcmp(bcm63xx_nvram_get_name(), "V2500V_BB")) {
+ printk(KERN_INFO PFX "V2500V: nvram bank 0\n");
+ boot_addr = tmp_boot_addr;
+ }
diff --git a/target/linux/brcm63xx/patches-3.7/520-bcm63xx-add-support-for-96368MVWG-board.patch b/target/linux/brcm63xx/patches-3.7/520-bcm63xx-add-support-for-96368MVWG-board.patch
index e69d83d..c3b2c16 100644
--- a/target/linux/brcm63xx/patches-3.7/520-bcm63xx-add-support-for-96368MVWG-board.patch
+++ b/target/linux/brcm63xx/patches-3.7/520-bcm63xx-add-support-for-96368MVWG-board.patch
@@ -100,7 +100,7 @@ Subject: [PATCH 32/63] bcm63xx: add support for 96368MVWG board.
};
/*
-@@ -2412,12 +2488,25 @@ void __init board_prom_init(void)
+@@ -2409,12 +2485,25 @@ void __init board_prom_init(void)
bcm63xx_pci_enabled = 1;
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G2_PCI;
diff --git a/target/linux/brcm63xx/patches-3.7/800-wl_exports.patch b/target/linux/brcm63xx/patches-3.7/800-wl_exports.patch
index ccb8710..4d8a238 100644
--- a/target/linux/brcm63xx/patches-3.7/800-wl_exports.patch
+++ b/target/linux/brcm63xx/patches-3.7/800-wl_exports.patch
@@ -11,10 +11,10 @@
+char nvram_buf[NVRAM_SPACE];
+EXPORT_SYMBOL(nvram_buf);
+
- int __init bcm63xx_nvram_init(void *addr)
+ void __init bcm63xx_nvram_init(void *addr)
{
unsigned int check_len;
-@@ -47,6 +54,7 @@ int __init bcm63xx_nvram_init(void *addr
+@@ -47,6 +54,7 @@ void __init bcm63xx_nvram_init(void *add
/* extract nvram data */
memcpy(&nvram, addr, sizeof(nvram));
diff --git a/target/linux/brcm63xx/patches-3.8/119-MIPS-BCM63XX-handle-huawei-nvram-layout.patch b/target/linux/brcm63xx/patches-3.8/119-MIPS-BCM63XX-handle-huawei-nvram-layout.patch
deleted file mode 100644
index 14d8339..0000000
--- a/target/linux/brcm63xx/patches-3.8/119-MIPS-BCM63XX-handle-huawei-nvram-layout.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From fb1e2c8a1073297f4674ca90c7d533de5187d158 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sat, 9 Feb 2013 12:09:53 +0100
-Subject: [PATCH] MIPS: BCM63XX: handle huawei nvram layout
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Huawei uses a custom nvram layout, extending it with additional 32
-byte field. This pushes also the checksum further, causing it to
-always fail the check.
-
-Add an additional crc check for handling this modified nvram layout
-based on the different size.
-
-Reported-by: Álvaro Fernández Rojas <noltari@gmail.com>
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/nvram.c | 18 +++++++++++++++++-
- 1 file changed, 17 insertions(+), 1 deletion(-)
-
---- a/arch/mips/bcm63xx/nvram.c
-+++ b/arch/mips/bcm63xx/nvram.c
-@@ -59,8 +59,24 @@ int __init bcm63xx_nvram_init(void *addr
-
- crc = crc32_le(~0, (u8 *)&nvram, check_len);
-
-- if (crc != expected_crc)
-+ if (crc != expected_crc) {
-+ /* huawei uses a modified nvram that is 32 bytes longer */
-+ if (nvram.version == 2 && !strncmp(nvram.name, "HW5", 3)) {
-+ check_len += 32;
-+
-+ /* restore old value */
-+ nvram.checksum_old = expected_crc;
-+ expected_crc = *(u32 *)&nvram.reserved3[28];
-+ /* zero the checksum field */
-+ memset(&nvram.reserved3[28], 0, 4);
-+
-+ crc = crc32_le(~0, (u8 *)&nvram, check_len);
-+
-+ if (crc == expected_crc)
-+ return 0;
-+ }
- return -EINVAL;
-+ }
-
- return 0;
- }
diff --git a/target/linux/brcm63xx/patches-3.8/119-MIPS-BCM63XX-make-nvram-checksum-failure-non-fatal.patch b/target/linux/brcm63xx/patches-3.8/119-MIPS-BCM63XX-make-nvram-checksum-failure-non-fatal.patch
new file mode 100644
index 0000000..3486c00
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.8/119-MIPS-BCM63XX-make-nvram-checksum-failure-non-fatal.patch
@@ -0,0 +1,67 @@
+From 5e6669fe7487c58b123da1df5c2d95db43185264 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Tue, 12 Feb 2013 22:00:10 +0100
+Subject: [PATCH] MIPS: BCM63XX: make nvram checksum failure non fatal
+
+Some vendors modify the nvram layout moving the checksum to a different
+place or drop it entirely, so reduce the checksum failure to a warning.
+
+Reported-by: Álvaro Fernández Rojas <noltari@gmail.com>
+Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+---
+ arch/mips/bcm63xx/boards/board_bcm963xx.c | 5 +----
+ arch/mips/bcm63xx/nvram.c | 7 +++----
+ arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h | 4 +---
+ 3 files changed, 5 insertions(+), 11 deletions(-)
+
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -747,10 +747,7 @@ void __init board_prom_init(void)
+ strcpy(cfe_version, "unknown");
+ printk(KERN_INFO PFX "CFE version: %s\n", cfe_version);
+
+- if (bcm63xx_nvram_init(boot_addr + BCM963XX_NVRAM_OFFSET)) {
+- printk(KERN_ERR PFX "invalid nvram checksum\n");
+- return;
+- }
++ bcm63xx_nvram_init(boot_addr + BCM963XX_NVRAM_OFFSET);
+
+ board_name = bcm63xx_nvram_get_name();
+ /* find board by name */
+--- a/arch/mips/bcm63xx/nvram.c
++++ b/arch/mips/bcm63xx/nvram.c
+@@ -38,7 +38,7 @@ struct bcm963xx_nvram {
+ static struct bcm963xx_nvram nvram;
+ static int mac_addr_used;
+
+-int __init bcm63xx_nvram_init(void *addr)
++void __init bcm63xx_nvram_init(void *addr)
+ {
+ unsigned int check_len;
+ u32 crc, expected_crc;
+@@ -60,9 +60,8 @@ int __init bcm63xx_nvram_init(void *addr
+ crc = crc32_le(~0, (u8 *)&nvram, check_len);
+
+ if (crc != expected_crc)
+- return -EINVAL;
+-
+- return 0;
++ pr_warn("nvram checksum invalid (expected %08x, actual %08x)\n",
++ expected_crc, crc);
+ }
+
+ u8 *bcm63xx_nvram_get_name(void)
+--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
++++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
+@@ -9,10 +9,8 @@
+ *
+ * Initialized the local nvram copy from the target address and checks
+ * its checksum.
+- *
+- * Returns 0 on success.
+ */
+-int __init bcm63xx_nvram_init(void *nvram);
++void bcm63xx_nvram_init(void *nvram);
+
+ /**
+ * bcm63xx_nvram_get_name() - returns the board name according to nvram
diff --git a/target/linux/brcm63xx/patches-3.8/300-reset_buttons.patch b/target/linux/brcm63xx/patches-3.8/300-reset_buttons.patch
index 8057c79..4415836 100644
--- a/target/linux/brcm63xx/patches-3.8/300-reset_buttons.patch
+++ b/target/linux/brcm63xx/patches-3.8/300-reset_buttons.patch
@@ -53,7 +53,7 @@
};
static struct board_info __initdata board_FAST2404 = {
-@@ -828,11 +853,23 @@ static struct platform_device bcm63xx_gp
+@@ -825,11 +850,23 @@ static struct platform_device bcm63xx_gp
.dev.platform_data = &bcm63xx_led_data,
};
@@ -77,7 +77,7 @@
if (board.has_uart0)
bcm63xx_uart_register(0);
-@@ -884,5 +921,16 @@ int __init board_register_devices(void)
+@@ -881,5 +918,16 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_leds);
diff --git a/target/linux/brcm63xx/patches-3.8/301-led_count.patch b/target/linux/brcm63xx/patches-3.8/301-led_count.patch
index 1c67979..c85405a 100644
--- a/target/linux/brcm63xx/patches-3.8/301-led_count.patch
+++ b/target/linux/brcm63xx/patches-3.8/301-led_count.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -869,6 +869,7 @@ static struct platform_device bcm63xx_gp
+@@ -866,6 +866,7 @@ static struct platform_device bcm63xx_gp
int __init board_register_devices(void)
{
int button_count = 0;
@@ -8,7 +8,7 @@
if (board.has_uart0)
bcm63xx_uart_register(0);
-@@ -916,10 +917,16 @@ int __init board_register_devices(void)
+@@ -913,10 +914,16 @@ int __init board_register_devices(void)
bcm63xx_flash_register();
diff --git a/target/linux/brcm63xx/patches-3.8/302-extended-platform-devices.patch b/target/linux/brcm63xx/patches-3.8/302-extended-platform-devices.patch
index 871dd0b..54cddc4 100644
--- a/target/linux/brcm63xx/patches-3.8/302-extended-platform-devices.patch
+++ b/target/linux/brcm63xx/patches-3.8/302-extended-platform-devices.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -915,6 +915,9 @@ int __init board_register_devices(void)
+@@ -912,6 +912,9 @@ int __init board_register_devices(void)
bcm63xx_spi_register();
diff --git a/target/linux/brcm63xx/patches-3.8/303-spi-board-info.patch b/target/linux/brcm63xx/patches-3.8/303-spi-board-info.patch
index 1858f61..a1ba0cc 100644
--- a/target/linux/brcm63xx/patches-3.8/303-spi-board-info.patch
+++ b/target/linux/brcm63xx/patches-3.8/303-spi-board-info.patch
@@ -8,7 +8,7 @@
#include <asm/addrspace.h>
#include <bcm63xx_board.h>
#include <bcm63xx_cpu.h>
-@@ -918,6 +919,9 @@ int __init board_register_devices(void)
+@@ -915,6 +916,9 @@ int __init board_register_devices(void)
if (board.num_devs)
platform_add_devices(board.devs, board.num_devs);
diff --git a/target/linux/brcm63xx/patches-3.8/304-boardid_fixup.patch b/target/linux/brcm63xx/patches-3.8/304-boardid_fixup.patch
index a1d2f8ed..f29ad6f 100644
--- a/target/linux/brcm63xx/patches-3.8/304-boardid_fixup.patch
+++ b/target/linux/brcm63xx/patches-3.8/304-boardid_fixup.patch
@@ -48,9 +48,9 @@
/*
* early init callback, read nvram data from flash and checksum it
*/
-@@ -778,6 +807,11 @@ void __init board_prom_init(void)
- return;
- }
+@@ -775,6 +804,11 @@ void __init board_prom_init(void)
+
+ bcm63xx_nvram_init(boot_addr + BCM963XX_NVRAM_OFFSET);
+ if (strcmp(cfe_version, "unknown") != 0) {
+ /* cfe present */
diff --git a/target/linux/brcm63xx/patches-3.8/408-6358-enet1-external-mii-clk.patch b/target/linux/brcm63xx/patches-3.8/408-6358-enet1-external-mii-clk.patch
index 4c4a02f..4ead53f 100644
--- a/target/linux/brcm63xx/patches-3.8/408-6358-enet1-external-mii-clk.patch
+++ b/target/linux/brcm63xx/patches-3.8/408-6358-enet1-external-mii-clk.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -862,6 +862,8 @@ void __init board_prom_init(void)
+@@ -859,6 +859,8 @@ void __init board_prom_init(void)
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G3_EXT_MII |
GPIO_MODE_6348_G0_EXT_MII;
diff --git a/target/linux/brcm63xx/patches-3.8/415-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch b/target/linux/brcm63xx/patches-3.8/415-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch
index c10acd0..ef61519 100644
--- a/target/linux/brcm63xx/patches-3.8/415-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch
+++ b/target/linux/brcm63xx/patches-3.8/415-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch
@@ -13,7 +13,7 @@ Subject: [PATCH 31/63] bcm63xx_enet: add support for bcm6368 internal ethernet s
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -930,6 +930,10 @@ int __init board_register_devices(void)
+@@ -927,6 +927,10 @@ int __init board_register_devices(void)
if (board.has_usbd)
bcm63xx_usbd_register(&board.usbd);
diff --git a/target/linux/brcm63xx/patches-3.8/425-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch b/target/linux/brcm63xx/patches-3.8/425-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch
index ab6225d..babe04a 100644
--- a/target/linux/brcm63xx/patches-3.8/425-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch
+++ b/target/linux/brcm63xx/patches-3.8/425-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch
@@ -37,7 +37,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
#include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_spi.h>
#include <bcm63xx_dev_usb_ehci.h>
-@@ -955,6 +956,7 @@ int __init board_register_devices(void)
+@@ -952,6 +953,7 @@ int __init board_register_devices(void)
pr_err(PFX "failed to register fallback SPROM\n");
}
#endif
diff --git a/target/linux/brcm63xx/patches-3.8/429-MIPS-BCM63XX-export-PSI-size-from-nvram.patch b/target/linux/brcm63xx/patches-3.8/429-MIPS-BCM63XX-export-PSI-size-from-nvram.patch
index 3c3559a..6841338 100644
--- a/target/linux/brcm63xx/patches-3.8/429-MIPS-BCM63XX-export-PSI-size-from-nvram.patch
+++ b/target/linux/brcm63xx/patches-3.8/429-MIPS-BCM63XX-export-PSI-size-from-nvram.patch
@@ -20,7 +20,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
static struct bcm963xx_nvram nvram;
static int mac_addr_used;
-@@ -121,3 +123,12 @@ int bcm63xx_nvram_get_mac_address(u8 *ma
+@@ -104,3 +106,12 @@ int bcm63xx_nvram_get_mac_address(u8 *ma
return 0;
}
EXPORT_SYMBOL(bcm63xx_nvram_get_mac_address);
@@ -35,7 +35,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
+EXPORT_SYMBOL(bcm63xx_nvram_get_psi_size);
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
-@@ -32,4 +32,6 @@ u8 *bcm63xx_nvram_get_name(void);
+@@ -30,4 +30,6 @@ u8 *bcm63xx_nvram_get_name(void);
*/
int bcm63xx_nvram_get_mac_address(u8 *mac);
diff --git a/target/linux/brcm63xx/patches-3.8/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch b/target/linux/brcm63xx/patches-3.8/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch
index 5f3de7d..06d0b1b 100644
--- a/target/linux/brcm63xx/patches-3.8/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch
+++ b/target/linux/brcm63xx/patches-3.8/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch
@@ -18,7 +18,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data
#include <uapi/linux/bcm963xx_tag.h>
-@@ -910,6 +911,7 @@ int __init board_register_devices(void)
+@@ -907,6 +908,7 @@ int __init board_register_devices(void)
{
int button_count = 0;
int led_count = 0;
@@ -26,7 +26,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data
if (board.has_uart0)
bcm63xx_uart_register(0);
-@@ -948,7 +950,8 @@ int __init board_register_devices(void)
+@@ -945,7 +947,8 @@ int __init board_register_devices(void)
* do this after registering enet devices
*/
#ifdef CONFIG_SSB_PCIHOST
@@ -36,7 +36,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data
memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
if (ssb_arch_register_fallback_sprom(
-@@ -990,5 +993,9 @@ int __init board_register_devices(void)
+@@ -987,5 +990,9 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_keys_device);
}
diff --git a/target/linux/brcm63xx/patches-3.8/437-MIPS-BCM63XX-pass-caldata-info-to-flash.patch b/target/linux/brcm63xx/patches-3.8/437-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
index 08d6a91..fb3b4f0 100644
--- a/target/linux/brcm63xx/patches-3.8/437-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
+++ b/target/linux/brcm63xx/patches-3.8/437-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
@@ -11,7 +11,7 @@ Subject: [PATCH 69/80] MIPS: BCM63XX: pass caldata info to flash
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -969,7 +969,7 @@ int __init board_register_devices(void)
+@@ -966,7 +966,7 @@ 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-3.8/444-BCM63XX-add-endian-check-for-ath9k.patch b/target/linux/brcm63xx/patches-3.8/444-BCM63XX-add-endian-check-for-ath9k.patch
index 70be684..bdcb3e0 100644
--- a/target/linux/brcm63xx/patches-3.8/444-BCM63XX-add-endian-check-for-ath9k.patch
+++ b/target/linux/brcm63xx/patches-3.8/444-BCM63XX-add-endian-check-for-ath9k.patch
@@ -39,7 +39,7 @@
return;
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -995,7 +995,8 @@ int __init board_register_devices(void)
+@@ -992,7 +992,8 @@ int __init board_register_devices(void)
/* register any fixups */
for (i = 0; i < board.has_caldata; i++)
diff --git a/target/linux/brcm63xx/patches-3.8/445-BCM63XX-add-led-pin-for-ath9k.patch b/target/linux/brcm63xx/patches-3.8/445-BCM63XX-add-led-pin-for-ath9k.patch
index e56031f..4f77179 100644
--- a/target/linux/brcm63xx/patches-3.8/445-BCM63XX-add-led-pin-for-ath9k.patch
+++ b/target/linux/brcm63xx/patches-3.8/445-BCM63XX-add-led-pin-for-ath9k.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -996,7 +996,7 @@ int __init board_register_devices(void)
+@@ -993,7 +993,7 @@ int __init board_register_devices(void)
/* register any fixups */
for (i = 0; i < board.has_caldata; i++)
pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset,
diff --git a/target/linux/brcm63xx/patches-3.8/446-BCM63XX-add-a-fixup-for-rt2x00-devices.patch b/target/linux/brcm63xx/patches-3.8/446-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
index e619005..039e988 100644
--- a/target/linux/brcm63xx/patches-3.8/446-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
+++ b/target/linux/brcm63xx/patches-3.8/446-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
@@ -36,7 +36,7 @@ Subject: [PATCH 72/72] 446-BCM63XX-add-a-fixup-for-rt2x00-devices
#include <uapi/linux/bcm963xx_tag.h>
-@@ -994,9 +995,19 @@ int __init board_register_devices(void)
+@@ -991,9 +992,19 @@ int __init board_register_devices(void)
}
/* register any fixups */
diff --git a/target/linux/brcm63xx/patches-3.8/511-board_V2500V.patch b/target/linux/brcm63xx/patches-3.8/511-board_V2500V.patch
index 402336f..899a894 100644
--- a/target/linux/brcm63xx/patches-3.8/511-board_V2500V.patch
+++ b/target/linux/brcm63xx/patches-3.8/511-board_V2500V.patch
@@ -88,8 +88,8 @@
+ if (boot_addr == (u8 *)0xbf800000) {
+ u8 *tmp_boot_addr = (u8*)0xbfc00000;
+
-+ if (!bcm63xx_nvram_init(tmp_boot_addr + BCM963XX_NVRAM_OFFSET) &&
-+ !strcmp(bcm63xx_nvram_get_name(), "V2500V_BB")) {
++ bcm63xx_nvram_init(tmp_boot_addr + BCM963XX_NVRAM_OFFSET);
++ if (!strcmp(bcm63xx_nvram_get_name(), "V2500V_BB")) {
+ printk(KERN_INFO PFX "V2500V: nvram bank 0\n");
+ boot_addr = tmp_boot_addr;
+ }
diff --git a/target/linux/brcm63xx/patches-3.8/520-bcm63xx-add-support-for-96368MVWG-board.patch b/target/linux/brcm63xx/patches-3.8/520-bcm63xx-add-support-for-96368MVWG-board.patch
index e69d83d..c3b2c16 100644
--- a/target/linux/brcm63xx/patches-3.8/520-bcm63xx-add-support-for-96368MVWG-board.patch
+++ b/target/linux/brcm63xx/patches-3.8/520-bcm63xx-add-support-for-96368MVWG-board.patch
@@ -100,7 +100,7 @@ Subject: [PATCH 32/63] bcm63xx: add support for 96368MVWG board.
};
/*
-@@ -2412,12 +2488,25 @@ void __init board_prom_init(void)
+@@ -2409,12 +2485,25 @@ void __init board_prom_init(void)
bcm63xx_pci_enabled = 1;
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G2_PCI;
diff --git a/target/linux/brcm63xx/patches-3.8/800-wl_exports.patch b/target/linux/brcm63xx/patches-3.8/800-wl_exports.patch
index ccb8710..4d8a238 100644
--- a/target/linux/brcm63xx/patches-3.8/800-wl_exports.patch
+++ b/target/linux/brcm63xx/patches-3.8/800-wl_exports.patch
@@ -11,10 +11,10 @@
+char nvram_buf[NVRAM_SPACE];
+EXPORT_SYMBOL(nvram_buf);
+
- int __init bcm63xx_nvram_init(void *addr)
+ void __init bcm63xx_nvram_init(void *addr)
{
unsigned int check_len;
-@@ -47,6 +54,7 @@ int __init bcm63xx_nvram_init(void *addr
+@@ -47,6 +54,7 @@ void __init bcm63xx_nvram_init(void *add
/* extract nvram data */
memcpy(&nvram, addr, sizeof(nvram));