aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.14
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm47xx/patches-3.14')
-rw-r--r--target/linux/brcm47xx/patches-3.14/027-mtd-bcm47xxpart-get-nvram.patch34
-rw-r--r--target/linux/brcm47xx/patches-3.14/128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch78
-rw-r--r--target/linux/brcm47xx/patches-3.14/139-MIPS-BCM47XX-detect-more-linksys-devices.patch39
-rw-r--r--target/linux/brcm47xx/patches-3.14/140-MIPS-BCM47XX-add-button-and-led-configuration-for-so.patch133
-rw-r--r--target/linux/brcm47xx/patches-3.14/141-MIPS-BCM47XX-add-detection-and-GPIO-config-for-Sieme.patch89
-rw-r--r--target/linux/brcm47xx/patches-3.14/142-MIPS-BCM47XX-add-Belkin-F7Dxxxx-board-detection.patch77
-rw-r--r--target/linux/brcm47xx/patches-3.14/144-make-reboot-more-reliable.patch40
-rw-r--r--target/linux/brcm47xx/patches-3.14/145-MIPS-BCM47XX-fixup-broken-MAC-addresses-in-nvram.patch95
-rw-r--r--target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-add-Microsoft-MN-700-and-Asus-WL500G.patch170
-rw-r--r--target/linux/brcm47xx/patches-3.14/147-MIPS-BCM47xx-Distinguish-WRT54G-series-devices-by-bo.patch110
-rw-r--r--target/linux/brcm47xx/patches-3.14/148-MIPS-BCM47xx-Fix-LEDs-on-WRT54GS-V1.0.patch45
-rw-r--r--target/linux/brcm47xx/patches-3.14/149-MIPS-BCM47XX-Move-shared-symbols-to-the-config-BCM47.patch50
-rw-r--r--target/linux/brcm47xx/patches-3.14/150-MIPS-BCM47XX-Select-SYS_SUPPORTS_HIGHMEM-for-BCM47XX.patch32
-rw-r--r--target/linux/brcm47xx/patches-3.14/151-MIPS-BCM47XX-Devices-database-update-for-3.17.patch183
-rw-r--r--target/linux/brcm47xx/patches-3.14/152-Revert-MIPS-Delete-unused-function-add_temporary_ent.patch107
-rw-r--r--target/linux/brcm47xx/patches-3.14/153-MIPS-BCM47XX-Detect-more-then-128-MiB-of-RAM-HIGHMEM.patch166
-rw-r--r--target/linux/brcm47xx/patches-3.14/154-MIPS-BCM47XX-Get-rid-of-calls-to-KSEG1ADDR.patch132
-rw-r--r--target/linux/brcm47xx/patches-3.14/155-MIPS-BCM47XX-Make-ssb-init-NVRAM-instead-of-bcm47xx-.patch133
-rw-r--r--target/linux/brcm47xx/patches-3.14/156-MIPS-BCM47XX-Make-bcma-init-NVRAM-instead-of-bcm47xx.patch113
-rw-r--r--target/linux/brcm47xx/patches-3.14/157-MIPS-BCM47XX-Move-SPROM-fallback-code-into-sprom.c.patch216
-rw-r--r--target/linux/brcm47xx/patches-3.14/158-MIPS-BCM47XX-Initialize-bcma-bus-later-with-mm-avail.patch120
-rw-r--r--target/linux/brcm47xx/patches-3.14/159-cpu_fixes.patch373
-rw-r--r--target/linux/brcm47xx/patches-3.14/160-kmap_coherent.patch70
-rw-r--r--target/linux/brcm47xx/patches-3.14/209-b44-register-adm-switch.patch122
-rw-r--r--target/linux/brcm47xx/patches-3.14/210-b44_phy_fix.patch54
-rw-r--r--target/linux/brcm47xx/patches-3.14/280-activate_ssb_support_in_usb.patch25
-rw-r--r--target/linux/brcm47xx/patches-3.14/300-fork_cacheflush.patch11
-rw-r--r--target/linux/brcm47xx/patches-3.14/310-no_highpage.patch66
-rw-r--r--target/linux/brcm47xx/patches-3.14/320-MIPS-BCM47XX-Devices-database-update-for-3.x.patch67
-rw-r--r--target/linux/brcm47xx/patches-3.14/610-pci_ide_fix.patch14
-rw-r--r--target/linux/brcm47xx/patches-3.14/791-tg3-no-pci-sleep.patch17
-rw-r--r--target/linux/brcm47xx/patches-3.14/800-bcma-add-table-of-serial-flashes-with-smaller-blocks.patch72
-rw-r--r--target/linux/brcm47xx/patches-3.14/820-wgt634u-nvram-fix.patch296
-rw-r--r--target/linux/brcm47xx/patches-3.14/830-huawei_e970_support.patch101
-rw-r--r--target/linux/brcm47xx/patches-3.14/920-cache-wround.patch138
-rw-r--r--target/linux/brcm47xx/patches-3.14/940-bcm47xx-yenta.patch46
-rw-r--r--target/linux/brcm47xx/patches-3.14/976-ssb_increase_pci_delay.patch11
-rw-r--r--target/linux/brcm47xx/patches-3.14/980-wnr834b_no_cardbus_invariant.patch13
-rw-r--r--target/linux/brcm47xx/patches-3.14/999-wl_exports.patch22
39 files changed, 0 insertions, 3680 deletions
diff --git a/target/linux/brcm47xx/patches-3.14/027-mtd-bcm47xxpart-get-nvram.patch b/target/linux/brcm47xx/patches-3.14/027-mtd-bcm47xxpart-get-nvram.patch
deleted file mode 100644
index 198bf4bcd5..0000000000
--- a/target/linux/brcm47xx/patches-3.14/027-mtd-bcm47xxpart-get-nvram.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/drivers/mtd/bcm47xxpart.c
-+++ b/drivers/mtd/bcm47xxpart.c
-@@ -93,6 +93,7 @@ static int bcm47xxpart_parse(struct mtd_
- int trx_part = -1;
- int last_trx_part = -1;
- int possible_nvram_sizes[] = { 0x8000, 0xF000, 0x10000, };
-+ bool found_nvram = false;
-
- if (blocksize <= 0x10000)
- blocksize = 0x10000;
-@@ -280,12 +281,23 @@ static int bcm47xxpart_parse(struct mtd_
- if (buf[0] == NVRAM_HEADER) {
- bcm47xxpart_add_part(&parts[curr_part++], "nvram",
- master->size - blocksize, 0);
-+ found_nvram = true;
- break;
- }
- }
-
- kfree(buf);
-
-+ if (!found_nvram) {
-+ pr_err("can not find a nvram partition reserve last block\n");
-+ bcm47xxpart_add_part(&parts[curr_part++], "nvram_guess",
-+ master->size - blocksize * 2, MTD_WRITEABLE);
-+ for (i = 0; i < curr_part; i++) {
-+ if (parts[i].size + parts[i].offset == master->size)
-+ parts[i].offset -= blocksize * 2;
-+ }
-+ }
-+
- /*
- * Assume that partitions end at the beginning of the one they are
- * followed by.
diff --git a/target/linux/brcm47xx/patches-3.14/128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch b/target/linux/brcm47xx/patches-3.14/128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch
deleted file mode 100644
index ea15933ea9..0000000000
--- a/target/linux/brcm47xx/patches-3.14/128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 1f3e1c682a0b5273e3ee8799b54319971f426e6a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Wed, 29 Jan 2014 18:06:52 +0100
-Subject: [RFC V2][PATCH] MIPS: BCM47XX: Add new file for device specific workarounds
-
----
-V2: Drop pr_debug for devices we don't need workarounds for. It was too
- load and not useful at all.
----
- arch/mips/bcm47xx/Makefile | 2 +-
- arch/mips/bcm47xx/bcm47xx_private.h | 3 +++
- arch/mips/bcm47xx/setup.c | 1 +
- arch/mips/bcm47xx/workarounds.c | 25 +++++++++++++++++++++++++
- 4 files changed, 30 insertions(+), 1 deletion(-)
- create mode 100644 arch/mips/bcm47xx/workarounds.c
-
---- a/arch/mips/bcm47xx/Makefile
-+++ b/arch/mips/bcm47xx/Makefile
-@@ -4,4 +4,4 @@
- #
-
- obj-y += irq.o nvram.o prom.o serial.o setup.o time.o sprom.o
--obj-y += board.o buttons.o leds.o
-+obj-y += board.o buttons.o leds.o workarounds.o
---- a/arch/mips/bcm47xx/bcm47xx_private.h
-+++ b/arch/mips/bcm47xx/bcm47xx_private.h
-@@ -9,4 +9,7 @@ int __init bcm47xx_buttons_register(void
- /* leds.c */
- void __init bcm47xx_leds_register(void);
-
-+/* workarounds.c */
-+void __init bcm47xx_workarounds(void);
-+
- #endif
---- a/arch/mips/bcm47xx/setup.c
-+++ b/arch/mips/bcm47xx/setup.c
-@@ -286,6 +286,7 @@ static int __init bcm47xx_register_bus_c
- }
- bcm47xx_buttons_register();
- bcm47xx_leds_register();
-+ bcm47xx_workarounds();
-
- fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status);
- return 0;
---- /dev/null
-+++ b/arch/mips/bcm47xx/workarounds.c
-@@ -0,0 +1,31 @@
-+#include "bcm47xx_private.h"
-+
-+#include <linux/gpio.h>
-+#include <bcm47xx_board.h>
-+#include <bcm47xx.h>
-+
-+static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
-+{
-+ const int usb_power = 12;
-+ int err;
-+
-+ err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
-+ if (err)
-+ pr_err("Failed to request USB power gpio: %d\n", err);
-+ else
-+ gpio_free(usb_power);
-+}
-+
-+void __init bcm47xx_workarounds(void)
-+{
-+ enum bcm47xx_board board = bcm47xx_board_get();
-+
-+ switch (board) {
-+ case BCM47XX_BOARD_NETGEAR_WNR3500L:
-+ bcm47xx_workarounds_netgear_wnr3500l();
-+ break;
-+ default:
-+ /* No workaround(s) needed */
-+ break;
-+ }
-+}
diff --git a/target/linux/brcm47xx/patches-3.14/139-MIPS-BCM47XX-detect-more-linksys-devices.patch b/target/linux/brcm47xx/patches-3.14/139-MIPS-BCM47XX-detect-more-linksys-devices.patch
deleted file mode 100644
index 27828ff968..0000000000
--- a/target/linux/brcm47xx/patches-3.14/139-MIPS-BCM47XX-detect-more-linksys-devices.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From b09189336f6d974c554aed03b4651e9f68ce0abd Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Sun, 23 Feb 2014 16:38:29 +0100
-Subject: [PATCH 3/6] MIPS: BCM47XX: detect some more Linksys devices
-
-The Linksys WRT54G/GS/GL family uses the same boardtype numbers, and
-the same gpio configuration. The boardtype numbers are changing with
-the hardware versions, but these hardware numbers are different or each
-model.
-Detect them all as one device, this also worked in OpenWrt.
----
- arch/mips/bcm47xx/board.c | 4 +++-
- arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 2 +-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
---- a/arch/mips/bcm47xx/board.c
-+++ b/arch/mips/bcm47xx/board.c
-@@ -176,7 +176,9 @@ struct bcm47xx_board_type_list3 bcm47xx_
- {{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
- {{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
- {{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "0x04CF", "3500", "02"},
-- {{BCM47XX_BOARD_LINKSYS_WRT54GSV1, "Linksys WRT54GS V1"}, "0x0101", "42", "0x10"},
-+ {{BCM47XX_BOARD_LINKSYS_WRT54G, "Linksys WRT54G/GS/GL"}, "0x0101", "42", "0x10"},
-+ {{BCM47XX_BOARD_LINKSYS_WRT54G, "Linksys WRT54G/GS/GL"}, "0x0467", "42", "0x10"},
-+ {{BCM47XX_BOARD_LINKSYS_WRT54G, "Linksys WRT54G/GS/GL"}, "0x0708", "42", "0x10"},
- { {0}, NULL},
- };
-
---- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-@@ -66,7 +66,7 @@ enum bcm47xx_board {
- BCM47XX_BOARD_LINKSYS_WRT310NV1,
- BCM47XX_BOARD_LINKSYS_WRT310NV2,
- BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
-- BCM47XX_BOARD_LINKSYS_WRT54GSV1,
-+ BCM47XX_BOARD_LINKSYS_WRT54G,
- BCM47XX_BOARD_LINKSYS_WRT610NV1,
- BCM47XX_BOARD_LINKSYS_WRT610NV2,
- BCM47XX_BOARD_LINKSYS_WRTSL54GS,
diff --git a/target/linux/brcm47xx/patches-3.14/140-MIPS-BCM47XX-add-button-and-led-configuration-for-so.patch b/target/linux/brcm47xx/patches-3.14/140-MIPS-BCM47XX-add-button-and-led-configuration-for-so.patch
deleted file mode 100644
index 94ead79896..0000000000
--- a/target/linux/brcm47xx/patches-3.14/140-MIPS-BCM47XX-add-button-and-led-configuration-for-so.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From e3d15471f1be2bd2fd4db82907ad4b2d74ec2636 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Fri, 10 Jan 2014 23:55:28 +0100
-Subject: [PATCH 4/6] MIPS: BCM47XX: add button and led configuration for some
- Linksys devices
-
-This adds led and button GPIO configuration for Linksys wrt54g3gv2,
-wrt54gsv1 and wrtsl54gs. This is based on OpenWrt broadcom-diag code.
-
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
----
- arch/mips/bcm47xx/buttons.c | 27 +++++++++++++++++++++++++++
- arch/mips/bcm47xx/leds.c | 33 +++++++++++++++++++++++++++++++++
- 2 files changed, 60 insertions(+)
-
---- a/arch/mips/bcm47xx/buttons.c
-+++ b/arch/mips/bcm47xx/buttons.c
-@@ -259,6 +259,18 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in
- };
-
- static const struct gpio_keys_button
-+bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
-+ BCM47XX_GPIO_KEY(5, KEY_WIMAX),
-+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
-+};
-+
-+static const struct gpio_keys_button
-+bcm47xx_buttons_linksys_wrt54gsv1[] __initconst = {
-+ BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
-+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
-+};
-+
-+static const struct gpio_keys_button
- bcm47xx_buttons_linksys_wrt610nv1[] __initconst = {
- BCM47XX_GPIO_KEY(6, KEY_RESTART),
- BCM47XX_GPIO_KEY(8, KEY_WPS_BUTTON),
-@@ -270,6 +282,12 @@ bcm47xx_buttons_linksys_wrt610nv2[] __in
- BCM47XX_GPIO_KEY(6, KEY_RESTART),
- };
-
-+static const struct gpio_keys_button
-+bcm47xx_buttons_linksys_wrtsl54gs[] __initconst = {
-+ BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
-+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
-+};
-+
- /* Motorola */
-
- static const struct gpio_keys_button
-@@ -479,12 +497,21 @@ int __init bcm47xx_buttons_register(void
- case BCM47XX_BOARD_LINKSYS_WRT310NV1:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
- break;
-+ case BCM47XX_BOARD_LINKSYS_WRT54G:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54gsv1);
-+ break;
-+ case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
-+ break;
- case BCM47XX_BOARD_LINKSYS_WRT610NV1:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv1);
- break;
- case BCM47XX_BOARD_LINKSYS_WRT610NV2:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv2);
- break;
-+ case BCM47XX_BOARD_LINKSYS_WRTSL54GS:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs);
-+ break;
-
- case BCM47XX_BOARD_MOTOROLA_WE800G:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_motorola_we800g);
---- a/arch/mips/bcm47xx/leds.c
-+++ b/arch/mips/bcm47xx/leds.c
-@@ -292,6 +292,21 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc
- };
-
- static const struct gpio_led
-+bcm47xx_leds_linksys_wrt54gsv1[] __initconst = {
-+ BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
-+};
-+
-+static const struct gpio_led
-+bcm47xx_leds_linksys_wrt54g3gv2[] __initconst = {
-+ BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(2, "green", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(3, "blue", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
-+};
-+
-+static const struct gpio_led
- bcm47xx_leds_linksys_wrt610nv1[] __initconst = {
- BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
- BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
-@@ -308,6 +323,15 @@ bcm47xx_leds_linksys_wrt610nv2[] __initc
- BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
- };
-
-+static const struct gpio_led
-+bcm47xx_leds_linksys_wrtsl54gs[] __initconst = {
-+ BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(2, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(3, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(7, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
-+};
-+
- /* Motorola */
-
- static const struct gpio_led
-@@ -502,12 +526,21 @@ void __init bcm47xx_leds_register(void)
- case BCM47XX_BOARD_LINKSYS_WRT310NV1:
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
- break;
-+ case BCM47XX_BOARD_LINKSYS_WRT54G:
-+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54gsv1);
-+ break;
-+ case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
-+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
-+ break;
- case BCM47XX_BOARD_LINKSYS_WRT610NV1:
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv1);
- break;
- case BCM47XX_BOARD_LINKSYS_WRT610NV2:
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv2);
- break;
-+ case BCM47XX_BOARD_LINKSYS_WRTSL54GS:
-+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs);
-+ break;
-
- case BCM47XX_BOARD_MOTOROLA_WE800G:
- bcm47xx_set_pdata(bcm47xx_leds_motorola_we800g);
diff --git a/target/linux/brcm47xx/patches-3.14/141-MIPS-BCM47XX-add-detection-and-GPIO-config-for-Sieme.patch b/target/linux/brcm47xx/patches-3.14/141-MIPS-BCM47XX-add-detection-and-GPIO-config-for-Sieme.patch
deleted file mode 100644
index 8830bfaecc..0000000000
--- a/target/linux/brcm47xx/patches-3.14/141-MIPS-BCM47XX-add-detection-and-GPIO-config-for-Sieme.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From c546fa49901252cbc1e4046d7188858b2f9e130f Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Fri, 10 Jan 2014 23:55:43 +0100
-Subject: [PATCH 2/2] MIPS: BCM47XX: add detection and GPIO config for Siemens
- SE505v2
-
-This adds board detection for the Siemens SE505v2 and the led gpio
-configuration. This board does not have any buttons.
-This is based on OpenWrt broadcom-diag and Manuel Munz's nvram dump.
-
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
----
- arch/mips/bcm47xx/board.c | 17 +++++++++++++++++
- arch/mips/bcm47xx/leds.c | 12 ++++++++++++
- arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 2 ++
- 3 files changed, 31 insertions(+)
-
---- a/arch/mips/bcm47xx/board.c
-+++ b/arch/mips/bcm47xx/board.c
-@@ -182,6 +182,13 @@ struct bcm47xx_board_type_list3 bcm47xx_
- { {0}, NULL},
- };
-
-+/* boardtype, boardrev */
-+static const
-+struct bcm47xx_board_type_list2 bcm47xx_board_list_board_type_rev[] __initconst = {
-+ {{BCM47XX_BOARD_SIEMENS_SE505V2, "Siemens SE505 V2"}, "0x0101", "0x10"},
-+ { {0}, NULL},
-+};
-+
- static const
- struct bcm47xx_board_type bcm47xx_board_unknown[] __initconst = {
- {BCM47XX_BOARD_UNKNOWN, "Unknown Board"},
-@@ -275,6 +282,16 @@ static __init const struct bcm47xx_board
- return &e3->board;
- }
- }
-+
-+ if (bcm47xx_nvram_getenv("boardtype", buf1, sizeof(buf1)) >= 0 &&
-+ bcm47xx_nvram_getenv("boardrev", buf2, sizeof(buf2)) >= 0 &&
-+ bcm47xx_nvram_getenv("boardnum", buf3, sizeof(buf3)) == -ENOENT) {
-+ for (e2 = bcm47xx_board_list_board_type_rev; e2->value1; e2++) {
-+ if (!strcmp(buf1, e2->value1) &&
-+ !strcmp(buf2, e2->value2))
-+ return &e2->board;
-+ }
-+ }
- return bcm47xx_board_unknown;
- }
-
---- a/arch/mips/bcm47xx/leds.c
-+++ b/arch/mips/bcm47xx/leds.c
-@@ -383,6 +383,14 @@ bcm47xx_leds_netgear_wnr834bv2[] __initc
- BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF),
- };
-
-+/* Siemens */
-+static const struct gpio_led
-+bcm47xx_leds_siemens_se505v2[] __initconst = {
-+ BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(3, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
-+};
-+
- /* SimpleTech */
-
- static const struct gpio_led
-@@ -562,6 +570,10 @@ void __init bcm47xx_leds_register(void)
- bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
- break;
-
-+ case BCM47XX_BOARD_SIEMENS_SE505V2:
-+ bcm47xx_set_pdata(bcm47xx_leds_siemens_se505v2);
-+ break;
-+
- case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE:
- bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare);
- break;
---- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-@@ -94,6 +94,8 @@ enum bcm47xx_board {
-
- BCM47XX_BOARD_PHICOMM_M1,
-
-+ BCM47XX_BOARD_SIEMENS_SE505V2,
-+
- BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE,
-
- BCM47XX_BOARD_ZTE_H218N,
diff --git a/target/linux/brcm47xx/patches-3.14/142-MIPS-BCM47XX-add-Belkin-F7Dxxxx-board-detection.patch b/target/linux/brcm47xx/patches-3.14/142-MIPS-BCM47XX-add-Belkin-F7Dxxxx-board-detection.patch
deleted file mode 100644
index fd3557e9c2..0000000000
--- a/target/linux/brcm47xx/patches-3.14/142-MIPS-BCM47XX-add-Belkin-F7Dxxxx-board-detection.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 44927df87162ae9beb6e7b934b0e75818b88e350 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Thu, 2 Jan 2014 19:10:05 +0100
-Subject: [PATCH] MIPS: BCM47XX: add Belkin F7Dxxxx board detection
-
-From: Cody P Schafer <devel@codyps.com>
-
-Add a few Belkin F7Dxxxx entries, with F7D4401 sourced from online
-documentation and the "F7D7302" being observed. F7D3301, F7D3302, and
-F7D4302 are reasonable guesses which are unlikely to cause
-mis-detection.
-
-Signed-off-by: Cody P Schafer <devel@codyps.com>
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
----
- arch/mips/bcm47xx/board.c | 4 ++++
- arch/mips/bcm47xx/buttons.c | 4 ++++
- arch/mips/bcm47xx/leds.c | 4 ++++
- arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 4 ++++
- 4 files changed, 16 insertions(+)
-
---- a/arch/mips/bcm47xx/board.c
-+++ b/arch/mips/bcm47xx/board.c
-@@ -72,7 +72,11 @@ struct bcm47xx_board_type_list1 bcm47xx_
- {{BCM47XX_BOARD_ASUS_WL500W, "Asus WL500W"}, "WL500gW-"},
- {{BCM47XX_BOARD_ASUS_WL520GC, "Asus WL520GC"}, "WL520GC-"},
- {{BCM47XX_BOARD_ASUS_WL520GU, "Asus WL520GU"}, "WL520GU-"},
-+ {{BCM47XX_BOARD_BELKIN_F7D3301, "Belkin F7D3301"}, "F7D3301"},
-+ {{BCM47XX_BOARD_BELKIN_F7D3302, "Belkin F7D3302"}, "F7D3302"},
- {{BCM47XX_BOARD_BELKIN_F7D4301, "Belkin F7D4301"}, "F7D4301"},
-+ {{BCM47XX_BOARD_BELKIN_F7D4302, "Belkin F7D4302"}, "F7D4302"},
-+ {{BCM47XX_BOARD_BELKIN_F7D4401, "Belkin F7D4401"}, "F7D4401"},
- { {0}, NULL},
- };
-
---- a/arch/mips/bcm47xx/buttons.c
-+++ b/arch/mips/bcm47xx/buttons.c
-@@ -420,7 +420,11 @@ int __init bcm47xx_buttons_register(void
- err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wlhdd);
- break;
-
-+ case BCM47XX_BOARD_BELKIN_F7D3301:
-+ case BCM47XX_BOARD_BELKIN_F7D3302:
- case BCM47XX_BOARD_BELKIN_F7D4301:
-+ case BCM47XX_BOARD_BELKIN_F7D4302:
-+ case BCM47XX_BOARD_BELKIN_F7D4401:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_belkin_f7d4301);
- break;
-
---- a/arch/mips/bcm47xx/leds.c
-+++ b/arch/mips/bcm47xx/leds.c
-@@ -457,7 +457,11 @@ void __init bcm47xx_leds_register(void)
- bcm47xx_set_pdata(bcm47xx_leds_asus_wlhdd);
- break;
-
-+ case BCM47XX_BOARD_BELKIN_F7D3301:
-+ case BCM47XX_BOARD_BELKIN_F7D3302:
- case BCM47XX_BOARD_BELKIN_F7D4301:
-+ case BCM47XX_BOARD_BELKIN_F7D4302:
-+ case BCM47XX_BOARD_BELKIN_F7D4401:
- bcm47xx_set_pdata(bcm47xx_leds_belkin_f7d4301);
- break;
-
---- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-@@ -27,7 +27,11 @@ enum bcm47xx_board {
- BCM47XX_BOARD_ASUS_WL700GE,
- BCM47XX_BOARD_ASUS_WLHDD,
-
-+ BCM47XX_BOARD_BELKIN_F7D3301,
-+ BCM47XX_BOARD_BELKIN_F7D3302,
- BCM47XX_BOARD_BELKIN_F7D4301,
-+ BCM47XX_BOARD_BELKIN_F7D4302,
-+ BCM47XX_BOARD_BELKIN_F7D4401,
-
- BCM47XX_BOARD_BUFFALO_WBR2_G54,
- BCM47XX_BOARD_BUFFALO_WHR2_A54G54,
diff --git a/target/linux/brcm47xx/patches-3.14/144-make-reboot-more-reliable.patch b/target/linux/brcm47xx/patches-3.14/144-make-reboot-more-reliable.patch
deleted file mode 100644
index 3e1a4bb56a..0000000000
--- a/target/linux/brcm47xx/patches-3.14/144-make-reboot-more-reliable.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 26db431400c336c4cc658cb4888bab18d254c64a Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Sat, 9 Aug 2014 00:00:09 +0200
-Subject: [PATCH] MIPS: BCM47XX: fix reboot problem on BCM4705/BCM4785
-
-This adds some code based on code from the Broadcom GPL tar to fix the
-reboot problems on BCM4705/BCM4785. I tried rebooting my device for ~10
-times and have never seen a problem. This reverts the changes in the
-previous commit and adds the real fix as suggested by Rafał.
-
-Setting bit 22 in Reg 22, sel 4 puts the BIU (Bus Interface Unit) into
-async mode.
-
-The previous try was this:
-commit 316cad5c1d4daee998cd1f83ccdb437f6f20d45c
-Author: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Mon Jul 28 23:53:57 2014 +0200
-
- MIPS: BCM47XX: make reboot more relaiable
-
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---- a/arch/mips/bcm47xx/setup.c
-+++ b/arch/mips/bcm47xx/setup.c
-@@ -59,7 +59,16 @@ static void bcm47xx_machine_restart(char
- switch (bcm47xx_bus_type) {
- #ifdef CONFIG_BCM47XX_SSB
- case BCM47XX_BUS_TYPE_SSB:
-+ if (bcm47xx_bus.ssb.chip_id == 0x4785)
-+ write_c0_diag4(1 << 22);
- ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 1);
-+ if (bcm47xx_bus.ssb.chip_id == 0x4785) {
-+ __asm__ __volatile__(
-+ ".set\tmips3\n\t"
-+ "sync\n\t"
-+ "wait\n\t"
-+ ".set\tmips0");
-+ }
- break;
- #endif
- #ifdef CONFIG_BCM47XX_BCMA
diff --git a/target/linux/brcm47xx/patches-3.14/145-MIPS-BCM47XX-fixup-broken-MAC-addresses-in-nvram.patch b/target/linux/brcm47xx/patches-3.14/145-MIPS-BCM47XX-fixup-broken-MAC-addresses-in-nvram.patch
deleted file mode 100644
index 3e99a3b09a..0000000000
--- a/target/linux/brcm47xx/patches-3.14/145-MIPS-BCM47XX-fixup-broken-MAC-addresses-in-nvram.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 103c0bf3ff46486466bc9138d70c25133d516003 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Tue, 29 Jul 2014 00:08:01 +0200
-Subject: [PATCH] MIPS: BCM47XX: fixup broken MAC addresses in nvram
-
-The address prefix 00:90:4C is used by Broadcom in their initial
-configuration. When a mac address with the prefix 00:90:4C is used all
-devices from the same series are sharing the same mac address. To
-prevent mac address collisions we replace them with a mac address based
-on the base address. To generate such addresses we take the main mac
-address from et0macaddr and increase it by two for the first wifi
-device and by 3 for the second one. This matches the printed mac
-address on the device. The main mac address increased by one is used as
-wan address by the vendor code.
-
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-Cc: zajec5@gmail.com
-Cc: linux-mips@linux-mips.org
-Patchwork: https://patchwork.linux-mips.org/patch/7489/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/bcm47xx/sprom.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 48 insertions(+)
-
---- a/arch/mips/bcm47xx/sprom.c
-+++ b/arch/mips/bcm47xx/sprom.c
-@@ -28,6 +28,8 @@
-
- #include <bcm47xx.h>
- #include <bcm47xx_nvram.h>
-+#include <linux/if_ether.h>
-+#include <linux/etherdevice.h>
-
- static void create_key(const char *prefix, const char *postfix,
- const char *name, char *buf, int len)
-@@ -631,6 +633,33 @@ static void bcm47xx_fill_sprom_path_r45(
- }
- }
-
-+static bool bcm47xx_is_valid_mac(u8 *mac)
-+{
-+ return mac && !(mac[0] == 0x00 && mac[1] == 0x90 && mac[2] == 0x4c);
-+}
-+
-+static int bcm47xx_increase_mac_addr(u8 *mac, u8 num)
-+{
-+ u8 *oui = mac + ETH_ALEN/2 - 1;
-+ u8 *p = mac + ETH_ALEN - 1;
-+
-+ do {
-+ (*p) += num;
-+ if (*p > num)
-+ break;
-+ p--;
-+ num = 1;
-+ } while (p != oui);
-+
-+ if (p == oui) {
-+ pr_err("unable to fetch mac address\n");
-+ return -ENOENT;
-+ }
-+ return 0;
-+}
-+
-+static int mac_addr_used = 2;
-+
- static void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom,
- const char *prefix, bool fallback)
- {
-@@ -648,6 +677,25 @@ static void bcm47xx_fill_sprom_ethernet(
-
- nvram_read_macaddr(prefix, "macaddr", sprom->il0mac, fallback);
- nvram_read_macaddr(prefix, "il0macaddr", sprom->il0mac, fallback);
-+
-+ /* The address prefix 00:90:4C is used by Broadcom in their initial
-+ configuration. When a mac address with the prefix 00:90:4C is used
-+ all devices from the same series are sharing the same mac address.
-+ To prevent mac address collisions we replace them with a mac address
-+ based on the base address. */
-+ if (!bcm47xx_is_valid_mac(sprom->il0mac)) {
-+ u8 mac[6];
-+
-+ nvram_read_macaddr(NULL, "et0macaddr", mac, false);
-+ if (bcm47xx_is_valid_mac(mac)) {
-+ int err = bcm47xx_increase_mac_addr(mac, mac_addr_used);
-+
-+ if (!err) {
-+ ether_addr_copy(sprom->il0mac, mac);
-+ mac_addr_used++;
-+ }
-+ }
-+ }
- }
-
- static void bcm47xx_fill_board_data(struct ssb_sprom *sprom, const char *prefix,
diff --git a/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-add-Microsoft-MN-700-and-Asus-WL500G.patch b/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-add-Microsoft-MN-700-and-Asus-WL500G.patch
deleted file mode 100644
index 373d14f098..0000000000
--- a/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-add-Microsoft-MN-700-and-Asus-WL500G.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-From 250dc03727b9cce91bd86091f05bf2443e2be9ec Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Tue, 29 Jul 2014 00:12:09 +0200
-Subject: [PATCH] MIPS: BCM47XX: add Microsoft MN-700 and Asus WL500G
-
-This patch adds detection for the Microsoft MN-700 and the Asus WL500G
-router. This is based on some old code from OpenWrt.
-
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-Cc: zajec5@gmail.com
-Cc: linux-mips@linux-mips.org
-Patchwork: https://patchwork.linux-mips.org/patch/7490/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/bcm47xx/board.c | 17 +++++++++++++++++
- arch/mips/bcm47xx/buttons.c | 19 +++++++++++++++++++
- arch/mips/bcm47xx/leds.c | 19 +++++++++++++++++++
- arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 3 +++
- 4 files changed, 58 insertions(+)
-
---- a/arch/mips/bcm47xx/board.c
-+++ b/arch/mips/bcm47xx/board.c
-@@ -80,6 +80,14 @@ struct bcm47xx_board_type_list1 bcm47xx_
- { {0}, NULL},
- };
-
-+/* hardware_version, boardnum */
-+static const
-+struct bcm47xx_board_type_list2 bcm47xx_board_list_hw_version_num[] __initconst = {
-+ {{BCM47XX_BOARD_MICROSOFT_MN700, "Microsoft MN-700"}, "WL500-", "mn700"},
-+ {{BCM47XX_BOARD_ASUS_WL500G, "Asus WL500G"}, "WL500-", "asusX"},
-+ { {0}, NULL},
-+};
-+
- /* productid */
- static const
- struct bcm47xx_board_type_list1 bcm47xx_board_list_productid[] __initconst = {
-@@ -237,6 +245,15 @@ static __init const struct bcm47xx_board
- }
- }
-
-+ if (bcm47xx_nvram_getenv("hardware_version", buf1, sizeof(buf1)) >= 0 &&
-+ bcm47xx_nvram_getenv("boardtype", buf2, sizeof(buf2)) >= 0) {
-+ for (e2 = bcm47xx_board_list_boot_hw; e2->value1; e2++) {
-+ if (!strstarts(buf1, e2->value1) &&
-+ !strcmp(buf2, e2->value2))
-+ return &e2->board;
-+ }
-+ }
-+
- if (bcm47xx_nvram_getenv("productid", buf1, sizeof(buf1)) >= 0) {
- for (e1 = bcm47xx_board_list_productid; e1->value1; e1++) {
- if (!strcmp(buf1, e1->value1))
---- a/arch/mips/bcm47xx/buttons.c
-+++ b/arch/mips/bcm47xx/buttons.c
-@@ -56,6 +56,11 @@ bcm47xx_buttons_asus_wl330ge[] __initcon
- };
-
- static const struct gpio_keys_button
-+bcm47xx_buttons_asus_wl500g[] __initconst = {
-+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
-+};
-+
-+static const struct gpio_keys_button
- bcm47xx_buttons_asus_wl500gd[] __initconst = {
- BCM47XX_GPIO_KEY(6, KEY_RESTART),
- };
-@@ -288,6 +293,13 @@ bcm47xx_buttons_linksys_wrtsl54gs[] __in
- BCM47XX_GPIO_KEY(6, KEY_RESTART),
- };
-
-+/* Microsoft */
-+
-+static const struct gpio_keys_button
-+bcm47xx_buttons_microsoft_nm700[] __initconst = {
-+ BCM47XX_GPIO_KEY(7, KEY_RESTART),
-+};
-+
- /* Motorola */
-
- static const struct gpio_keys_button
-@@ -395,6 +407,9 @@ int __init bcm47xx_buttons_register(void
- case BCM47XX_BOARD_ASUS_WL330GE:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl330ge);
- break;
-+ case BCM47XX_BOARD_ASUS_WL500G:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500g);
-+ break;
- case BCM47XX_BOARD_ASUS_WL500GD:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500gd);
- break;
-@@ -517,6 +532,10 @@ int __init bcm47xx_buttons_register(void
- err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs);
- break;
-
-+ case BCM47XX_BOARD_MICROSOFT_MN700:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_microsoft_nm700);
-+ break;
-+
- case BCM47XX_BOARD_MOTOROLA_WE800G:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_motorola_we800g);
- break;
---- a/arch/mips/bcm47xx/leds.c
-+++ b/arch/mips/bcm47xx/leds.c
-@@ -64,6 +64,11 @@ bcm47xx_leds_asus_wl330ge[] __initconst
- };
-
- static const struct gpio_led
-+bcm47xx_leds_asus_wl500g[] __initconst = {
-+ BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
-+};
-+
-+static const struct gpio_led
- bcm47xx_leds_asus_wl500gd[] __initconst = {
- BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
- };
-@@ -332,6 +337,13 @@ bcm47xx_leds_linksys_wrtsl54gs[] __initc
- BCM47XX_GPIO_LED(7, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
- };
-
-+/* Microsoft */
-+
-+static const struct gpio_led
-+bcm47xx_leds_microsoft_nm700[] __initconst = {
-+ BCM47XX_GPIO_LED(6, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
-+};
-+
- /* Motorola */
-
- static const struct gpio_led
-@@ -432,6 +444,9 @@ void __init bcm47xx_leds_register(void)
- case BCM47XX_BOARD_ASUS_WL330GE:
- bcm47xx_set_pdata(bcm47xx_leds_asus_wl330ge);
- break;
-+ case BCM47XX_BOARD_ASUS_WL500G:
-+ bcm47xx_set_pdata(bcm47xx_leds_asus_wl500g);
-+ break;
- case BCM47XX_BOARD_ASUS_WL500GD:
- bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gd);
- break;
-@@ -554,6 +569,10 @@ void __init bcm47xx_leds_register(void)
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs);
- break;
-
-+ case BCM47XX_BOARD_MICROSOFT_MN700:
-+ bcm47xx_set_pdata(bcm47xx_leds_microsoft_nm700);
-+ break;
-+
- case BCM47XX_BOARD_MOTOROLA_WE800G:
- bcm47xx_set_pdata(bcm47xx_leds_motorola_we800g);
- break;
---- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-@@ -18,6 +18,7 @@ enum bcm47xx_board {
- BCM47XX_BOARD_ASUS_WL300G,
- BCM47XX_BOARD_ASUS_WL320GE,
- BCM47XX_BOARD_ASUS_WL330GE,
-+ BCM47XX_BOARD_ASUS_WL500G,
- BCM47XX_BOARD_ASUS_WL500GD,
- BCM47XX_BOARD_ASUS_WL500GPV1,
- BCM47XX_BOARD_ASUS_WL500GPV2,
-@@ -75,6 +76,8 @@ enum bcm47xx_board {
- BCM47XX_BOARD_LINKSYS_WRT610NV2,
- BCM47XX_BOARD_LINKSYS_WRTSL54GS,
-
-+ BCM47XX_BOARD_MICROSOFT_MN700,
-+
- BCM47XX_BOARD_MOTOROLA_WE800G,
- BCM47XX_BOARD_MOTOROLA_WR850GP,
- BCM47XX_BOARD_MOTOROLA_WR850GV2V3,
diff --git a/target/linux/brcm47xx/patches-3.14/147-MIPS-BCM47xx-Distinguish-WRT54G-series-devices-by-bo.patch b/target/linux/brcm47xx/patches-3.14/147-MIPS-BCM47xx-Distinguish-WRT54G-series-devices-by-bo.patch
deleted file mode 100644
index e923ac1fcd..0000000000
--- a/target/linux/brcm47xx/patches-3.14/147-MIPS-BCM47xx-Distinguish-WRT54G-series-devices-by-bo.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 41a867cb07443c77c24747dcbad1a40002516469 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Fri, 20 Jun 2014 07:56:39 +0200
-Subject: [PATCH] MIPS: BCM47xx: Distinguish WRT54G series devices by boardtype
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Catalin reported that GPIOs used by bcm47xx don't match layout of his
-WRT54GS V1.0 board. It seems we need to distinguish these 54G* devices.
-
-Reported-by: Catalin Patulea <cat@vv.carleton.ca>
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Cc: linux-mips@linux-mips.org
-Cc: Hauke Mehrtens <hauke@hauke-m.de>
-Patchwork: https://patchwork.linux-mips.org/patch/7112/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/bcm47xx/board.c | 6 +++---
- arch/mips/bcm47xx/buttons.c | 10 ++++++----
- arch/mips/bcm47xx/leds.c | 10 ++++++----
- arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 4 +++-
- 4 files changed, 18 insertions(+), 12 deletions(-)
-
---- a/arch/mips/bcm47xx/board.c
-+++ b/arch/mips/bcm47xx/board.c
-@@ -188,9 +188,9 @@ struct bcm47xx_board_type_list3 bcm47xx_
- {{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
- {{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
- {{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "0x04CF", "3500", "02"},
-- {{BCM47XX_BOARD_LINKSYS_WRT54G, "Linksys WRT54G/GS/GL"}, "0x0101", "42", "0x10"},
-- {{BCM47XX_BOARD_LINKSYS_WRT54G, "Linksys WRT54G/GS/GL"}, "0x0467", "42", "0x10"},
-- {{BCM47XX_BOARD_LINKSYS_WRT54G, "Linksys WRT54G/GS/GL"}, "0x0708", "42", "0x10"},
-+ {{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101, "Linksys WRT54G/GS/GL"}, "0x0101", "42", "0x10"},
-+ {{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467, "Linksys WRT54G/GS/GL"}, "0x0467", "42", "0x10"},
-+ {{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708, "Linksys WRT54G/GS/GL"}, "0x0708", "42", "0x10"},
- { {0}, NULL},
- };
-
---- a/arch/mips/bcm47xx/buttons.c
-+++ b/arch/mips/bcm47xx/buttons.c
-@@ -270,7 +270,7 @@ bcm47xx_buttons_linksys_wrt54g3gv2[] __i
- };
-
- static const struct gpio_keys_button
--bcm47xx_buttons_linksys_wrt54gsv1[] __initconst = {
-+bcm47xx_buttons_linksys_wrt54g_generic[] __initconst = {
- BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
- BCM47XX_GPIO_KEY(6, KEY_RESTART),
- };
-@@ -516,12 +516,14 @@ int __init bcm47xx_buttons_register(void
- case BCM47XX_BOARD_LINKSYS_WRT310NV1:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
- break;
-- case BCM47XX_BOARD_LINKSYS_WRT54G:
-- err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54gsv1);
-- break;
- case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
- break;
-+ case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101:
-+ case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467:
-+ case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g_generic);
-+ break;
- case BCM47XX_BOARD_LINKSYS_WRT610NV1:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv1);
- break;
---- a/arch/mips/bcm47xx/leds.c
-+++ b/arch/mips/bcm47xx/leds.c
-@@ -297,7 +297,7 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc
- };
-
- static const struct gpio_led
--bcm47xx_leds_linksys_wrt54gsv1[] __initconst = {
-+bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
- BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
- BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
- BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
-@@ -553,12 +553,14 @@ void __init bcm47xx_leds_register(void)
- case BCM47XX_BOARD_LINKSYS_WRT310NV1:
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
- break;
-- case BCM47XX_BOARD_LINKSYS_WRT54G:
-- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54gsv1);
-- break;
- case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
- break;
-+ case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101:
-+ case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467:
-+ case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708:
-+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_generic);
-+ break;
- case BCM47XX_BOARD_LINKSYS_WRT610NV1:
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv1);
- break;
---- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-@@ -71,7 +71,9 @@ enum bcm47xx_board {
- BCM47XX_BOARD_LINKSYS_WRT310NV1,
- BCM47XX_BOARD_LINKSYS_WRT310NV2,
- BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
-- BCM47XX_BOARD_LINKSYS_WRT54G,
-+ BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
-+ BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,
-+ BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708,
- BCM47XX_BOARD_LINKSYS_WRT610NV1,
- BCM47XX_BOARD_LINKSYS_WRT610NV2,
- BCM47XX_BOARD_LINKSYS_WRTSL54GS,
diff --git a/target/linux/brcm47xx/patches-3.14/148-MIPS-BCM47xx-Fix-LEDs-on-WRT54GS-V1.0.patch b/target/linux/brcm47xx/patches-3.14/148-MIPS-BCM47xx-Fix-LEDs-on-WRT54GS-V1.0.patch
deleted file mode 100644
index 181758e6f8..0000000000
--- a/target/linux/brcm47xx/patches-3.14/148-MIPS-BCM47xx-Fix-LEDs-on-WRT54GS-V1.0.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 7bb26b1691166d0d830c42c1a25caf82208bf90d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Fri, 20 Jun 2014 07:56:40 +0200
-Subject: [PATCH] MIPS: BCM47xx: Fix LEDs on WRT54GS V1.0
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Reported-by: Catalin Patulea <cat@vv.carleton.ca>
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
-Cc: linux-mips@linux-mips.org
-Cc: Hauke Mehrtens <hauke@hauke-m.de>
-Patchwork: https://patchwork.linux-mips.org/patch/7113/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/bcm47xx/leds.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
---- a/arch/mips/bcm47xx/leds.c
-+++ b/arch/mips/bcm47xx/leds.c
-@@ -311,6 +311,14 @@ bcm47xx_leds_linksys_wrt54g3gv2[] __init
- BCM47XX_GPIO_LED(3, "blue", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
- };
-
-+/* Verified on: WRT54GS V1.0 */
-+static const struct gpio_led
-+bcm47xx_leds_linksys_wrt54g_type_0101[] __initconst = {
-+ BCM47XX_GPIO_LED(0, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
-+};
-+
- static const struct gpio_led
- bcm47xx_leds_linksys_wrt610nv1[] __initconst = {
- BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
-@@ -557,6 +565,8 @@ void __init bcm47xx_leds_register(void)
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
- break;
- case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101:
-+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_type_0101);
-+ break;
- case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467:
- case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708:
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_generic);
diff --git a/target/linux/brcm47xx/patches-3.14/149-MIPS-BCM47XX-Move-shared-symbols-to-the-config-BCM47.patch b/target/linux/brcm47xx/patches-3.14/149-MIPS-BCM47XX-Move-shared-symbols-to-the-config-BCM47.patch
deleted file mode 100644
index 4babed992f..0000000000
--- a/target/linux/brcm47xx/patches-3.14/149-MIPS-BCM47XX-Move-shared-symbols-to-the-config-BCM47.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From c949c0bc55571209fe6742f645b1e2eb20099591 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Tue, 17 Jun 2014 16:36:50 +0200
-Subject: [PATCH 149/150] MIPS: BCM47XX: Move shared symbols to the config
- BCM47XX
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Cc: linux-mips@linux-mips.org
-Cc: Hauke Mehrtens <hauke@hauke-m.de>
-Patchwork: https://patchwork.linux-mips.org/patch/7100/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/Kconfig | 2 ++
- arch/mips/bcm47xx/Kconfig | 4 ----
- 2 files changed, 2 insertions(+), 4 deletions(-)
-
---- a/arch/mips/Kconfig
-+++ b/arch/mips/Kconfig
-@@ -124,6 +124,8 @@ config BCM47XX
- select SYS_SUPPORTS_LITTLE_ENDIAN
- select SYS_HAS_EARLY_PRINTK
- select EARLY_PRINTK_8250 if EARLY_PRINTK
-+ select GPIOLIB
-+ select LEDS_GPIO_REGISTER
- help
- Support for BCM47XX based boards
-
---- a/arch/mips/bcm47xx/Kconfig
-+++ b/arch/mips/bcm47xx/Kconfig
-@@ -11,8 +11,6 @@ config BCM47XX_SSB
- select SSB_DRIVER_PCICORE if PCI
- select SSB_PCICORE_HOSTMODE if PCI
- select SSB_DRIVER_GPIO
-- select GPIOLIB
-- select LEDS_GPIO_REGISTER
- default y
- help
- Add support for old Broadcom BCM47xx boards with Sonics Silicon Backplane support.
-@@ -29,8 +27,6 @@ config BCM47XX_BCMA
- select BCMA_HOST_PCI if PCI
- select BCMA_DRIVER_PCI_HOSTMODE if PCI
- select BCMA_DRIVER_GPIO
-- select GPIOLIB
-- select LEDS_GPIO_REGISTER
- default y
- help
- Add support for new Broadcom BCM47xx boards with Broadcom specific Advanced Microcontroller Bus.
diff --git a/target/linux/brcm47xx/patches-3.14/150-MIPS-BCM47XX-Select-SYS_SUPPORTS_HIGHMEM-for-BCM47XX.patch b/target/linux/brcm47xx/patches-3.14/150-MIPS-BCM47XX-Select-SYS_SUPPORTS_HIGHMEM-for-BCM47XX.patch
deleted file mode 100644
index 2fa44428b1..0000000000
--- a/target/linux/brcm47xx/patches-3.14/150-MIPS-BCM47XX-Select-SYS_SUPPORTS_HIGHMEM-for-BCM47XX.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From ce01cbef8b0b71d01f8a68cba59da3198165bae6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Tue, 17 Jun 2014 16:36:51 +0200
-Subject: [PATCH 150/150] MIPS: BCM47XX: Select SYS_SUPPORTS_HIGHMEM for
- BCM47XX_BCMA
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It seems that bcm47xx can handle only 128 MiB of RAM directly. There
-are few devices with 256 MiB, but Broadcom's SDK uses highmem to handle
-anything above 128 MiB.
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Cc: linux-mips@linux-mips.org
-Cc: Hauke Mehrtens <hauke@hauke-m.de>
-Patchwork: https://patchwork.linux-mips.org/patch/7101/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/bcm47xx/Kconfig | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/arch/mips/bcm47xx/Kconfig
-+++ b/arch/mips/bcm47xx/Kconfig
-@@ -20,6 +20,7 @@ config BCM47XX_SSB
- config BCM47XX_BCMA
- bool "BCMA Support for Broadcom BCM47XX"
- select SYS_HAS_CPU_MIPS32_R2
-+ select SYS_SUPPORTS_HIGHMEM
- select CPU_MIPSR2_IRQ_VI
- select BCMA
- select BCMA_HOST_SOC
diff --git a/target/linux/brcm47xx/patches-3.14/151-MIPS-BCM47XX-Devices-database-update-for-3.17.patch b/target/linux/brcm47xx/patches-3.14/151-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
deleted file mode 100644
index e2a767c517..0000000000
--- a/target/linux/brcm47xx/patches-3.14/151-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-From 9194b3431616567ffbf69ef970506d695912be0b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Thu, 17 Jul 2014 23:24:30 +0200
-Subject: [PATCH] MIPS: BCM47XX: Devices database update for 3.17
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Detect more devices and register leds & buttons for them.
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-Cc: linux-mips@linux-mips.org
-Patchwork: https://patchwork.linux-mips.org/patch/7394/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/bcm47xx/board.c | 3 ++-
- arch/mips/bcm47xx/buttons.c | 9 ++++++++
- arch/mips/bcm47xx/leds.c | 53 +++++++++++++++++++++++++++++++++++++--------
- 3 files changed, 55 insertions(+), 10 deletions(-)
-
---- a/arch/mips/bcm47xx/board.c
-+++ b/arch/mips/bcm47xx/board.c
-@@ -58,6 +58,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
- static const
- struct bcm47xx_board_type_list1 bcm47xx_board_list_hardware_version[] __initconst = {
- {{BCM47XX_BOARD_ASUS_RTN10U, "Asus RT-N10U"}, "RTN10U"},
-+ {{BCM47XX_BOARD_ASUS_RTN10D, "Asus RT-N10D"}, "RTN10D"},
- {{BCM47XX_BOARD_ASUS_RTN12, "Asus RT-N12"}, "RT-N12"},
- {{BCM47XX_BOARD_ASUS_RTN12B1, "Asus RT-N12B1"}, "RTN12B1"},
- {{BCM47XX_BOARD_ASUS_RTN12C1, "Asus RT-N12C1"}, "RTN12C1"},
-@@ -106,7 +107,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
- /* ModelId */
- static const
- struct bcm47xx_board_type_list1 bcm47xx_board_list_ModelId[] __initconst = {
-- {{BCM47XX_BOARD_DELL_TM2300, "Dell WX-5565"}, "WX-5565"},
-+ {{BCM47XX_BOARD_DELL_TM2300, "Dell TrueMobile 2300"}, "WX-5565"},
- {{BCM47XX_BOARD_MOTOROLA_WE800G, "Motorola WE800G"}, "WE800G"},
- {{BCM47XX_BOARD_MOTOROLA_WR850GP, "Motorola WR850GP"}, "WR850GP"},
- {{BCM47XX_BOARD_MOTOROLA_WR850GV2V3, "Motorola WR850G"}, "WR850G"},
---- a/arch/mips/bcm47xx/buttons.c
-+++ b/arch/mips/bcm47xx/buttons.c
-@@ -341,6 +341,12 @@ bcm47xx_buttons_netgear_wndr4500v1[] __i
- };
-
- static const struct gpio_keys_button
-+bcm47xx_buttons_netgear_wnr3500lv1[] __initconst = {
-+ BCM47XX_GPIO_KEY(4, KEY_RESTART),
-+ BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
-+};
-+
-+static const struct gpio_keys_button
- bcm47xx_buttons_netgear_wnr834bv2[] __initconst = {
- BCM47XX_GPIO_KEY(6, KEY_RESTART),
- };
-@@ -557,6 +563,9 @@ int __init bcm47xx_buttons_register(void
- case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr4500v1);
- break;
-+ case BCM47XX_BOARD_NETGEAR_WNR3500L:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1);
-+ break;
- case BCM47XX_BOARD_NETGEAR_WNR834BV2:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2);
- break;
---- a/arch/mips/bcm47xx/leds.c
-+++ b/arch/mips/bcm47xx/leds.c
-@@ -35,6 +35,15 @@ bcm47xx_leds_asus_rtn12[] __initconst =
- };
-
- static const struct gpio_led
-+bcm47xx_leds_asus_rtn15u[] __initconst = {
-+ /* TODO: Add "wlan" LED */
-+ BCM47XX_GPIO_LED(3, "blue", "wan", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(4, "blue", "lan", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(6, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(9, "blue", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
-+};
-+
-+static const struct gpio_led
- bcm47xx_leds_asus_rtn16[] __initconst = {
- BCM47XX_GPIO_LED(1, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
- BCM47XX_GPIO_LED(7, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
-@@ -42,8 +51,8 @@ bcm47xx_leds_asus_rtn16[] __initconst =
-
- static const struct gpio_led
- bcm47xx_leds_asus_rtn66u[] __initconst = {
-- BCM47XX_GPIO_LED(12, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
-- BCM47XX_GPIO_LED(15, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(12, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(15, "blue", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
- };
-
- static const struct gpio_led
-@@ -221,8 +230,8 @@ bcm47xx_leds_linksys_e1000v1[] __initcon
-
- static const struct gpio_led
- bcm47xx_leds_linksys_e1000v21[] __initconst = {
-- BCM47XX_GPIO_LED(5, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
-- BCM47XX_GPIO_LED(6, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(6, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
- BCM47XX_GPIO_LED(7, "amber", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
- BCM47XX_GPIO_LED(8, "blue", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
- };
-@@ -319,6 +328,16 @@ bcm47xx_leds_linksys_wrt54g_type_0101[]
- BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
- };
-
-+/* Verified on: WRT54GL V1.1 */
-+static const struct gpio_led
-+bcm47xx_leds_linksys_wrt54g_type_0467[] __initconst = {
-+ BCM47XX_GPIO_LED(0, "green", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(2, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(3, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
-+};
-+
- static const struct gpio_led
- bcm47xx_leds_linksys_wrt610nv1[] __initconst = {
- BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
-@@ -338,11 +357,10 @@ bcm47xx_leds_linksys_wrt610nv2[] __initc
-
- static const struct gpio_led
- bcm47xx_leds_linksys_wrtsl54gs[] __initconst = {
-- BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
-- BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
-- BCM47XX_GPIO_LED(2, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
-- BCM47XX_GPIO_LED(3, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
-- BCM47XX_GPIO_LED(7, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(0, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
- };
-
- /* Microsoft */
-@@ -397,6 +415,15 @@ bcm47xx_leds_netgear_wndr4500v1[] __init
- };
-
- static const struct gpio_led
-+bcm47xx_leds_netgear_wnr3500lv1[] __initconst = {
-+ BCM47XX_GPIO_LED(0, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(2, "green", "wan", 1, LEDS_GPIO_DEFSTATE_OFF),
-+ BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
-+ BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
-+};
-+
-+static const struct gpio_led
- bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
- BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
- BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
-@@ -437,6 +464,9 @@ void __init bcm47xx_leds_register(void)
- case BCM47XX_BOARD_ASUS_RTN12:
- bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
- break;
-+ case BCM47XX_BOARD_ASUS_RTN15U:
-+ bcm47xx_set_pdata(bcm47xx_leds_asus_rtn15u);
-+ break;
- case BCM47XX_BOARD_ASUS_RTN16:
- bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16);
- break;
-@@ -568,6 +598,8 @@ void __init bcm47xx_leds_register(void)
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_type_0101);
- break;
- case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467:
-+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_type_0467);
-+ break;
- case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708:
- bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_generic);
- break;
-@@ -601,6 +633,9 @@ void __init bcm47xx_leds_register(void)
- case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
- bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1);
- break;
-+ case BCM47XX_BOARD_NETGEAR_WNR3500L:
-+ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1);
-+ break;
- case BCM47XX_BOARD_NETGEAR_WNR834BV2:
- bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
- break;
diff --git a/target/linux/brcm47xx/patches-3.14/152-Revert-MIPS-Delete-unused-function-add_temporary_ent.patch b/target/linux/brcm47xx/patches-3.14/152-Revert-MIPS-Delete-unused-function-add_temporary_ent.patch
deleted file mode 100644
index 7d8101647c..0000000000
--- a/target/linux/brcm47xx/patches-3.14/152-Revert-MIPS-Delete-unused-function-add_temporary_ent.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From d377732c8c9aac14ccb900b65678558b0fb8f0f3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Thu, 17 Jul 2014 23:26:32 +0200
-Subject: [PATCH 152/153] Revert "MIPS: Delete unused function
- add_temporary_entry."
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This reverts commit d7a887a73dec6c387b02a966a71aac767bbd9ce6.
-
-Function add_temporary_entry is needed by bcm47xx to support highmem. We
-need to add a temporary entry to check for amount of RAM.
-The only change made in this revert was replacing (ENTER|EXIT)_CRITICAL.
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Cc: linux-mips@linux-mips.org
-Cc: Hauke Mehrtens <hauke@hauke-m.de>
-Patchwork: https://patchwork.linux-mips.org/patch/7395/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/include/asm/pgtable-32.h | 10 ++++++++
- arch/mips/mm/tlb-r4k.c | 47 ++++++++++++++++++++++++++++++++++++++
- 2 files changed, 57 insertions(+)
-
---- a/arch/mips/include/asm/pgtable-32.h
-+++ b/arch/mips/include/asm/pgtable-32.h
-@@ -19,6 +19,16 @@
- #include <asm-generic/pgtable-nopmd.h>
-
- /*
-+ * - add_temporary_entry() add a temporary TLB entry. We use TLB entries
-+ * starting at the top and working down. This is for populating the
-+ * TLB before trap_init() puts the TLB miss handler in place. It
-+ * should be used only for entries matching the actual page tables,
-+ * to prevent inconsistencies.
-+ */
-+extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
-+ unsigned long entryhi, unsigned long pagemask);
-+
-+/*
- * Basically we have the same two-level (which is the logical three level
- * Linux page table layout folded) page tables as the i386. Some day
- * when we have proper page coloring support we can have a 1% quicker
---- a/arch/mips/mm/tlb-r4k.c
-+++ b/arch/mips/mm/tlb-r4k.c
-@@ -411,6 +411,51 @@ int __init has_transparent_hugepage(void
-
- #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
-
-+/*
-+ * Used for loading TLB entries before trap_init() has started, when we
-+ * don't actually want to add a wired entry which remains throughout the
-+ * lifetime of the system
-+ */
-+
-+static int temp_tlb_entry __cpuinitdata;
-+
-+__init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
-+ unsigned long entryhi, unsigned long pagemask)
-+{
-+ int ret = 0;
-+ unsigned long flags;
-+ unsigned long wired;
-+ unsigned long old_pagemask;
-+ unsigned long old_ctx;
-+
-+ local_irq_save(flags);
-+ /* Save old context and create impossible VPN2 value */
-+ old_ctx = read_c0_entryhi();
-+ old_pagemask = read_c0_pagemask();
-+ wired = read_c0_wired();
-+ if (--temp_tlb_entry < wired) {
-+ printk(KERN_WARNING
-+ "No TLB space left for add_temporary_entry\n");
-+ ret = -ENOSPC;
-+ goto out;
-+ }
-+
-+ write_c0_index(temp_tlb_entry);
-+ write_c0_pagemask(pagemask);
-+ write_c0_entryhi(entryhi);
-+ write_c0_entrylo0(entrylo0);
-+ write_c0_entrylo1(entrylo1);
-+ mtc0_tlbw_hazard();
-+ tlb_write_indexed();
-+ tlbw_use_hazard();
-+
-+ write_c0_entryhi(old_ctx);
-+ write_c0_pagemask(old_pagemask);
-+out:
-+ local_irq_restore(flags);
-+ return ret;
-+}
-+
- static int ntlb;
- static int __init set_ntlb(char *str)
- {
-@@ -448,6 +493,8 @@ void tlb_init(void)
- write_c0_pagegrain(pg);
- }
-
-+ temp_tlb_entry = current_cpu_data.tlbsize - 1;
-+
- /* From this point on the ARC firmware is dead. */
- local_flush_tlb_all();
-
diff --git a/target/linux/brcm47xx/patches-3.14/153-MIPS-BCM47XX-Detect-more-then-128-MiB-of-RAM-HIGHMEM.patch b/target/linux/brcm47xx/patches-3.14/153-MIPS-BCM47XX-Detect-more-then-128-MiB-of-RAM-HIGHMEM.patch
deleted file mode 100644
index ee69e358ff..0000000000
--- a/target/linux/brcm47xx/patches-3.14/153-MIPS-BCM47XX-Detect-more-then-128-MiB-of-RAM-HIGHMEM.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-From 6ee1d93455384cef8a0426effe85da241b525b63 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Thu, 17 Jul 2014 23:26:33 +0200
-Subject: [PATCH 153/153] MIPS: BCM47XX: Detect more then 128 MiB of RAM
- (HIGHMEM)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-So far BCM47XX can only detect amount of HIGHMEM. It still requires
-adding (registering) and well-testing before enabling by default.
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
-Cc: linux-mips@linux-mips.org
-Patchwork: https://patchwork.linux-mips.org/patch/7396/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/bcm47xx/bcm47xx_private.h | 3 ++
- arch/mips/bcm47xx/prom.c | 68 ++++++++++++++++++++++++++++++++++++-
- arch/mips/bcm47xx/setup.c | 3 ++
- arch/mips/include/asm/pgtable-32.h | 2 ++
- arch/mips/mm/tlb-r4k.c | 2 +-
- 5 files changed, 76 insertions(+), 2 deletions(-)
-
---- a/arch/mips/bcm47xx/bcm47xx_private.h
-+++ b/arch/mips/bcm47xx/bcm47xx_private.h
-@@ -3,6 +3,9 @@
-
- #include <linux/kernel.h>
-
-+/* prom.c */
-+void __init bcm47xx_prom_highmem_init(void);
-+
- /* buttons.c */
- int __init bcm47xx_buttons_register(void);
-
---- a/arch/mips/bcm47xx/prom.c
-+++ b/arch/mips/bcm47xx/prom.c
-@@ -51,6 +51,8 @@ __init void bcm47xx_set_system_type(u16
- chip_id);
- }
-
-+static unsigned long lowmem __initdata;
-+
- static __init void prom_init_mem(void)
- {
- unsigned long mem;
-@@ -84,6 +86,7 @@ static __init void prom_init_mem(void)
- if (!memcmp(prom_init, prom_init + mem, 32))
- break;
- }
-+ lowmem = mem;
-
- /* Ignoring the last page when ddr size is 128M. Cached
- * accesses to last page is causing the processor to prefetch
-@@ -92,7 +95,6 @@ static __init void prom_init_mem(void)
- */
- if (c->cputype == CPU_74K && (mem == (128 << 20)))
- mem -= 0x1000;
--
- add_memory_region(0, mem, BOOT_MEM_RAM);
- }
-
-@@ -111,3 +113,67 @@ void __init prom_init(void)
- void __init prom_free_prom_memory(void)
- {
- }
-+
-+#if defined(CONFIG_BCM47XX_BCMA) && defined(CONFIG_HIGHMEM)
-+
-+#define EXTVBASE 0xc0000000
-+#define ENTRYLO(x) ((pte_val(pfn_pte((x) >> _PFN_SHIFT, PAGE_KERNEL_UNCACHED)) >> 6) | 1)
-+
-+#include <asm/tlbflush.h>
-+
-+/* Stripped version of tlb_init, with the call to build_tlb_refill_handler
-+ * dropped. Calling it at this stage causes a hang.
-+ */
-+void __cpuinit early_tlb_init(void)
-+{
-+ write_c0_pagemask(PM_DEFAULT_MASK);
-+ write_c0_wired(0);
-+ temp_tlb_entry = current_cpu_data.tlbsize - 1;
-+ local_flush_tlb_all();
-+}
-+
-+void __init bcm47xx_prom_highmem_init(void)
-+{
-+ unsigned long off = (unsigned long)prom_init;
-+ unsigned long extmem = 0;
-+ bool highmem_region = false;
-+
-+ if (WARN_ON(bcm47xx_bus_type != BCM47XX_BUS_TYPE_BCMA))
-+ return;
-+
-+ if (bcm47xx_bus.bcma.bus.chipinfo.id == BCMA_CHIP_ID_BCM4706)
-+ highmem_region = true;
-+
-+ if (lowmem != 128 << 20 || !highmem_region)
-+ return;
-+
-+ early_tlb_init();
-+
-+ /* Add one temporary TLB entry to map SDRAM Region 2.
-+ * Physical Virtual
-+ * 0x80000000 0xc0000000 (1st: 256MB)
-+ * 0x90000000 0xd0000000 (2nd: 256MB)
-+ */
-+ add_temporary_entry(ENTRYLO(0x80000000),
-+ ENTRYLO(0x80000000 + (256 << 20)),
-+ EXTVBASE, PM_256M);
-+
-+ off = EXTVBASE + __pa(off);
-+ for (extmem = 128 << 20; extmem < 512 << 20; extmem <<= 1) {
-+ if (!memcmp(prom_init, (void *)(off + extmem), 16))
-+ break;
-+ }
-+ extmem -= lowmem;
-+
-+ early_tlb_init();
-+
-+ if (!extmem)
-+ return;
-+
-+ pr_warn("Found %lu MiB of extra memory, but highmem is unsupported yet!\n",
-+ extmem >> 20);
-+
-+ /* TODO: Register extra memory */
-+}
-+
-+#endif /* defined(CONFIG_BCM47XX_BCMA) && defined(CONFIG_HIGHMEM) */
---- a/arch/mips/bcm47xx/setup.c
-+++ b/arch/mips/bcm47xx/setup.c
-@@ -231,6 +231,9 @@ void __init plat_mem_setup(void)
- bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA;
- bcm47xx_register_bcma();
- bcm47xx_set_system_type(bcm47xx_bus.bcma.bus.chipinfo.id);
-+#ifdef CONFIG_HIGHMEM
-+ bcm47xx_prom_highmem_init();
-+#endif
- #endif
- } else {
- printk(KERN_INFO "bcm47xx: using ssb bus\n");
---- a/arch/mips/include/asm/pgtable-32.h
-+++ b/arch/mips/include/asm/pgtable-32.h
-@@ -18,6 +18,8 @@
-
- #include <asm-generic/pgtable-nopmd.h>
-
-+extern int temp_tlb_entry __cpuinitdata;
-+
- /*
- * - add_temporary_entry() add a temporary TLB entry. We use TLB entries
- * starting at the top and working down. This is for populating the
---- a/arch/mips/mm/tlb-r4k.c
-+++ b/arch/mips/mm/tlb-r4k.c
-@@ -417,7 +417,7 @@ int __init has_transparent_hugepage(void
- * lifetime of the system
- */
-
--static int temp_tlb_entry __cpuinitdata;
-+int temp_tlb_entry __cpuinitdata;
-
- __init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
- unsigned long entryhi, unsigned long pagemask)
diff --git a/target/linux/brcm47xx/patches-3.14/154-MIPS-BCM47XX-Get-rid-of-calls-to-KSEG1ADDR.patch b/target/linux/brcm47xx/patches-3.14/154-MIPS-BCM47XX-Get-rid-of-calls-to-KSEG1ADDR.patch
deleted file mode 100644
index 4b2f6a27e2..0000000000
--- a/target/linux/brcm47xx/patches-3.14/154-MIPS-BCM47XX-Get-rid-of-calls-to-KSEG1ADDR.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-From 8d602dd0f984e8488ab891344ebdb6e1f3128c4a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Wed, 3 Sep 2014 22:51:06 +0200
-Subject: [PATCH 154/158] MIPS: BCM47XX: Get rid of calls to KSEG1ADDR
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-We should be using ioremap_nocache helper which handles remaps in a
-smarter way.
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Cc: linux-mips@linux-mips.org
-Cc: Hauke Mehrtens <hauke@hauke-m.de>
-Patchwork: http://patchwork.linux-mips.org/patch/7611/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/bcm47xx/nvram.c | 44 ++++++++++++++++++++++++++++++++------------
- 1 file changed, 32 insertions(+), 12 deletions(-)
-
-diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c
-index 2bed73a..e07976b 100644
---- a/arch/mips/bcm47xx/nvram.c
-+++ b/arch/mips/bcm47xx/nvram.c
-@@ -23,13 +23,13 @@
- static char nvram_buf[NVRAM_SPACE];
- static const u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000};
-
--static u32 find_nvram_size(u32 end)
-+static u32 find_nvram_size(void __iomem *end)
- {
-- struct nvram_header *header;
-+ struct nvram_header __iomem *header;
- int i;
-
- for (i = 0; i < ARRAY_SIZE(nvram_sizes); i++) {
-- header = (struct nvram_header *)KSEG1ADDR(end - nvram_sizes[i]);
-+ header = (struct nvram_header *)(end - nvram_sizes[i]);
- if (header->magic == NVRAM_HEADER)
- return nvram_sizes[i];
- }
-@@ -38,35 +38,39 @@ static u32 find_nvram_size(u32 end)
- }
-
- /* Probe for NVRAM header */
--static int nvram_find_and_copy(u32 base, u32 lim)
-+static int nvram_find_and_copy(void __iomem *iobase, u32 lim)
- {
-- struct nvram_header *header;
-+ struct nvram_header __iomem *header;
- int i;
- u32 off;
- u32 *src, *dst;
- u32 size;
-
-+ if (nvram_buf[0]) {
-+ pr_warn("nvram already initialized\n");
-+ return -EEXIST;
-+ }
-+
- /* TODO: when nvram is on nand flash check for bad blocks first. */
- off = FLASH_MIN;
- while (off <= lim) {
- /* Windowed flash access */
-- size = find_nvram_size(base + off);
-+ size = find_nvram_size(iobase + off);
- if (size) {
-- header = (struct nvram_header *)KSEG1ADDR(base + off -
-- size);
-+ header = (struct nvram_header *)(iobase + off - size);
- goto found;
- }
- off <<= 1;
- }
-
- /* Try embedded NVRAM at 4 KB and 1 KB as last resorts */
-- header = (struct nvram_header *) KSEG1ADDR(base + 4096);
-+ header = (struct nvram_header *)(iobase + 4096);
- if (header->magic == NVRAM_HEADER) {
- size = NVRAM_SPACE;
- goto found;
- }
-
-- header = (struct nvram_header *) KSEG1ADDR(base + 1024);
-+ header = (struct nvram_header *)(iobase + 1024);
- if (header->magic == NVRAM_HEADER) {
- size = NVRAM_SPACE;
- goto found;
-@@ -94,6 +98,22 @@ found:
- return 0;
- }
-
-+static int bcm47xx_nvram_init_from_mem(u32 base, u32 lim)
-+{
-+ void __iomem *iobase;
-+ int err;
-+
-+ iobase = ioremap_nocache(base, lim);
-+ if (!iobase)
-+ return -ENOMEM;
-+
-+ err = nvram_find_and_copy(iobase, lim);
-+
-+ iounmap(iobase);
-+
-+ return err;
-+}
-+
- #ifdef CONFIG_BCM47XX_SSB
- static int nvram_init_ssb(void)
- {
-@@ -109,7 +129,7 @@ static int nvram_init_ssb(void)
- return -ENXIO;
- }
-
-- return nvram_find_and_copy(base, lim);
-+ return bcm47xx_nvram_init_from_mem(base, lim);
- }
- #endif
-
-@@ -139,7 +159,7 @@ static int nvram_init_bcma(void)
- return -ENXIO;
- }
-
-- return nvram_find_and_copy(base, lim);
-+ return bcm47xx_nvram_init_from_mem(base, lim);
- }
- #endif
-
---
-1.8.4.5
-
diff --git a/target/linux/brcm47xx/patches-3.14/155-MIPS-BCM47XX-Make-ssb-init-NVRAM-instead-of-bcm47xx-.patch b/target/linux/brcm47xx/patches-3.14/155-MIPS-BCM47XX-Make-ssb-init-NVRAM-instead-of-bcm47xx-.patch
deleted file mode 100644
index 07a782da8f..0000000000
--- a/target/linux/brcm47xx/patches-3.14/155-MIPS-BCM47XX-Make-ssb-init-NVRAM-instead-of-bcm47xx-.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From 21400f252a97755579b43a4dc95dd02cd7f0ca75 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Wed, 3 Sep 2014 22:59:45 +0200
-Subject: [PATCH 155/158] MIPS: BCM47XX: Make ssb init NVRAM instead of bcm47xx
- polling it
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This makes NVRAM code less bcm47xx/ssb specific allowing it to become a
-standalone driver in the future. A similar patch for bcma will follow
-when it's ready.
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
-Cc: linux-mips@linux-mips.org
-Patchwork: https://patchwork.linux-mips.org/patch/7612/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/bcm47xx/nvram.c | 30 +++++++---------------
- arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h | 1 +
- drivers/ssb/driver_mipscore.c | 14 +++++++++-
- 3 files changed, 23 insertions(+), 22 deletions(-)
-
-diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c
-index e07976b..fecc5ae 100644
---- a/arch/mips/bcm47xx/nvram.c
-+++ b/arch/mips/bcm47xx/nvram.c
-@@ -98,7 +98,14 @@ found:
- return 0;
- }
-
--static int bcm47xx_nvram_init_from_mem(u32 base, u32 lim)
-+/*
-+ * On bcm47xx we need access to the NVRAM very early, so we can't use mtd
-+ * subsystem to access flash. We can't even use platform device / driver to
-+ * store memory offset.
-+ * To handle this we provide following symbol. It's supposed to be called as
-+ * soon as we get info about flash device, before any NVRAM entry is needed.
-+ */
-+int bcm47xx_nvram_init_from_mem(u32 base, u32 lim)
- {
- void __iomem *iobase;
- int err;
-@@ -114,25 +121,6 @@ static int bcm47xx_nvram_init_from_mem(u32 base, u32 lim)
- return err;
- }
-
--#ifdef CONFIG_BCM47XX_SSB
--static int nvram_init_ssb(void)
--{
-- struct ssb_mipscore *mcore = &bcm47xx_bus.ssb.mipscore;
-- u32 base;
-- u32 lim;
--
-- if (mcore->pflash.present) {
-- base = mcore->pflash.window;
-- lim = mcore->pflash.window_size;
-- } else {
-- pr_err("Couldn't find supported flash memory\n");
-- return -ENXIO;
-- }
--
-- return bcm47xx_nvram_init_from_mem(base, lim);
--}
--#endif
--
- #ifdef CONFIG_BCM47XX_BCMA
- static int nvram_init_bcma(void)
- {
-@@ -168,7 +156,7 @@ static int nvram_init(void)
- switch (bcm47xx_bus_type) {
- #ifdef CONFIG_BCM47XX_SSB
- case BCM47XX_BUS_TYPE_SSB:
-- return nvram_init_ssb();
-+ break;
- #endif
- #ifdef CONFIG_BCM47XX_BCMA
- case BCM47XX_BUS_TYPE_BCMA:
-diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h
-index 36a3fc1..676be22 100644
---- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h
-+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h
-@@ -32,6 +32,7 @@ struct nvram_header {
- #define NVRAM_MAX_VALUE_LEN 255
- #define NVRAM_MAX_PARAM_LEN 64
-
-+int bcm47xx_nvram_init_from_mem(u32 base, u32 lim);
- extern int bcm47xx_nvram_getenv(char *name, char *val, size_t val_len);
-
- static inline void bcm47xx_nvram_parse_macaddr(char *buf, u8 macaddr[6])
-diff --git a/drivers/ssb/driver_mipscore.c b/drivers/ssb/driver_mipscore.c
-index 0907706..7b986f9 100644
---- a/drivers/ssb/driver_mipscore.c
-+++ b/drivers/ssb/driver_mipscore.c
-@@ -15,6 +15,9 @@
- #include <linux/serial_core.h>
- #include <linux/serial_reg.h>
- #include <linux/time.h>
-+#ifdef CONFIG_BCM47XX
-+#include <bcm47xx_nvram.h>
-+#endif
-
- #include "ssb_private.h"
-
-@@ -210,6 +213,7 @@ static void ssb_mips_serial_init(struct ssb_mipscore *mcore)
- static void ssb_mips_flash_detect(struct ssb_mipscore *mcore)
- {
- struct ssb_bus *bus = mcore->dev->bus;
-+ struct ssb_sflash *sflash = &mcore->sflash;
- struct ssb_pflash *pflash = &mcore->pflash;
-
- /* When there is no chipcommon on the bus there is 4MB flash */
-@@ -242,7 +246,15 @@ static void ssb_mips_flash_detect(struct ssb_mipscore *mcore)
- }
-
- ssb_pflash:
-- if (pflash->present) {
-+ if (sflash->present) {
-+#ifdef CONFIG_BCM47XX
-+ bcm47xx_nvram_init_from_mem(sflash->window, sflash->size);
-+#endif
-+ } else if (pflash->present) {
-+#ifdef CONFIG_BCM47XX
-+ bcm47xx_nvram_init_from_mem(pflash->window, pflash->window_size);
-+#endif
-+
- ssb_pflash_data.width = pflash->buswidth;
- ssb_pflash_resource.start = pflash->window;
- ssb_pflash_resource.end = pflash->window + pflash->window_size;
---
-1.8.4.5
-
diff --git a/target/linux/brcm47xx/patches-3.14/156-MIPS-BCM47XX-Make-bcma-init-NVRAM-instead-of-bcm47xx.patch b/target/linux/brcm47xx/patches-3.14/156-MIPS-BCM47XX-Make-bcma-init-NVRAM-instead-of-bcm47xx.patch
deleted file mode 100644
index a616fcc0e0..0000000000
--- a/target/linux/brcm47xx/patches-3.14/156-MIPS-BCM47XX-Make-bcma-init-NVRAM-instead-of-bcm47xx.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 7177efc5b030012c54c2e217c9d6decc0bcc1c53 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Tue, 28 Oct 2014 13:30:23 +0100
-Subject: [PATCH 156/158] MIPS: BCM47XX: Make bcma init NVRAM instead of
- bcm47xx polling it
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This drops ssb/bcma dependency and will allow us to make it a standalone
-driver.
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Cc: linux-mips@linux-mips.org
-Cc: Hauke Mehrtens <hauke@hauke-m.de>
-Patchwork: https://patchwork.linux-mips.org/patch/8233/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/bcm47xx/nvram.c | 42 ++----------------------------------------
- drivers/bcma/driver_mips.c | 13 +++++++++++--
- 2 files changed, 13 insertions(+), 42 deletions(-)
-
-diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c
-index fecc5ae..21712fb 100644
---- a/arch/mips/bcm47xx/nvram.c
-+++ b/arch/mips/bcm47xx/nvram.c
-@@ -121,48 +121,10 @@ int bcm47xx_nvram_init_from_mem(u32 base, u32 lim)
- return err;
- }
-
--#ifdef CONFIG_BCM47XX_BCMA
--static int nvram_init_bcma(void)
--{
-- struct bcma_drv_cc *cc = &bcm47xx_bus.bcma.bus.drv_cc;
-- u32 base;
-- u32 lim;
--
--#ifdef CONFIG_BCMA_NFLASH
-- if (cc->nflash.boot) {
-- base = BCMA_SOC_FLASH1;
-- lim = BCMA_SOC_FLASH1_SZ;
-- } else
--#endif
-- if (cc->pflash.present) {
-- base = cc->pflash.window;
-- lim = cc->pflash.window_size;
--#ifdef CONFIG_BCMA_SFLASH
-- } else if (cc->sflash.present) {
-- base = cc->sflash.window;
-- lim = cc->sflash.size;
--#endif
-- } else {
-- pr_err("Couldn't find supported flash memory\n");
-- return -ENXIO;
-- }
--
-- return bcm47xx_nvram_init_from_mem(base, lim);
--}
--#endif
--
- static int nvram_init(void)
- {
-- switch (bcm47xx_bus_type) {
--#ifdef CONFIG_BCM47XX_SSB
-- case BCM47XX_BUS_TYPE_SSB:
-- break;
--#endif
--#ifdef CONFIG_BCM47XX_BCMA
-- case BCM47XX_BUS_TYPE_BCMA:
-- return nvram_init_bcma();
--#endif
-- }
-+ /* TODO: Look for MTD "nvram" partition */
-+
- return -ENXIO;
- }
-
-diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c
-index 004d6aa..8a653dc 100644
---- a/drivers/bcma/driver_mips.c
-+++ b/drivers/bcma/driver_mips.c
-@@ -20,6 +20,9 @@
- #include <linux/serial_core.h>
- #include <linux/serial_reg.h>
- #include <linux/time.h>
-+#ifdef CONFIG_BCM47XX
-+#include <bcm47xx_nvram.h>
-+#endif
-
- enum bcma_boot_dev {
- BCMA_BOOT_DEV_UNK = 0,
-@@ -316,10 +319,16 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
- switch (boot_dev) {
- case BCMA_BOOT_DEV_PARALLEL:
- case BCMA_BOOT_DEV_SERIAL:
-- /* TODO: Init NVRAM using BCMA_SOC_FLASH2 window */
-+#ifdef CONFIG_BCM47XX
-+ bcm47xx_nvram_init_from_mem(BCMA_SOC_FLASH2,
-+ BCMA_SOC_FLASH2_SZ);
-+#endif
- break;
- case BCMA_BOOT_DEV_NAND:
-- /* TODO: Init NVRAM using BCMA_SOC_FLASH1 window */
-+#ifdef CONFIG_BCM47XX
-+ bcm47xx_nvram_init_from_mem(BCMA_SOC_FLASH1,
-+ BCMA_SOC_FLASH1_SZ);
-+#endif
- break;
- default:
- break;
---
-1.8.4.5
-
diff --git a/target/linux/brcm47xx/patches-3.14/157-MIPS-BCM47XX-Move-SPROM-fallback-code-into-sprom.c.patch b/target/linux/brcm47xx/patches-3.14/157-MIPS-BCM47XX-Move-SPROM-fallback-code-into-sprom.c.patch
deleted file mode 100644
index fe4962993b..0000000000
--- a/target/linux/brcm47xx/patches-3.14/157-MIPS-BCM47XX-Move-SPROM-fallback-code-into-sprom.c.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From a59da8fb3b2a1f2df5f871464e43cd5b6ca6ceb1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Tue, 28 Oct 2014 12:52:02 +0100
-Subject: [PATCH 157/158] MIPS: BCM47XX: Move SPROM fallback code into sprom.c
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This is some general cleanup as well as preparing sprom.c to become a
-standalone driver. We will need this for bcm53xx ARM arch support.
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
-Cc: linux-mips@linux-mips.org
-Patchwork: https://patchwork.linux-mips.org/patch/8232/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/bcm47xx/bcm47xx_private.h | 3 ++
- arch/mips/bcm47xx/setup.c | 58 ++-----------------------------
- arch/mips/bcm47xx/sprom.c | 68 +++++++++++++++++++++++++++++++++++++
- 3 files changed, 73 insertions(+), 56 deletions(-)
-
-diff --git a/arch/mips/bcm47xx/bcm47xx_private.h b/arch/mips/bcm47xx/bcm47xx_private.h
-index f1cc9d0..12a112d 100644
---- a/arch/mips/bcm47xx/bcm47xx_private.h
-+++ b/arch/mips/bcm47xx/bcm47xx_private.h
-@@ -6,6 +6,9 @@
- /* prom.c */
- void __init bcm47xx_prom_highmem_init(void);
-
-+/* sprom.c */
-+void bcm47xx_sprom_register_fallbacks(void);
-+
- /* buttons.c */
- int __init bcm47xx_buttons_register(void);
-
-diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c
-index c00585d..444c65a 100644
---- a/arch/mips/bcm47xx/setup.c
-+++ b/arch/mips/bcm47xx/setup.c
-@@ -102,23 +102,6 @@ static void bcm47xx_machine_halt(void)
- }
-
- #ifdef CONFIG_BCM47XX_SSB
--static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out)
--{
-- char prefix[10];
--
-- if (bus->bustype == SSB_BUSTYPE_PCI) {
-- memset(out, 0, sizeof(struct ssb_sprom));
-- snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
-- bus->host_pci->bus->number + 1,
-- PCI_SLOT(bus->host_pci->devfn));
-- bcm47xx_fill_sprom(out, prefix, false);
-- return 0;
-- } else {
-- printk(KERN_WARNING "bcm47xx: unable to fill SPROM for given bustype.\n");
-- return -EINVAL;
-- }
--}
--
- static int bcm47xx_get_invariants(struct ssb_bus *bus,
- struct ssb_init_invariants *iv)
- {
-@@ -144,11 +127,6 @@ static void __init bcm47xx_register_ssb(void)
- char buf[100];
- struct ssb_mipscore *mcore;
-
-- err = ssb_arch_register_fallback_sprom(&bcm47xx_get_sprom_ssb);
-- if (err)
-- printk(KERN_WARNING "bcm47xx: someone else already registered"
-- " a ssb SPROM callback handler (err %d)\n", err);
--
- err = ssb_bus_ssbbus_register(&(bcm47xx_bus.ssb), SSB_ENUM_BASE,
- bcm47xx_get_invariants);
- if (err)
-@@ -171,44 +149,10 @@ static void __init bcm47xx_register_ssb(void)
- #endif
-
- #ifdef CONFIG_BCM47XX_BCMA
--static int bcm47xx_get_sprom_bcma(struct bcma_bus *bus, struct ssb_sprom *out)
--{
-- char prefix[10];
-- struct bcma_device *core;
--
-- switch (bus->hosttype) {
-- case BCMA_HOSTTYPE_PCI:
-- memset(out, 0, sizeof(struct ssb_sprom));
-- snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
-- bus->host_pci->bus->number + 1,
-- PCI_SLOT(bus->host_pci->devfn));
-- bcm47xx_fill_sprom(out, prefix, false);
-- return 0;
-- case BCMA_HOSTTYPE_SOC:
-- memset(out, 0, sizeof(struct ssb_sprom));
-- core = bcma_find_core(bus, BCMA_CORE_80211);
-- if (core) {
-- snprintf(prefix, sizeof(prefix), "sb/%u/",
-- core->core_index);
-- bcm47xx_fill_sprom(out, prefix, true);
-- } else {
-- bcm47xx_fill_sprom(out, NULL, false);
-- }
-- return 0;
-- default:
-- pr_warn("bcm47xx: unable to fill SPROM for given bustype.\n");
-- return -EINVAL;
-- }
--}
--
- static void __init bcm47xx_register_bcma(void)
- {
- int err;
-
-- err = bcma_arch_register_fallback_sprom(&bcm47xx_get_sprom_bcma);
-- if (err)
-- pr_warn("bcm47xx: someone else already registered a bcma SPROM callback handler (err %d)\n", err);
--
- err = bcma_host_soc_register(&bcm47xx_bus.bcma);
- if (err)
- panic("Failed to register BCMA bus (err %d)", err);
-@@ -229,6 +173,7 @@ void __init plat_mem_setup(void)
- printk(KERN_INFO "bcm47xx: using bcma bus\n");
- #ifdef CONFIG_BCM47XX_BCMA
- bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA;
-+ bcm47xx_sprom_register_fallbacks();
- bcm47xx_register_bcma();
- bcm47xx_set_system_type(bcm47xx_bus.bcma.bus.chipinfo.id);
- #ifdef CONFIG_HIGHMEM
-@@ -239,6 +184,7 @@ void __init plat_mem_setup(void)
- printk(KERN_INFO "bcm47xx: using ssb bus\n");
- #ifdef CONFIG_BCM47XX_SSB
- bcm47xx_bus_type = BCM47XX_BUS_TYPE_SSB;
-+ bcm47xx_sprom_register_fallbacks();
- bcm47xx_register_ssb();
- bcm47xx_set_system_type(bcm47xx_bus.ssb.chip_id);
- #endif
-diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c
-index 41226b6..e772e77 100644
---- a/arch/mips/bcm47xx/sprom.c
-+++ b/arch/mips/bcm47xx/sprom.c
-@@ -801,3 +801,71 @@ void bcm47xx_fill_bcma_boardinfo(struct bcma_boardinfo *boardinfo,
- nvram_read_u16(prefix, NULL, "boardtype", &boardinfo->type, 0, true);
- }
- #endif
-+
-+#if defined(CONFIG_BCM47XX_SSB)
-+static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out)
-+{
-+ char prefix[10];
-+
-+ if (bus->bustype == SSB_BUSTYPE_PCI) {
-+ memset(out, 0, sizeof(struct ssb_sprom));
-+ snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
-+ bus->host_pci->bus->number + 1,
-+ PCI_SLOT(bus->host_pci->devfn));
-+ bcm47xx_fill_sprom(out, prefix, false);
-+ return 0;
-+ } else {
-+ pr_warn("bcm47xx: unable to fill SPROM for given bustype.\n");
-+ return -EINVAL;
-+ }
-+}
-+#endif
-+
-+#if defined(CONFIG_BCM47XX_BCMA)
-+static int bcm47xx_get_sprom_bcma(struct bcma_bus *bus, struct ssb_sprom *out)
-+{
-+ char prefix[10];
-+ struct bcma_device *core;
-+
-+ switch (bus->hosttype) {
-+ case BCMA_HOSTTYPE_PCI:
-+ memset(out, 0, sizeof(struct ssb_sprom));
-+ snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
-+ bus->host_pci->bus->number + 1,
-+ PCI_SLOT(bus->host_pci->devfn));
-+ bcm47xx_fill_sprom(out, prefix, false);
-+ return 0;
-+ case BCMA_HOSTTYPE_SOC:
-+ memset(out, 0, sizeof(struct ssb_sprom));
-+ core = bcma_find_core(bus, BCMA_CORE_80211);
-+ if (core) {
-+ snprintf(prefix, sizeof(prefix), "sb/%u/",
-+ core->core_index);
-+ bcm47xx_fill_sprom(out, prefix, true);
-+ } else {
-+ bcm47xx_fill_sprom(out, NULL, false);
-+ }
-+ return 0;
-+ default:
-+ pr_warn("bcm47xx: unable to fill SPROM for given bustype.\n");
-+ return -EINVAL;
-+ }
-+}
-+#endif
-+
-+/*
-+ * On bcm47xx we need to register SPROM fallback handler very early, so we can't
-+ * use anything like platform device / driver for this.
-+ */
-+void bcm47xx_sprom_register_fallbacks(void)
-+{
-+#if defined(CONFIG_BCM47XX_SSB)
-+ if (ssb_arch_register_fallback_sprom(&bcm47xx_get_sprom_ssb))
-+ pr_warn("Failed to registered ssb SPROM handler\n");
-+#endif
-+
-+#if defined(CONFIG_BCM47XX_BCMA)
-+ if (bcma_arch_register_fallback_sprom(&bcm47xx_get_sprom_bcma))
-+ pr_warn("Failed to registered bcma SPROM handler\n");
-+#endif
-+}
---
-1.8.4.5
-
diff --git a/target/linux/brcm47xx/patches-3.14/158-MIPS-BCM47XX-Initialize-bcma-bus-later-with-mm-avail.patch b/target/linux/brcm47xx/patches-3.14/158-MIPS-BCM47XX-Initialize-bcma-bus-later-with-mm-avail.patch
deleted file mode 100644
index 54680de0b7..0000000000
--- a/target/linux/brcm47xx/patches-3.14/158-MIPS-BCM47XX-Initialize-bcma-bus-later-with-mm-avail.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From e5810fa0c1bed16fdfb408862a2e17e962ec5cf6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Tue, 28 Oct 2014 14:40:38 +0100
-Subject: [PATCH 158/158] MIPS: BCM47XX: Initialize bcma bus later (with mm
- available)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Initializaion with memory allocator available will be much simpler, this
-will allow cleanup in the bcma code.
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
-Cc: linux-mips@linux-mips.org
-Patchwork: https://patchwork.linux-mips.org/patch/8234/
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
----
- arch/mips/bcm47xx/bcm47xx_private.h | 3 +++
- arch/mips/bcm47xx/irq.c | 8 ++++++++
- arch/mips/bcm47xx/setup.c | 33 +++++++++++++++++++++++++++------
- 3 files changed, 38 insertions(+), 6 deletions(-)
-
-diff --git a/arch/mips/bcm47xx/bcm47xx_private.h b/arch/mips/bcm47xx/bcm47xx_private.h
-index 12a112d..ea909a5 100644
---- a/arch/mips/bcm47xx/bcm47xx_private.h
-+++ b/arch/mips/bcm47xx/bcm47xx_private.h
-@@ -15,6 +15,9 @@ int __init bcm47xx_buttons_register(void);
- /* leds.c */
- void __init bcm47xx_leds_register(void);
-
-+/* setup.c */
-+void __init bcm47xx_bus_setup(void);
-+
- /* workarounds.c */
- void __init bcm47xx_workarounds(void);
-
-diff --git a/arch/mips/bcm47xx/irq.c b/arch/mips/bcm47xx/irq.c
-index e0585b7..21b4497 100644
---- a/arch/mips/bcm47xx/irq.c
-+++ b/arch/mips/bcm47xx/irq.c
-@@ -22,6 +22,8 @@
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-+#include "bcm47xx_private.h"
-+
- #include <linux/types.h>
- #include <linux/interrupt.h>
- #include <linux/irq.h>
-@@ -65,6 +67,12 @@ DEFINE_HWx_IRQDISPATCH(7)
-
- void __init arch_init_irq(void)
- {
-+ /*
-+ * This is the first arch callback after mm_init (we can use kmalloc),
-+ * so let's finish bus initialization now.
-+ */
-+ bcm47xx_bus_setup();
-+
- #ifdef CONFIG_BCM47XX_BCMA
- if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA) {
- bcma_write32(bcm47xx_bus.bcma.bus.drv_mips.core,
-diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c
-index 444c65a..e43b504 100644
---- a/arch/mips/bcm47xx/setup.c
-+++ b/arch/mips/bcm47xx/setup.c
-@@ -156,15 +156,14 @@ static void __init bcm47xx_register_bcma(void)
- err = bcma_host_soc_register(&bcm47xx_bus.bcma);
- if (err)
- panic("Failed to register BCMA bus (err %d)", err);
--
-- err = bcma_host_soc_init(&bcm47xx_bus.bcma);
-- if (err)
-- panic("Failed to initialize BCMA bus (err %d)", err);
--
-- bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo, NULL);
- }
- #endif
-
-+/*
-+ * Memory setup is done in the early part of MIPS's arch_mem_init. It's supposed
-+ * to detect memory and record it with add_memory_region.
-+ * Any extra initializaion performed here must not use kmalloc or bootmem.
-+ */
- void __init plat_mem_setup(void)
- {
- struct cpuinfo_mips *c = &current_cpu_data;
-@@ -193,6 +192,28 @@ void __init plat_mem_setup(void)
- _machine_restart = bcm47xx_machine_restart;
- _machine_halt = bcm47xx_machine_halt;
- pm_power_off = bcm47xx_machine_halt;
-+}
-+
-+/*
-+ * This finishes bus initialization doing things that were not possible without
-+ * kmalloc. Make sure to call it late enough (after mm_init).
-+ */
-+void __init bcm47xx_bus_setup(void)
-+{
-+#ifdef CONFIG_BCM47XX_BCMA
-+ if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA) {
-+ int err;
-+
-+ err = bcma_host_soc_init(&bcm47xx_bus.bcma);
-+ if (err)
-+ panic("Failed to initialize BCMA bus (err %d)", err);
-+
-+ bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo,
-+ NULL);
-+ }
-+#endif
-+
-+ /* With bus initialized we can access NVRAM and detect the board */
- bcm47xx_board_detect();
- mips_set_machine_name(bcm47xx_board_get_name());
- }
---
-1.8.4.5
-
diff --git a/target/linux/brcm47xx/patches-3.14/159-cpu_fixes.patch b/target/linux/brcm47xx/patches-3.14/159-cpu_fixes.patch
deleted file mode 100644
index 12af46c032..0000000000
--- a/target/linux/brcm47xx/patches-3.14/159-cpu_fixes.patch
+++ /dev/null
@@ -1,373 +0,0 @@
---- a/arch/mips/include/asm/r4kcache.h
-+++ b/arch/mips/include/asm/r4kcache.h
-@@ -18,6 +18,20 @@
- #include <asm/cpu-type.h>
- #include <asm/mipsmtregs.h>
-
-+#ifdef CONFIG_BCM47XX
-+#include <asm/paccess.h>
-+#include <linux/ssb/ssb.h>
-+#define BCM4710_DUMMY_RREG() ((void) *((u8 *) KSEG1ADDR(SSB_ENUM_BASE)))
-+
-+#define BCM4710_FILL_TLB(addr) (*(volatile unsigned long *)(addr))
-+#define BCM4710_PROTECTED_FILL_TLB(addr) ({ unsigned long x; get_dbe(x, (volatile unsigned long *)(addr)); })
-+#else
-+#define BCM4710_DUMMY_RREG()
-+
-+#define BCM4710_FILL_TLB(addr)
-+#define BCM4710_PROTECTED_FILL_TLB(addr)
-+#endif
-+
- /*
- * This macro return a properly sign-extended address suitable as base address
- * for indexed cache operations. Two issues here:
-@@ -151,6 +165,7 @@ static inline void flush_icache_line_ind
- static inline void flush_dcache_line_indexed(unsigned long addr)
- {
- __dflush_prologue
-+ BCM4710_DUMMY_RREG();
- cache_op(Index_Writeback_Inv_D, addr);
- __dflush_epilogue
- }
-@@ -178,6 +193,7 @@ static inline void flush_icache_line(uns
- static inline void flush_dcache_line(unsigned long addr)
- {
- __dflush_prologue
-+ BCM4710_DUMMY_RREG();
- cache_op(Hit_Writeback_Inv_D, addr);
- __dflush_epilogue
- }
-@@ -185,6 +201,7 @@ static inline void flush_dcache_line(uns
- static inline void invalidate_dcache_line(unsigned long addr)
- {
- __dflush_prologue
-+ BCM4710_DUMMY_RREG();
- cache_op(Hit_Invalidate_D, addr);
- __dflush_epilogue
- }
-@@ -223,6 +240,7 @@ static inline void protected_flush_icach
- break;
-
- default:
-+ BCM4710_DUMMY_RREG();
- protected_cache_op(Hit_Invalidate_I, addr);
- break;
- }
-@@ -236,6 +254,7 @@ static inline void protected_flush_icach
- */
- static inline void protected_writeback_dcache_line(unsigned long addr)
- {
-+ BCM4710_DUMMY_RREG();
- protected_cache_op(Hit_Writeback_Inv_D, addr);
- }
-
-@@ -356,8 +375,51 @@ static inline void invalidate_tcache_pag
- : "r" (base), \
- "i" (op));
-
-+static inline void blast_dcache(void)
-+{
-+ unsigned long start = KSEG0;
-+ unsigned long dcache_size = current_cpu_data.dcache.waysize * current_cpu_data.dcache.ways;
-+ unsigned long end = (start + dcache_size);
-+
-+ do {
-+ BCM4710_DUMMY_RREG();
-+ cache_op(Index_Writeback_Inv_D, start);
-+ start += current_cpu_data.dcache.linesz;
-+ } while(start < end);
-+}
-+
-+static inline void blast_dcache_page(unsigned long page)
-+{
-+ unsigned long start = page;
-+ unsigned long end = start + PAGE_SIZE;
-+
-+ BCM4710_FILL_TLB(start);
-+ do {
-+ BCM4710_DUMMY_RREG();
-+ cache_op(Hit_Writeback_Inv_D, start);
-+ start += current_cpu_data.dcache.linesz;
-+ } while(start < end);
-+}
-+
-+static inline void blast_dcache_page_indexed(unsigned long page)
-+{
-+ unsigned long start = page;
-+ unsigned long end = start + PAGE_SIZE;
-+ unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit;
-+ unsigned long ws_end = current_cpu_data.dcache.ways <<
-+ current_cpu_data.dcache.waybit;
-+ unsigned long ws, addr;
-+ for (ws = 0; ws < ws_end; ws += ws_inc) {
-+ start = page + ws;
-+ for (addr = start; addr < end; addr += current_cpu_data.dcache.linesz) {
-+ BCM4710_DUMMY_RREG();
-+ cache_op(Index_Writeback_Inv_D, addr);
-+ }
-+ }
-+}
-+
- /* build blast_xxx, blast_xxx_page, blast_xxx_page_indexed */
--#define __BUILD_BLAST_CACHE(pfx, desc, indexop, hitop, lsize, extra) \
-+#define __BUILD_BLAST_CACHE(pfx, desc, indexop, hitop, lsize, extra, war) \
- static inline void extra##blast_##pfx##cache##lsize(void) \
- { \
- unsigned long start = INDEX_BASE; \
-@@ -369,6 +431,7 @@ static inline void extra##blast_##pfx##c
- \
- __##pfx##flush_prologue \
- \
-+ war \
- for (ws = 0; ws < ws_end; ws += ws_inc) \
- for (addr = start; addr < end; addr += lsize * 32) \
- cache##lsize##_unroll32(addr|ws, indexop); \
-@@ -383,6 +446,7 @@ static inline void extra##blast_##pfx##c
- \
- __##pfx##flush_prologue \
- \
-+ war \
- do { \
- cache##lsize##_unroll32(start, hitop); \
- start += lsize * 32; \
-@@ -401,6 +465,8 @@ static inline void extra##blast_##pfx##c
- current_cpu_data.desc.waybit; \
- unsigned long ws, addr; \
- \
-+ war \
-+ \
- __##pfx##flush_prologue \
- \
- for (ws = 0; ws < ws_end; ws += ws_inc) \
-@@ -410,37 +476,40 @@ static inline void extra##blast_##pfx##c
- __##pfx##flush_epilogue \
- }
-
--__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 16, )
--__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 16, )
--__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 16, )
--__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 32, )
--__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 32, )
--__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I_Loongson2, 32, loongson2_)
--__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 32, )
--__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 64, )
--__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 64, )
--__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64, )
--__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128, )
--
--__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 16, )
--__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 32, )
--__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 16, )
--__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 32, )
--__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 64, )
--__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 128, )
-+__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 16, , )
-+__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 16, , BCM4710_FILL_TLB(start);)
-+__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 16, , )
-+__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 32, , )
-+__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 32, , BCM4710_FILL_TLB(start);)
-+__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I_Loongson2, 32, loongson2_, BCM4710_FILL_TLB(start);)
-+__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 32, , )
-+__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 64, , )
-+__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 64, , BCM4710_FILL_TLB(start);)
-+__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64, , )
-+__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128, , )
-+
-+__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 16, , )
-+__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 32, , )
-+__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 16, , )
-+__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 32, , )
-+__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 64, , )
-+__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 128, , )
-+
-
- /* build blast_xxx_range, protected_blast_xxx_range */
--#define __BUILD_BLAST_CACHE_RANGE(pfx, desc, hitop, prot, extra) \
-+#define __BUILD_BLAST_CACHE_RANGE(pfx, desc, hitop, prot, extra, war, war2) \
- static inline void prot##extra##blast_##pfx##cache##_range(unsigned long start, \
- unsigned long end) \
- { \
- unsigned long lsize = cpu_##desc##_line_size(); \
- unsigned long addr = start & ~(lsize - 1); \
- unsigned long aend = (end - 1) & ~(lsize - 1); \
-+ war \
- \
- __##pfx##flush_prologue \
- \
- while (1) { \
-+ war2 \
- prot##cache_op(hitop, addr); \
- if (addr == aend) \
- break; \
-@@ -450,15 +519,15 @@ static inline void prot##extra##blast_##
- __##pfx##flush_epilogue \
- }
-
--__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, protected_, )
--__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, protected_, )
--__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I, protected_, )
-+__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, protected_, , BCM4710_PROTECTED_FILL_TLB(addr); BCM4710_PROTECTED_FILL_TLB(aend);, BCM4710_DUMMY_RREG();)
-+__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, protected_, , , )
-+__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I, protected_, , , )
- __BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I_Loongson2, \
-- protected_, loongson2_)
--__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, , )
--__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, , )
-+ protected_, loongson2_, , )
-+__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, , , BCM4710_FILL_TLB(addr); BCM4710_FILL_TLB(aend);, BCM4710_DUMMY_RREG();)
-+__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, , , , )
- /* blast_inv_dcache_range */
--__BUILD_BLAST_CACHE_RANGE(inv_d, dcache, Hit_Invalidate_D, , )
--__BUILD_BLAST_CACHE_RANGE(inv_s, scache, Hit_Invalidate_SD, , )
-+__BUILD_BLAST_CACHE_RANGE(inv_d, dcache, Hit_Invalidate_D, , , , BCM4710_DUMMY_RREG();)
-+__BUILD_BLAST_CACHE_RANGE(inv_s, scache, Hit_Invalidate_SD, , , , )
-
- #endif /* _ASM_R4KCACHE_H */
---- a/arch/mips/include/asm/stackframe.h
-+++ b/arch/mips/include/asm/stackframe.h
-@@ -436,6 +436,10 @@
- .macro RESTORE_SP_AND_RET
- LONG_L sp, PT_R29(sp)
- .set mips3
-+#ifdef CONFIG_BCM47XX
-+ nop
-+ nop
-+#endif
- eret
- .set mips0
- .endm
---- a/arch/mips/kernel/genex.S
-+++ b/arch/mips/kernel/genex.S
-@@ -46,6 +46,10 @@
- NESTED(except_vec3_generic, 0, sp)
- .set push
- .set noat
-+#ifdef CONFIG_BCM47XX
-+ nop
-+ nop
-+#endif
- #if R5432_CP0_INTERRUPT_WAR
- mfc0 k0, CP0_INDEX
- #endif
---- a/arch/mips/mm/c-r4k.c
-+++ b/arch/mips/mm/c-r4k.c
-@@ -37,6 +37,9 @@
- #include <asm/traps.h>
- #include <asm/dma-coherence.h>
-
-+/* For enabling BCM4710 cache workarounds */
-+int bcm4710 = 0;
-+
- /*
- * Special Variant of smp_call_function for use by cache functions:
- *
-@@ -113,6 +116,9 @@ static void r4k_blast_dcache_page_setup(
- {
- unsigned long dc_lsize = cpu_dcache_line_size();
-
-+ if (bcm4710)
-+ r4k_blast_dcache_page = blast_dcache_page;
-+ else
- if (dc_lsize == 0)
- r4k_blast_dcache_page = (void *)cache_noop;
- else if (dc_lsize == 16)
-@@ -129,6 +135,9 @@ static void r4k_blast_dcache_page_indexe
- {
- unsigned long dc_lsize = cpu_dcache_line_size();
-
-+ if (bcm4710)
-+ r4k_blast_dcache_page_indexed = blast_dcache_page_indexed;
-+ else
- if (dc_lsize == 0)
- r4k_blast_dcache_page_indexed = (void *)cache_noop;
- else if (dc_lsize == 16)
-@@ -146,6 +155,9 @@ static void r4k_blast_dcache_setup(void)
- {
- unsigned long dc_lsize = cpu_dcache_line_size();
-
-+ if (bcm4710)
-+ r4k_blast_dcache = blast_dcache;
-+ else
- if (dc_lsize == 0)
- r4k_blast_dcache = (void *)cache_noop;
- else if (dc_lsize == 16)
-@@ -703,6 +715,8 @@ static void local_r4k_flush_cache_sigtra
- unsigned long addr = (unsigned long) arg;
-
- R4600_HIT_CACHEOP_WAR_IMPL;
-+ BCM4710_PROTECTED_FILL_TLB(addr);
-+ BCM4710_PROTECTED_FILL_TLB(addr + 4);
- if (dc_lsize)
- protected_writeback_dcache_line(addr & ~(dc_lsize - 1));
- if (!cpu_icache_snoops_remote_store && scache_size)
-@@ -1403,6 +1417,17 @@ static void coherency_setup(void)
- * silly idea of putting something else there ...
- */
- switch (current_cpu_type()) {
-+ case CPU_BMIPS3300:
-+ {
-+ u32 cm;
-+ cm = read_c0_diag();
-+ /* Enable icache */
-+ cm |= (1 << 31);
-+ /* Enable dcache */
-+ cm |= (1 << 30);
-+ write_c0_diag(cm);
-+ }
-+ break;
- case CPU_R4000PC:
- case CPU_R4000SC:
- case CPU_R4000MC:
-@@ -1449,6 +1474,15 @@ void r4k_cache_init(void)
- extern void build_copy_page(void);
- struct cpuinfo_mips *c = &current_cpu_data;
-
-+ /* Check if special workarounds are required */
-+#ifdef CONFIG_BCM47XX
-+ if (current_cpu_data.cputype == CPU_BMIPS32 && (current_cpu_data.processor_id & 0xff) == 0) {
-+ printk("Enabling BCM4710A0 cache workarounds.\n");
-+ bcm4710 = 1;
-+ } else
-+#endif
-+ bcm4710 = 0;
-+
- probe_pcache();
- setup_scache();
-
-@@ -1514,6 +1548,14 @@ void r4k_cache_init(void)
- */
- local_r4k___flush_cache_all(NULL);
-
-+#ifdef CONFIG_BCM47XX
-+ {
-+ static void (*_coherency_setup)(void);
-+ _coherency_setup = (void (*)(void)) KSEG1ADDR(coherency_setup);
-+ _coherency_setup();
-+ }
-+#else
- coherency_setup();
-+#endif
- board_cache_error_setup = r4k_cache_error_setup;
- }
---- a/arch/mips/mm/tlbex.c
-+++ b/arch/mips/mm/tlbex.c
-@@ -1280,6 +1280,9 @@ static void build_r4000_tlb_refill_handl
- /* No need for uasm_i_nop */
- }
-
-+#ifdef CONFIG_BCM47XX
-+ uasm_i_nop(&p);
-+#endif
- #ifdef CONFIG_64BIT
- build_get_pmde64(&p, &l, &r, K0, K1); /* get pmd in K1 */
- #else
-@@ -1840,6 +1843,9 @@ build_r4000_tlbchange_handler_head(u32 *
- {
- struct work_registers wr = build_get_work_registers(p);
-
-+#ifdef CONFIG_BCM47XX
-+ uasm_i_nop(p);
-+#endif
- #ifdef CONFIG_64BIT
- build_get_pmde64(p, l, r, wr.r1, wr.r2); /* get pmd in ptr */
- #else
diff --git a/target/linux/brcm47xx/patches-3.14/160-kmap_coherent.patch b/target/linux/brcm47xx/patches-3.14/160-kmap_coherent.patch
deleted file mode 100644
index 60d9da0f0d..0000000000
--- a/target/linux/brcm47xx/patches-3.14/160-kmap_coherent.patch
+++ /dev/null
@@ -1,70 +0,0 @@
---- a/arch/mips/include/asm/cpu-features.h
-+++ b/arch/mips/include/asm/cpu-features.h
-@@ -133,6 +133,9 @@
- #ifndef cpu_has_local_ebase
- #define cpu_has_local_ebase 1
- #endif
-+#ifndef cpu_use_kmap_coherent
-+#define cpu_use_kmap_coherent 1
-+#endif
-
- /*
- * I-Cache snoops remote store. This only matters on SMP. Some multiprocessors
---- a/arch/mips/include/asm/mach-bcm47xx/cpu-feature-overrides.h
-+++ b/arch/mips/include/asm/mach-bcm47xx/cpu-feature-overrides.h
-@@ -79,4 +79,6 @@
- #define cpu_scache_line_size() 0
- #define cpu_has_vz 0
-
-+#define cpu_use_kmap_coherent 0
-+
- #endif /* __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H */
---- a/arch/mips/mm/c-r4k.c
-+++ b/arch/mips/mm/c-r4k.c
-@@ -523,7 +523,7 @@ static inline void local_r4k_flush_cache
- */
- map_coherent = (cpu_has_dc_aliases &&
- page_mapped(page) && !Page_dcache_dirty(page));
-- if (map_coherent)
-+ if (map_coherent && cpu_use_kmap_coherent)
- vaddr = kmap_coherent(page, addr);
- else
- vaddr = kmap_atomic(page);
-@@ -546,7 +546,7 @@ static inline void local_r4k_flush_cache
- }
-
- if (vaddr) {
-- if (map_coherent)
-+ if (map_coherent && cpu_use_kmap_coherent)
- kunmap_coherent();
- else
- kunmap_atomic(vaddr);
---- a/arch/mips/mm/init.c
-+++ b/arch/mips/mm/init.c
-@@ -200,7 +200,7 @@ void copy_user_highpage(struct page *to,
- void *vfrom, *vto;
-
- vto = kmap_atomic(to);
-- if (cpu_has_dc_aliases &&
-+ if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
- page_mapped(from) && !Page_dcache_dirty(from)) {
- vfrom = kmap_coherent(from, vaddr);
- copy_page(vto, vfrom);
-@@ -222,7 +222,7 @@ void copy_to_user_page(struct vm_area_st
- struct page *page, unsigned long vaddr, void *dst, const void *src,
- unsigned long len)
- {
-- if (cpu_has_dc_aliases &&
-+ if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
- page_mapped(page) && !Page_dcache_dirty(page)) {
- void *vto = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
- memcpy(vto, src, len);
-@@ -240,7 +240,7 @@ void copy_from_user_page(struct vm_area_
- struct page *page, unsigned long vaddr, void *dst, const void *src,
- unsigned long len)
- {
-- if (cpu_has_dc_aliases &&
-+ if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
- page_mapped(page) && !Page_dcache_dirty(page)) {
- void *vfrom = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
- memcpy(dst, vfrom, len);
diff --git a/target/linux/brcm47xx/patches-3.14/209-b44-register-adm-switch.patch b/target/linux/brcm47xx/patches-3.14/209-b44-register-adm-switch.patch
deleted file mode 100644
index 108d79c0b8..0000000000
--- a/target/linux/brcm47xx/patches-3.14/209-b44-register-adm-switch.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From b36f694256f41bc71571f467646d015dda128d14 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Sat, 9 Nov 2013 17:03:59 +0100
-Subject: [PATCH 210/210] b44: register adm switch
-
----
- drivers/net/ethernet/broadcom/b44.c | 57 +++++++++++++++++++++++++++++++++++
- drivers/net/ethernet/broadcom/b44.h | 3 ++
- 2 files changed, 60 insertions(+)
-
---- a/drivers/net/ethernet/broadcom/b44.c
-+++ b/drivers/net/ethernet/broadcom/b44.c
-@@ -31,6 +31,8 @@
- #include <linux/ssb/ssb.h>
- #include <linux/slab.h>
- #include <linux/phy.h>
-+#include <linux/platform_device.h>
-+#include <linux/platform_data/adm6996-gpio.h>
-
- #include <asm/uaccess.h>
- #include <asm/io.h>
-@@ -2239,6 +2241,70 @@ static void b44_adjust_link(struct net_d
- }
- }
-
-+#ifdef CONFIG_BCM47XX
-+static int b44_register_adm_switch(struct b44 *bp)
-+{
-+ int gpio;
-+ struct platform_device *pdev;
-+ struct adm6996_gpio_platform_data adm_data = {0};
-+ struct platform_device_info info = {0};
-+
-+ adm_data.model = ADM6996L;
-+ gpio = bcm47xx_nvram_gpio_pin("adm_eecs");
-+ if (gpio >= 0)
-+ adm_data.eecs = gpio;
-+ else
-+ adm_data.eecs = 2;
-+
-+ gpio = bcm47xx_nvram_gpio_pin("adm_eesk");
-+ if (gpio >= 0)
-+ adm_data.eesk = gpio;
-+ else
-+ adm_data.eesk = 3;
-+
-+ gpio = bcm47xx_nvram_gpio_pin("adm_eedi");
-+ if (gpio >= 0)
-+ adm_data.eedi = gpio;
-+ else
-+ adm_data.eedi = 4;
-+
-+ gpio = bcm47xx_nvram_gpio_pin("adm_rc");
-+ if (gpio >= 0)
-+ adm_data.eerc = gpio;
-+ else
-+ adm_data.eerc = 5;
-+
-+ info.parent = bp->sdev->dev;
-+ info.name = "adm6996_gpio";
-+ info.id = -1;
-+ info.data = &adm_data;
-+ info.size_data = sizeof(adm_data);
-+
-+ if (!bp->adm_switch) {
-+ pdev = platform_device_register_full(&info);
-+ if (IS_ERR(pdev))
-+ return PTR_ERR(pdev);
-+
-+ bp->adm_switch = pdev;
-+ }
-+ return 0;
-+}
-+static void b44_unregister_adm_switch(struct b44 *bp)
-+{
-+ if (bp->adm_switch)
-+ platform_device_unregister(bp->adm_switch);
-+}
-+#else
-+static int b44_register_adm_switch(struct b44 *bp)
-+{
-+ return 0;
-+}
-+static void b44_unregister_adm_switch(struct b44 *bp)
-+{
-+
-+}
-+#endif /* CONFIG_BCM47XX */
-+
- static int b44_register_phy_one(struct b44 *bp)
- {
- struct mii_bus *mii_bus;
-@@ -2282,6 +2348,9 @@ static int b44_register_phy_one(struct b
- if (!bp->mii_bus->phy_map[bp->phy_addr] &&
- (sprom->boardflags_lo & (B44_BOARDFLAG_ROBO | B44_BOARDFLAG_ADM))) {
-
-+ if (sprom->boardflags_lo & B44_BOARDFLAG_ADM)
-+ b44_register_adm_switch(bp);
-+
- dev_info(sdev->dev,
- "could not find PHY at %i, use fixed one\n",
- bp->phy_addr);
-@@ -2476,6 +2545,7 @@ static void b44_remove_one(struct ssb_de
- unregister_netdev(dev);
- if (bp->flags & B44_FLAG_EXTERNAL_PHY)
- b44_unregister_phy_one(bp);
-+ b44_unregister_adm_switch(bp);
- ssb_device_disable(sdev, 0);
- ssb_bus_may_powerdown(sdev->bus);
- free_netdev(dev);
---- a/drivers/net/ethernet/broadcom/b44.h
-+++ b/drivers/net/ethernet/broadcom/b44.h
-@@ -404,6 +404,9 @@ struct b44 {
- struct mii_bus *mii_bus;
- int old_link;
- struct mii_if_info mii_if;
-+
-+ /* platform device for associated switch */
-+ struct platform_device *adm_switch;
- };
-
- #endif /* _B44_H */
diff --git a/target/linux/brcm47xx/patches-3.14/210-b44_phy_fix.patch b/target/linux/brcm47xx/patches-3.14/210-b44_phy_fix.patch
deleted file mode 100644
index 7bedd031b1..0000000000
--- a/target/linux/brcm47xx/patches-3.14/210-b44_phy_fix.patch
+++ /dev/null
@@ -1,54 +0,0 @@
---- a/drivers/net/ethernet/broadcom/b44.c
-+++ b/drivers/net/ethernet/broadcom/b44.c
-@@ -431,10 +431,34 @@ static void b44_wap54g10_workaround(stru
- error:
- pr_warning("PHY: cannot reset MII transceiver isolate bit\n");
- }
-+
-+static void b44_bcm47xx_workarounds(struct b44 *bp)
-+{
-+ char buf[20];
-+ struct ssb_device *sdev = bp->sdev;
-+
-+ /* Toshiba WRC-1000, Siemens SE505 v1, Askey RT-210W, RT-220W */
-+ if (sdev->bus->sprom.board_num == 100) {
-+ bp->phy_addr = B44_PHY_ADDR_NO_LOCAL_PHY;
-+ } else {
-+ /* WL-HDD */
-+ if (bcm47xx_nvram_getenv("hardware_version", buf, sizeof(buf)) >= 0 &&
-+ !strncmp(buf, "WL300-", strlen("WL300-"))) {
-+ if (sdev->bus->sprom.et0phyaddr == 0 &&
-+ sdev->bus->sprom.et1phyaddr == 1)
-+ bp->phy_addr = B44_PHY_ADDR_NO_LOCAL_PHY;
-+ }
-+ }
-+ return;
-+}
- #else
- static inline void b44_wap54g10_workaround(struct b44 *bp)
- {
- }
-+
-+static inline void b44_bcm47xx_workarounds(struct b44 *bp)
-+{
-+}
- #endif
-
- static int b44_setup_phy(struct b44 *bp)
-@@ -443,6 +467,7 @@ static int b44_setup_phy(struct b44 *bp)
- int err;
-
- b44_wap54g10_workaround(bp);
-+ b44_bcm47xx_workarounds(bp);
-
- if (bp->flags & B44_FLAG_EXTERNAL_PHY)
- return 0;
-@@ -2169,6 +2194,8 @@ static int b44_get_invariants(struct b44
- * valid PHY address. */
- bp->phy_addr &= 0x1F;
-
-+ b44_bcm47xx_workarounds(bp);
-+
- memcpy(bp->dev->dev_addr, addr, ETH_ALEN);
-
- if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){
diff --git a/target/linux/brcm47xx/patches-3.14/280-activate_ssb_support_in_usb.patch b/target/linux/brcm47xx/patches-3.14/280-activate_ssb_support_in_usb.patch
deleted file mode 100644
index 748710f6f8..0000000000
--- a/target/linux/brcm47xx/patches-3.14/280-activate_ssb_support_in_usb.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-This prevents the options from being delete with make kernel_oldconfig.
----
- drivers/ssb/Kconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/drivers/bcma/Kconfig
-+++ b/drivers/bcma/Kconfig
-@@ -38,6 +38,7 @@ config BCMA_DRIVER_PCI_HOSTMODE
- config BCMA_HOST_SOC
- bool "Support for BCMA in a SoC"
- depends on BCMA
-+ select USB_HCD_BCMA if USB_EHCI_HCD || USB_OHCI_HCD
- help
- Host interface for a Broadcom AIX bus directly mapped into
- the memory. This only works with the Broadcom SoCs from the
---- a/drivers/ssb/Kconfig
-+++ b/drivers/ssb/Kconfig
-@@ -146,6 +146,7 @@ config SSB_SFLASH
- config SSB_EMBEDDED
- bool
- depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
-+ select USB_HCD_SSB if USB_EHCI_HCD || USB_OHCI_HCD
- default y
-
- config SSB_DRIVER_EXTIF
diff --git a/target/linux/brcm47xx/patches-3.14/300-fork_cacheflush.patch b/target/linux/brcm47xx/patches-3.14/300-fork_cacheflush.patch
deleted file mode 100644
index 686fb1b945..0000000000
--- a/target/linux/brcm47xx/patches-3.14/300-fork_cacheflush.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/arch/mips/include/asm/cacheflush.h
-+++ b/arch/mips/include/asm/cacheflush.h
-@@ -32,7 +32,7 @@
- extern void (*flush_cache_all)(void);
- extern void (*__flush_cache_all)(void);
- extern void (*flush_cache_mm)(struct mm_struct *mm);
--#define flush_cache_dup_mm(mm) do { (void) (mm); } while (0)
-+#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
- extern void (*flush_cache_range)(struct vm_area_struct *vma,
- unsigned long start, unsigned long end);
- extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn);
diff --git a/target/linux/brcm47xx/patches-3.14/310-no_highpage.patch b/target/linux/brcm47xx/patches-3.14/310-no_highpage.patch
deleted file mode 100644
index 57b0bb865f..0000000000
--- a/target/linux/brcm47xx/patches-3.14/310-no_highpage.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- a/arch/mips/include/asm/page.h
-+++ b/arch/mips/include/asm/page.h
-@@ -71,6 +71,7 @@ static inline unsigned int page_size_ftl
- #endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */
-
- #include <linux/pfn.h>
-+#include <asm/cpu-features.h>
-
- extern void build_clear_page(void);
- extern void build_copy_page(void);
-@@ -105,13 +106,16 @@ static inline void clear_user_page(void
- flush_data_cache_page((unsigned long)addr);
- }
-
--extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
-- struct page *to);
--struct vm_area_struct;
--extern void copy_user_highpage(struct page *to, struct page *from,
-- unsigned long vaddr, struct vm_area_struct *vma);
-+static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
-+ struct page *to)
-+{
-+ extern void (*flush_data_cache_page)(unsigned long addr);
-
--#define __HAVE_ARCH_COPY_USER_HIGHPAGE
-+ copy_page(vto, vfrom);
-+ if (!cpu_has_ic_fills_f_dc ||
-+ pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
-+ flush_data_cache_page((unsigned long)vto);
-+}
-
- /*
- * These are used to make use of C type-checking..
---- a/arch/mips/mm/init.c
-+++ b/arch/mips/mm/init.c
-@@ -194,30 +194,6 @@ void kunmap_coherent(void)
- pagefault_enable();
- }
-
--void copy_user_highpage(struct page *to, struct page *from,
-- unsigned long vaddr, struct vm_area_struct *vma)
--{
-- void *vfrom, *vto;
--
-- vto = kmap_atomic(to);
-- if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
-- page_mapped(from) && !Page_dcache_dirty(from)) {
-- vfrom = kmap_coherent(from, vaddr);
-- copy_page(vto, vfrom);
-- kunmap_coherent();
-- } else {
-- vfrom = kmap_atomic(from);
-- copy_page(vto, vfrom);
-- kunmap_atomic(vfrom);
-- }
-- if ((!cpu_has_ic_fills_f_dc) ||
-- pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
-- flush_data_cache_page((unsigned long)vto);
-- kunmap_atomic(vto);
-- /* Make sure this page is cleared on other CPU's too before using it */
-- smp_wmb();
--}
--
- void copy_to_user_page(struct vm_area_struct *vma,
- struct page *page, unsigned long vaddr, void *dst, const void *src,
- unsigned long len)
diff --git a/target/linux/brcm47xx/patches-3.14/320-MIPS-BCM47XX-Devices-database-update-for-3.x.patch b/target/linux/brcm47xx/patches-3.14/320-MIPS-BCM47XX-Devices-database-update-for-3.x.patch
deleted file mode 100644
index fc7569becc..0000000000
--- a/target/linux/brcm47xx/patches-3.14/320-MIPS-BCM47XX-Devices-database-update-for-3.x.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From be64eb65a1b24ea9528b0fcdd652ee2068da6106 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Thu, 20 Nov 2014 20:56:27 +0100
-Subject: [PATCH] MIPS: BCM47XX: Devices database update for 3.x
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
----
- arch/mips/bcm47xx/board.c | 1 +
- arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
- 2 files changed, 2 insertions(+)
-
---- a/arch/mips/bcm47xx/board.c
-+++ b/arch/mips/bcm47xx/board.c
-@@ -165,9 +165,11 @@ static const
- struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
- {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
-+ {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
-+ {{BCM47XX_BOARD_NETGEAR_WNDR3400_V3, "Netgear WNDR3400 V3"}, "U12H208T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNDR3400VCNA, "Netgear WNDR3400 Vcna"}, "U12H155T01_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNDR3700V3, "Netgear WNDR3700 V3"}, "U12H194T00_NETGEAR"},
- {{BCM47XX_BOARD_NETGEAR_WNDR4000, "Netgear WNDR4000"}, "U12H181T00_NETGEAR"},
---- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-@@ -86,9 +86,11 @@ enum bcm47xx_board {
-
- BCM47XX_BOARD_NETGEAR_WGR614V8,
- BCM47XX_BOARD_NETGEAR_WGR614V9,
-+ BCM47XX_BOARD_NETGEAR_WGR614_V10,
- BCM47XX_BOARD_NETGEAR_WNDR3300,
- BCM47XX_BOARD_NETGEAR_WNDR3400V1,
- BCM47XX_BOARD_NETGEAR_WNDR3400V2,
-+ BCM47XX_BOARD_NETGEAR_WNDR3400_V3,
- BCM47XX_BOARD_NETGEAR_WNDR3400VCNA,
- BCM47XX_BOARD_NETGEAR_WNDR3700V3,
- BCM47XX_BOARD_NETGEAR_WNDR4000,
---- a/arch/mips/bcm47xx/buttons.c
-+++ b/arch/mips/bcm47xx/buttons.c
-@@ -327,6 +327,12 @@ bcm47xx_buttons_netgear_wndr3400v1[] __i
- };
-
- static const struct gpio_keys_button
-+bcm47xx_buttons_netgear_wndr3400_v3[] __initconst = {
-+ BCM47XX_GPIO_KEY(12, KEY_RESTART),
-+ BCM47XX_GPIO_KEY(23, KEY_WPS_BUTTON),
-+};
-+
-+static const struct gpio_keys_button
- bcm47xx_buttons_netgear_wndr3700v3[] __initconst = {
- BCM47XX_GPIO_KEY(2, KEY_RFKILL),
- BCM47XX_GPIO_KEY(3, KEY_RESTART),
-@@ -557,6 +563,9 @@ int __init bcm47xx_buttons_register(void
- case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
- break;
-+ case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
-+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400_v3);
-+ break;
- case BCM47XX_BOARD_NETGEAR_WNDR3700V3:
- err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3700v3);
- break;
diff --git a/target/linux/brcm47xx/patches-3.14/610-pci_ide_fix.patch b/target/linux/brcm47xx/patches-3.14/610-pci_ide_fix.patch
deleted file mode 100644
index 76751e8c3b..0000000000
--- a/target/linux/brcm47xx/patches-3.14/610-pci_ide_fix.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/include/linux/ide.h
-+++ b/include/linux/ide.h
-@@ -191,7 +191,11 @@ static inline void ide_std_init_ports(st
- hw->io_ports.ctl_addr = ctl_addr;
- }
-
-+#if defined CONFIG_BCM47XX
-+# define MAX_HWIFS 2
-+#else
- #define MAX_HWIFS 10
-+#endif
-
- /*
- * Now for the data we need to maintain per-drive: ide_drive_t
diff --git a/target/linux/brcm47xx/patches-3.14/791-tg3-no-pci-sleep.patch b/target/linux/brcm47xx/patches-3.14/791-tg3-no-pci-sleep.patch
deleted file mode 100644
index cb46f46ca3..0000000000
--- a/target/linux/brcm47xx/patches-3.14/791-tg3-no-pci-sleep.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-When the Ethernet controller is powered down and someone wants to
-access the mdio bus like the witch driver (b53) the system crashed if
-PCI_D3hot was set before. This patch deactivates this power sawing mode
-when a switch driver is in use.
-
---- a/drivers/net/ethernet/broadcom/tg3.c
-+++ b/drivers/net/ethernet/broadcom/tg3.c
-@@ -4269,7 +4269,8 @@ static int tg3_power_down_prepare(struct
- static void tg3_power_down(struct tg3 *tp)
- {
- pci_wake_from_d3(tp->pdev, tg3_flag(tp, WOL_ENABLE));
-- pci_set_power_state(tp->pdev, PCI_D3hot);
-+ if (!tg3_flag(tp, ROBOSWITCH))
-+ pci_set_power_state(tp->pdev, PCI_D3hot);
- }
-
- static void tg3_aux_stat_to_speed_duplex(struct tg3 *tp, u32 val, u16 *speed, u8 *duplex)
diff --git a/target/linux/brcm47xx/patches-3.14/800-bcma-add-table-of-serial-flashes-with-smaller-blocks.patch b/target/linux/brcm47xx/patches-3.14/800-bcma-add-table-of-serial-flashes-with-smaller-blocks.patch
deleted file mode 100644
index 79bd878d76..0000000000
--- a/target/linux/brcm47xx/patches-3.14/800-bcma-add-table-of-serial-flashes-with-smaller-blocks.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 597715c61ae75a05ab3310a34ff3857a006f0f63 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Thu, 20 Nov 2014 21:32:42 +0100
-Subject: [PATCH] bcma: add table of serial flashes with smaller blocks
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
----
- drivers/bcma/driver_chipcommon_sflash.c | 29 +++++++++++++++++++++++++++++
- 1 file changed, 29 insertions(+)
-
---- a/drivers/bcma/driver_chipcommon_sflash.c
-+++ b/drivers/bcma/driver_chipcommon_sflash.c
-@@ -9,6 +9,7 @@
-
- #include <linux/platform_device.h>
- #include <linux/bcma/bcma.h>
-+#include <bcm47xx_board.h>
-
- static struct resource bcma_sflash_resource = {
- .name = "bcma_sflash",
-@@ -41,6 +42,13 @@ static const struct bcma_sflash_tbl_e bc
- { NULL },
- };
-
-+/* Some devices use smaller blocks (and have more of them) */
-+static const struct bcma_sflash_tbl_e bcma_sflash_st_shrink_tbl[] = {
-+ { "M25P16", 0x14, 0x1000, 512, },
-+ { "M25P32", 0x15, 0x1000, 1024, },
-+ { NULL },
-+};
-+
- static const struct bcma_sflash_tbl_e bcma_sflash_sst_tbl[] = {
- { "SST25WF512", 1, 0x1000, 16, },
- { "SST25VF512", 0x48, 0x1000, 16, },
-@@ -84,6 +92,23 @@ static void bcma_sflash_cmd(struct bcma_
- bcma_err(cc->core->bus, "SFLASH control command failed (timeout)!\n");
- }
-
-+const struct bcma_sflash_tbl_e *bcma_sflash_shrink_flash(u32 id)
-+{
-+ enum bcm47xx_board board = bcm47xx_board_get();
-+ const struct bcma_sflash_tbl_e *e;
-+
-+ switch (board) {
-+ case BCM47XX_BOARD_NETGEAR_WGR614_V10:
-+ for (e = bcma_sflash_st_shrink_tbl; e->name; e++) {
-+ if (e->id == id)
-+ return e;
-+ }
-+ return NULL;
-+ default:
-+ return NULL;
-+ }
-+}
-+
- /* Initialize serial flash access */
- int bcma_sflash_init(struct bcma_drv_cc *cc)
- {
-@@ -114,6 +139,10 @@ int bcma_sflash_init(struct bcma_drv_cc
- case 0x13:
- return -ENOTSUPP;
- default:
-+ e = bcma_sflash_shrink_flash(id);
-+ if (e)
-+ break;
-+
- for (e = bcma_sflash_st_tbl; e->name; e++) {
- if (e->id == id)
- break;
diff --git a/target/linux/brcm47xx/patches-3.14/820-wgt634u-nvram-fix.patch b/target/linux/brcm47xx/patches-3.14/820-wgt634u-nvram-fix.patch
deleted file mode 100644
index ea002fe732..0000000000
--- a/target/linux/brcm47xx/patches-3.14/820-wgt634u-nvram-fix.patch
+++ /dev/null
@@ -1,296 +0,0 @@
-The Netgear wgt634u uses a different format for storing the
-configuration. This patch is needed to read out the correct
-configuration. The cfe_env.c file uses a different method way to read
-out the configuration than the in kernel cfe config reader.
-
---- a/arch/mips/bcm47xx/Makefile
-+++ b/arch/mips/bcm47xx/Makefile
-@@ -5,3 +5,4 @@
-
- obj-y += irq.o nvram.o prom.o serial.o setup.o time.o sprom.o
- obj-y += board.o buttons.o leds.o workarounds.o
-+obj-y += cfe_env.o
---- /dev/null
-+++ b/arch/mips/bcm47xx/cfe_env.c
-@@ -0,0 +1,229 @@
-+/*
-+ * CFE environment variable access
-+ *
-+ * Copyright 2001-2003, Broadcom Corporation
-+ * Copyright 2006, Felix Fietkau <nbd@openwrt.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License as published by the
-+ * Free Software Foundation; either version 2 of the License, or (at your
-+ * option) any later version.
-+ */
-+
-+#include <linux/init.h>
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/string.h>
-+#include <asm/io.h>
-+#include <asm/uaccess.h>
-+
-+#define NVRAM_SIZE (0x1ff0)
-+static char _nvdata[NVRAM_SIZE];
-+static char _valuestr[256];
-+
-+/*
-+ * TLV types. These codes are used in the "type-length-value"
-+ * encoding of the items stored in the NVRAM device (flash or EEPROM)
-+ *
-+ * The layout of the flash/nvram is as follows:
-+ *
-+ * <type> <length> <data ...> <type> <length> <data ...> <type_end>
-+ *
-+ * The type code of "ENV_TLV_TYPE_END" marks the end of the list.
-+ * The "length" field marks the length of the data section, not
-+ * including the type and length fields.
-+ *
-+ * Environment variables are stored as follows:
-+ *
-+ * <type_env> <length> <flags> <name> = <value>
-+ *
-+ * If bit 0 (low bit) is set, the length is an 8-bit value.
-+ * If bit 0 (low bit) is clear, the length is a 16-bit value
-+ *
-+ * Bit 7 set indicates "user" TLVs. In this case, bit 0 still
-+ * indicates the size of the length field.
-+ *
-+ * Flags are from the constants below:
-+ *
-+ */
-+#define ENV_LENGTH_16BITS 0x00 /* for low bit */
-+#define ENV_LENGTH_8BITS 0x01
-+
-+#define ENV_TYPE_USER 0x80
-+
-+#define ENV_CODE_SYS(n,l) (((n)<<1)|(l))
-+#define ENV_CODE_USER(n,l) ((((n)<<1)|(l)) | ENV_TYPE_USER)
-+
-+/*
-+ * The actual TLV types we support
-+ */
-+
-+#define ENV_TLV_TYPE_END 0x00
-+#define ENV_TLV_TYPE_ENV ENV_CODE_SYS(0,ENV_LENGTH_8BITS)
-+
-+/*
-+ * Environment variable flags
-+ */
-+
-+#define ENV_FLG_NORMAL 0x00 /* normal read/write */
-+#define ENV_FLG_BUILTIN 0x01 /* builtin - not stored in flash */
-+#define ENV_FLG_READONLY 0x02 /* read-only - cannot be changed */
-+
-+#define ENV_FLG_MASK 0xFF /* mask of attributes we keep */
-+#define ENV_FLG_ADMIN 0x100 /* lets us internally override permissions */
-+
-+
-+/* *********************************************************************
-+ * _nvram_read(buffer,offset,length)
-+ *
-+ * Read data from the NVRAM device
-+ *
-+ * Input parameters:
-+ * buffer - destination buffer
-+ * offset - offset of data to read
-+ * length - number of bytes to read
-+ *
-+ * Return value:
-+ * number of bytes read, or <0 if error occured
-+ ********************************************************************* */
-+static int
-+_nvram_read(unsigned char *nv_buf, unsigned char *buffer, int offset, int length)
-+{
-+ int i;
-+ if (offset > NVRAM_SIZE)
-+ return -1;
-+
-+ for ( i = 0; i < length; i++) {
-+ buffer[i] = ((volatile unsigned char*)nv_buf)[offset + i];
-+ }
-+ return length;
-+}
-+
-+
-+static char*
-+_strnchr(const char *dest,int c,size_t cnt)
-+{
-+ while (*dest && (cnt > 0)) {
-+ if (*dest == c) return (char *) dest;
-+ dest++;
-+ cnt--;
-+ }
-+ return NULL;
-+}
-+
-+
-+
-+/*
-+ * Core support API: Externally visible.
-+ */
-+
-+/*
-+ * Get the value of an NVRAM variable
-+ * @param name name of variable to get
-+ * @return value of variable or NULL if undefined
-+ */
-+
-+char*
-+cfe_env_get(unsigned char *nv_buf, char* name)
-+{
-+ int size;
-+ unsigned char *buffer;
-+ unsigned char *ptr;
-+ unsigned char *envval;
-+ unsigned int reclen;
-+ unsigned int rectype;
-+ int offset;
-+ int flg;
-+
-+ if (!strcmp(name, "nvram_type"))
-+ return "cfe";
-+
-+ size = NVRAM_SIZE;
-+ buffer = &_nvdata[0];
-+
-+ ptr = buffer;
-+ offset = 0;
-+
-+ /* Read the record type and length */
-+ if (_nvram_read(nv_buf, ptr,offset,1) != 1) {
-+ goto error;
-+ }
-+
-+ while ((*ptr != ENV_TLV_TYPE_END) && (size > 1)) {
-+
-+ /* Adjust pointer for TLV type */
-+ rectype = *(ptr);
-+ offset++;
-+ size--;
-+
-+ /*
-+ * Read the length. It can be either 1 or 2 bytes
-+ * depending on the code
-+ */
-+ if (rectype & ENV_LENGTH_8BITS) {
-+ /* Read the record type and length - 8 bits */
-+ if (_nvram_read(nv_buf, ptr,offset,1) != 1) {
-+ goto error;
-+ }
-+ reclen = *(ptr);
-+ size--;
-+ offset++;
-+ }
-+ else {
-+ /* Read the record type and length - 16 bits, MSB first */
-+ if (_nvram_read(nv_buf, ptr,offset,2) != 2) {
-+ goto error;
-+ }
-+ reclen = (((unsigned int) *(ptr)) << 8) + (unsigned int) *(ptr+1);
-+ size -= 2;
-+ offset += 2;
-+ }
-+
-+ if (reclen > size)
-+ break; /* should not happen, bad NVRAM */
-+
-+ switch (rectype) {
-+ case ENV_TLV_TYPE_ENV:
-+ /* Read the TLV data */
-+ if (_nvram_read(nv_buf, ptr,offset,reclen) != reclen)
-+ goto error;
-+ flg = *ptr++;
-+ envval = (unsigned char *) _strnchr(ptr,'=',(reclen-1));
-+ if (envval) {
-+ *envval++ = '\0';
-+ memcpy(_valuestr,envval,(reclen-1)-(envval-ptr));
-+ _valuestr[(reclen-1)-(envval-ptr)] = '\0';
-+#if 0
-+ printk(KERN_INFO "NVRAM:%s=%s\n", ptr, _valuestr);
-+#endif
-+ if(!strcmp(ptr, name)){
-+ return _valuestr;
-+ }
-+ if((strlen(ptr) > 1) && !strcmp(&ptr[1], name))
-+ return _valuestr;
-+ }
-+ break;
-+
-+ default:
-+ /* Unknown TLV type, skip it. */
-+ break;
-+ }
-+
-+ /*
-+ * Advance to next TLV
-+ */
-+
-+ size -= (int)reclen;
-+ offset += reclen;
-+
-+ /* Read the next record type */
-+ ptr = buffer;
-+ if (_nvram_read(nv_buf, ptr,offset,1) != 1)
-+ goto error;
-+ }
-+
-+error:
-+ return NULL;
-+
-+}
-+
---- a/arch/mips/bcm47xx/nvram.c
-+++ b/arch/mips/bcm47xx/nvram.c
-@@ -22,6 +22,8 @@
-
- static char nvram_buf[NVRAM_SPACE];
- static const u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000};
-+static int cfe_env;
-+extern char *cfe_env_get(char *nv_buf, const char *name);
-
- static u32 find_nvram_size(void __iomem *end)
- {
-@@ -51,6 +53,26 @@ static int nvram_find_and_copy(void __io
- return -EEXIST;
- }
-
-+ cfe_env = 0;
-+
-+ /* XXX: hack for supporting the CFE environment stuff on WGT634U */
-+ if (lim >= 8 * 1024 * 1024) {
-+ src = (u32 *) iobase + 8 * 1024 * 1024 - 0x2000;
-+ dst = (u32 *) nvram_buf;
-+
-+ if ((*src & 0xff00ff) == 0x000001) {
-+ printk("early_nvram_init: WGT634U NVRAM found.\n");
-+
-+ for (i = 0; i < 0x1ff0; i++) {
-+ if (*src == 0xFFFFFFFF)
-+ break;
-+ *dst++ = *src++;
-+ }
-+ cfe_env = 1;
-+ return 0;
-+ }
-+ }
-+
- /* TODO: when nvram is on nand flash check for bad blocks first. */
- off = FLASH_MIN;
- while (off <= lim) {
-@@ -142,6 +164,13 @@ int bcm47xx_nvram_getenv(char *name, cha
- return err;
- }
-
-+ if (cfe_env) {
-+ value = cfe_env_get(nvram_buf, name);
-+ if (!value)
-+ return -ENOENT;
-+ return snprintf(val, val_len, "%s", value);
-+ }
-+
- /* Look for name=value and return value */
- var = &nvram_buf[sizeof(struct nvram_header)];
- end = nvram_buf + sizeof(nvram_buf) - 2;
diff --git a/target/linux/brcm47xx/patches-3.14/830-huawei_e970_support.patch b/target/linux/brcm47xx/patches-3.14/830-huawei_e970_support.patch
deleted file mode 100644
index bab051a647..0000000000
--- a/target/linux/brcm47xx/patches-3.14/830-huawei_e970_support.patch
+++ /dev/null
@@ -1,101 +0,0 @@
---- a/arch/mips/bcm47xx/setup.c
-+++ b/arch/mips/bcm47xx/setup.c
-@@ -36,6 +36,7 @@
- #include <linux/ssb/ssb.h>
- #include <linux/ssb/ssb_embedded.h>
- #include <linux/bcma/bcma_soc.h>
-+#include <linux/old_gpio_wdt.h>
- #include <asm/bootinfo.h>
- #include <asm/idle.h>
- #include <asm/prom.h>
-@@ -249,6 +250,33 @@ static struct fixed_phy_status bcm47xx_f
- .duplex = DUPLEX_FULL,
- };
-
-+static struct gpio_wdt_platform_data gpio_wdt_data;
-+
-+static struct platform_device gpio_wdt_device = {
-+ .name = "gpio-wdt",
-+ .id = 0,
-+ .dev = {
-+ .platform_data = &gpio_wdt_data,
-+ },
-+};
-+
-+static int __init bcm47xx_register_gpio_watchdog(void)
-+{
-+ enum bcm47xx_board board = bcm47xx_board_get();
-+
-+ switch (board) {
-+ case BCM47XX_BOARD_HUAWEI_E970:
-+ pr_info("bcm47xx: detected Huawei E970 or similar, starting early gpio_wdt timer\n");
-+ gpio_wdt_data.gpio = 7;
-+ gpio_wdt_data.interval = HZ;
-+ gpio_wdt_data.first_interval = HZ / 5;
-+ return platform_device_register(&gpio_wdt_device);
-+ default:
-+ /* Nothing to do */
-+ return 0;
-+ }
-+}
-+
- static int __init bcm47xx_register_bus_complete(void)
- {
- switch (bcm47xx_bus_type) {
-@@ -268,6 +296,7 @@ static int __init bcm47xx_register_bus_c
- bcm47xx_workarounds();
-
- fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status);
-+ bcm47xx_register_gpio_watchdog();
- return 0;
- }
- device_initcall(bcm47xx_register_bus_complete);
---- a/arch/mips/configs/bcm47xx_defconfig
-+++ b/arch/mips/configs/bcm47xx_defconfig
-@@ -67,6 +67,7 @@ CONFIG_HW_RANDOM=y
- CONFIG_GPIO_SYSFS=y
- CONFIG_WATCHDOG=y
- CONFIG_BCM47XX_WDT=y
-+CONFIG_GPIO_WDT=y
- CONFIG_SSB_DEBUG=y
- CONFIG_SSB_DRIVER_GIGE=y
- CONFIG_BCMA_DRIVER_GMAC_CMN=y
---- a/drivers/ssb/embedded.c
-+++ b/drivers/ssb/embedded.c
-@@ -34,11 +34,36 @@ int ssb_watchdog_timer_set(struct ssb_bu
- }
- EXPORT_SYMBOL(ssb_watchdog_timer_set);
-
-+#ifdef CONFIG_BCM47XX
-+#include <bcm47xx_board.h>
-+
-+static bool ssb_watchdog_supported(void)
-+{
-+ enum bcm47xx_board board = bcm47xx_board_get();
-+
-+ /* The Huawei E970 has a hardware watchdog using a GPIO */
-+ switch (board) {
-+ case BCM47XX_BOARD_HUAWEI_E970:
-+ return false;
-+ default:
-+ return true;
-+ }
-+}
-+#else
-+static bool ssb_watchdog_supported(void)
-+{
-+ return true;
-+}
-+#endif
-+
- int ssb_watchdog_register(struct ssb_bus *bus)
- {
- struct bcm47xx_wdt wdt = {};
- struct platform_device *pdev;
-
-+ if (!ssb_watchdog_supported())
-+ return 0;
-+
- if (ssb_chipco_available(&bus->chipco)) {
- wdt.driver_data = &bus->chipco;
- wdt.timer_set = ssb_chipco_watchdog_timer_set_wdt;
diff --git a/target/linux/brcm47xx/patches-3.14/920-cache-wround.patch b/target/linux/brcm47xx/patches-3.14/920-cache-wround.patch
deleted file mode 100644
index 159363a53f..0000000000
--- a/target/linux/brcm47xx/patches-3.14/920-cache-wround.patch
+++ /dev/null
@@ -1,138 +0,0 @@
---- a/arch/mips/include/asm/r4kcache.h
-+++ b/arch/mips/include/asm/r4kcache.h
-@@ -21,10 +21,28 @@
- #ifdef CONFIG_BCM47XX
- #include <asm/paccess.h>
- #include <linux/ssb/ssb.h>
--#define BCM4710_DUMMY_RREG() ((void) *((u8 *) KSEG1ADDR(SSB_ENUM_BASE)))
-+#define BCM4710_DUMMY_RREG() bcm4710_dummy_rreg()
-+
-+static inline unsigned long bcm4710_dummy_rreg(void)
-+{
-+ return *(volatile unsigned long *)(KSEG1ADDR(SSB_ENUM_BASE));
-+}
-+
-+#define BCM4710_FILL_TLB(addr) bcm4710_fill_tlb((void *)(addr))
-+
-+static inline unsigned long bcm4710_fill_tlb(void *addr)
-+{
-+ return *(unsigned long *)addr;
-+}
-+
-+#define BCM4710_PROTECTED_FILL_TLB(addr) bcm4710_protected_fill_tlb((void *)(addr))
-+
-+static inline void bcm4710_protected_fill_tlb(void *addr)
-+{
-+ unsigned long x;
-+ get_dbe(x, (unsigned long *)addr);;
-+}
-
--#define BCM4710_FILL_TLB(addr) (*(volatile unsigned long *)(addr))
--#define BCM4710_PROTECTED_FILL_TLB(addr) ({ unsigned long x; get_dbe(x, (volatile unsigned long *)(addr)); })
- #else
- #define BCM4710_DUMMY_RREG()
-
---- a/arch/mips/mm/tlbex.c
-+++ b/arch/mips/mm/tlbex.c
-@@ -935,6 +935,9 @@ build_get_pgde32(u32 **p, unsigned int t
- uasm_i_srl(p, ptr, ptr, SMP_CPUID_PTRSHIFT);
- uasm_i_addu(p, ptr, tmp, ptr);
- #else
-+#ifdef CONFIG_BCM47XX
-+ uasm_i_nop(p);
-+#endif
- UASM_i_LA_mostly(p, ptr, pgdc);
- #endif
- uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */
-@@ -1280,12 +1283,12 @@ static void build_r4000_tlb_refill_handl
- /* No need for uasm_i_nop */
- }
-
--#ifdef CONFIG_BCM47XX
-- uasm_i_nop(&p);
--#endif
- #ifdef CONFIG_64BIT
- build_get_pmde64(&p, &l, &r, K0, K1); /* get pmd in K1 */
- #else
-+# ifdef CONFIG_BCM47XX
-+ uasm_i_nop(&p);
-+# endif
- build_get_pgde32(&p, K0, K1); /* get pgd in K1 */
- #endif
-
-@@ -1297,6 +1300,9 @@ static void build_r4000_tlb_refill_handl
- build_update_entries(&p, K0, K1);
- build_tlb_write_entry(&p, &l, &r, tlb_random);
- uasm_l_leave(&l, p);
-+#ifdef CONFIG_BCM47XX
-+ uasm_i_nop(&p);
-+#endif
- uasm_i_eret(&p); /* return from trap */
- }
- #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
-@@ -1843,12 +1849,12 @@ build_r4000_tlbchange_handler_head(u32 *
- {
- struct work_registers wr = build_get_work_registers(p);
-
--#ifdef CONFIG_BCM47XX
-- uasm_i_nop(p);
--#endif
- #ifdef CONFIG_64BIT
- build_get_pmde64(p, l, r, wr.r1, wr.r2); /* get pmd in ptr */
- #else
-+# ifdef CONFIG_BCM47XX
-+ uasm_i_nop(p);
-+# endif
- build_get_pgde32(p, wr.r1, wr.r2); /* get pgd in ptr */
- #endif
-
-@@ -1887,6 +1893,9 @@ build_r4000_tlbchange_handler_tail(u32 *
- build_tlb_write_entry(p, l, r, tlb_indexed);
- uasm_l_leave(l, *p);
- build_restore_work_registers(p);
-+#ifdef CONFIG_BCM47XX
-+ uasm_i_nop(p);
-+#endif
- uasm_i_eret(p); /* return from trap */
-
- #ifdef CONFIG_64BIT
---- a/arch/mips/kernel/genex.S
-+++ b/arch/mips/kernel/genex.S
-@@ -21,6 +21,19 @@
- #include <asm/war.h>
- #include <asm/thread_info.h>
-
-+#ifdef CONFIG_BCM47XX
-+# ifdef eret
-+# undef eret
-+# endif
-+# define eret \
-+ .set push; \
-+ .set noreorder; \
-+ nop; \
-+ nop; \
-+ eret; \
-+ .set pop;
-+#endif
-+
- #ifdef CONFIG_MIPS_MT_SMTC
- #define PANIC_PIC(msg) \
- .set push; \
-@@ -48,7 +61,6 @@ NESTED(except_vec3_generic, 0, sp)
- .set noat
- #ifdef CONFIG_BCM47XX
- nop
-- nop
- #endif
- #if R5432_CP0_INTERRUPT_WAR
- mfc0 k0, CP0_INDEX
-@@ -73,6 +85,9 @@ NESTED(except_vec3_r4000, 0, sp)
- .set push
- .set mips3
- .set noat
-+#ifdef CONFIG_BCM47XX
-+ nop
-+#endif
- mfc0 k1, CP0_CAUSE
- li k0, 31<<2
- andi k1, k1, 0x7c
diff --git a/target/linux/brcm47xx/patches-3.14/940-bcm47xx-yenta.patch b/target/linux/brcm47xx/patches-3.14/940-bcm47xx-yenta.patch
deleted file mode 100644
index 1739ff78ab..0000000000
--- a/target/linux/brcm47xx/patches-3.14/940-bcm47xx-yenta.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- a/drivers/pcmcia/yenta_socket.c
-+++ b/drivers/pcmcia/yenta_socket.c
-@@ -920,6 +920,8 @@ static unsigned int yenta_probe_irq(stru
- * Probe for usable interrupts using the force
- * register to generate bogus card status events.
- */
-+#ifndef CONFIG_BCM47XX
-+ /* WRT54G3G does not like this */
- cb_writel(socket, CB_SOCKET_EVENT, -1);
- cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);
- reg = exca_readb(socket, I365_CSCINT);
-@@ -935,6 +937,7 @@ static unsigned int yenta_probe_irq(stru
- }
- cb_writel(socket, CB_SOCKET_MASK, 0);
- exca_writeb(socket, I365_CSCINT, reg);
-+#endif
-
- mask = probe_irq_mask(val) & 0xffff;
-
-@@ -1019,6 +1022,10 @@ static void yenta_get_socket_capabilitie
- else
- socket->socket.irq_mask = 0;
-
-+ /* irq mask probing is broken for the WRT54G3G */
-+ if (socket->socket.irq_mask == 0)
-+ socket->socket.irq_mask = 0x6f8;
-+
- dev_printk(KERN_INFO, &socket->dev->dev,
- "ISA IRQ mask 0x%04x, PCI irq %d\n",
- socket->socket.irq_mask, socket->cb_irq);
-@@ -1257,6 +1264,15 @@ static int yenta_probe(struct pci_dev *d
- dev_printk(KERN_INFO, &dev->dev,
- "Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE));
-
-+ /* Generate an interrupt on card insert/remove */
-+ config_writew(socket, CB_SOCKET_MASK, CB_CSTSMASK | CB_CDMASK);
-+
-+ /* Set up Multifunction Routing Status Register */
-+ config_writew(socket, 0x8C, 0x1000 /* MFUNC3 to GPIO3 */ | 0x2 /* MFUNC0 to INTA */);
-+
-+ /* Switch interrupts to parallelized */
-+ config_writeb(socket, 0x92, 0x64);
-+
- yenta_fixup_parent_bridge(dev->subordinate);
-
- /* Register it with the pcmcia layer.. */
diff --git a/target/linux/brcm47xx/patches-3.14/976-ssb_increase_pci_delay.patch b/target/linux/brcm47xx/patches-3.14/976-ssb_increase_pci_delay.patch
deleted file mode 100644
index b56f1d5be3..0000000000
--- a/target/linux/brcm47xx/patches-3.14/976-ssb_increase_pci_delay.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/drivers/ssb/driver_pcicore.c
-+++ b/drivers/ssb/driver_pcicore.c
-@@ -375,7 +375,7 @@ static void ssb_pcicore_init_hostmode(st
- set_io_port_base(ssb_pcicore_controller.io_map_base);
- /* Give some time to the PCI controller to configure itself with the new
- * values. Not waiting at this point causes crashes of the machine. */
-- mdelay(10);
-+ mdelay(300);
- register_pci_controller(&ssb_pcicore_controller);
- }
-
diff --git a/target/linux/brcm47xx/patches-3.14/980-wnr834b_no_cardbus_invariant.patch b/target/linux/brcm47xx/patches-3.14/980-wnr834b_no_cardbus_invariant.patch
deleted file mode 100644
index 86c00c93a3..0000000000
--- a/target/linux/brcm47xx/patches-3.14/980-wnr834b_no_cardbus_invariant.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/arch/mips/bcm47xx/setup.c
-+++ b/arch/mips/bcm47xx/setup.c
-@@ -119,6 +119,10 @@ static int bcm47xx_get_invariants(struct
- if (bcm47xx_nvram_getenv("cardbus", buf, sizeof(buf)) >= 0)
- iv->has_cardbus_slot = !!simple_strtoul(buf, NULL, 10);
-
-+ /* Do not indicate cardbus for Netgear WNR834B V1 and V2 */
-+ if (iv->boardinfo.type == 0x0472 && iv->has_cardbus_slot)
-+ iv->has_cardbus_slot = 0;
-+
- return 0;
- }
-
diff --git a/target/linux/brcm47xx/patches-3.14/999-wl_exports.patch b/target/linux/brcm47xx/patches-3.14/999-wl_exports.patch
deleted file mode 100644
index fbecb50a45..0000000000
--- a/target/linux/brcm47xx/patches-3.14/999-wl_exports.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/arch/mips/bcm47xx/nvram.c
-+++ b/arch/mips/bcm47xx/nvram.c
-@@ -20,7 +20,8 @@
- #include <bcm47xx_nvram.h>
- #include <asm/mach-bcm47xx/bcm47xx.h>
-
--static char nvram_buf[NVRAM_SPACE];
-+char nvram_buf[NVRAM_SPACE];
-+EXPORT_SYMBOL(nvram_buf);
- static const u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000};
- static int cfe_env;
- extern char *cfe_env_get(char *nv_buf, const char *name);
---- a/arch/mips/mm/cache.c
-+++ b/arch/mips/mm/cache.c
-@@ -58,6 +58,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 */
-