brcm47xx: 3.10: update MIPS patches with versions sent upstream

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 41910
This commit is contained in:
Hauke Mehrtens 2014-07-31 21:40:38 +00:00
parent 2b32939040
commit 3a82681e4f
9 changed files with 147 additions and 112 deletions

View File

@ -1,6 +1,6 @@
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -56,12 +56,12 @@ static void bcm47xx_machine_restart(char
@@ -55,12 +55,12 @@ static void bcm47xx_machine_restart(char
switch (bcm47xx_bus_type) {
#ifdef CONFIG_BCM47XX_SSB
case BCM47XX_BUS_TYPE_SSB:

View File

@ -1,14 +1,39 @@
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,7 @@
@@ -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 +632,33 @@ static void bcm47xx_fill_sprom_path_r45(
@@ -631,6 +633,33 @@ static void bcm47xx_fill_sprom_path_r45(
}
}
@ -42,7 +67,7 @@
static void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom,
const char *prefix, bool fallback)
{
@@ -648,6 +676,23 @@ static void bcm47xx_fill_sprom_ethernet(
@@ -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);
@ -54,9 +79,11 @@
+ 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) {
+ memcpy(sprom->il0mac, mac, ETH_ALEN);
+ mac_addr_used++;

View File

@ -1,11 +1,16 @@
From 35661c37bde151764e8526e77d4e02ca77e19160 Mon Sep 17 00:00:00 2001
From 250dc03727b9cce91bd86091f05bf2443e2be9ec Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Mon, 14 Jul 2014 23:32:10 +0200
Subject: [PATCH 5/5] MIPS: BCM47XX: add some more devices
Date: Tue, 29 Jul 2014 00:12:09 +0200
Subject: [PATCH] MIPS: BCM47XX: add Microsoft MN-700 and Asus WL500G
This adds 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 +++++++++++++++++++
@ -15,7 +20,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
--- a/arch/mips/bcm47xx/board.c
+++ b/arch/mips/bcm47xx/board.c
@@ -80,6 +80,14 @@ struct bcm47xx_board_type_list1 bcm47xx_
@@ -79,6 +79,14 @@ struct bcm47xx_board_type_list1 bcm47xx_
{ {0}, NULL},
};
@ -30,7 +35,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
/* productid */
static const
struct bcm47xx_board_type_list1 bcm47xx_board_list_productid[] __initconst = {
@@ -237,6 +245,15 @@ static __init const struct bcm47xx_board
@@ -236,6 +244,15 @@ static __init const struct bcm47xx_board
}
}
@ -55,7 +60,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+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),
@ -74,7 +79,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
/* Motorola */
static const struct gpio_keys_button
@@ -401,6 +413,9 @@ int __init bcm47xx_buttons_register(void
@@ -395,6 +407,9 @@ int __init bcm47xx_buttons_register(void
case BCM47XX_BOARD_ASUS_WL330GE:
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl330ge);
break;
@ -84,7 +89,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
case BCM47XX_BOARD_ASUS_WL500GD:
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500gd);
break;
@@ -525,6 +540,10 @@ int __init bcm47xx_buttons_register(void
@@ -517,6 +532,10 @@ int __init bcm47xx_buttons_register(void
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs);
break;
@ -97,7 +102,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
break;
--- a/arch/mips/bcm47xx/leds.c
+++ b/arch/mips/bcm47xx/leds.c
@@ -73,6 +73,11 @@ bcm47xx_leds_asus_wl330ge[] __initconst
@@ -64,6 +64,11 @@ bcm47xx_leds_asus_wl330ge[] __initconst
};
static const struct gpio_led
@ -109,8 +114,8 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
bcm47xx_leds_asus_wl500gd[] __initconst = {
BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
};
@@ -358,6 +363,13 @@ bcm47xx_leds_linksys_wrtsl54gs[] __initc
BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
@@ -332,6 +337,13 @@ bcm47xx_leds_linksys_wrtsl54gs[] __initc
BCM47XX_GPIO_LED(7, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
};
+/* Microsoft */
@ -123,7 +128,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
/* Motorola */
static const struct gpio_led
@@ -470,6 +482,9 @@ void __init bcm47xx_leds_register(void)
@@ -432,6 +444,9 @@ void __init bcm47xx_leds_register(void)
case BCM47XX_BOARD_ASUS_WL330GE:
bcm47xx_set_pdata(bcm47xx_leds_asus_wl330ge);
break;
@ -133,7 +138,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
case BCM47XX_BOARD_ASUS_WL500GD:
bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gd);
break;
@@ -598,6 +613,10 @@ void __init bcm47xx_leds_register(void)
@@ -554,6 +569,10 @@ void __init bcm47xx_leds_register(void)
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs);
break;
@ -154,7 +159,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
BCM47XX_BOARD_ASUS_WL500GD,
BCM47XX_BOARD_ASUS_WL500GPV1,
BCM47XX_BOARD_ASUS_WL500GPV2,
@@ -77,6 +78,8 @@ enum bcm47xx_board {
@@ -75,6 +76,8 @@ enum bcm47xx_board {
BCM47XX_BOARD_LINKSYS_WRT610NV2,
BCM47XX_BOARD_LINKSYS_WRTSL54GS,

View File

@ -1,22 +0,0 @@
From 3d0704e7d371ea3ea5c8fe5bd796f5f15d44da59 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sat, 12 Jul 2014 18:01:32 +0200
Subject: [PATCH 3/5] MIPS: BCM47XX: fix detection of Asus RT-N10D
Sometimes we do not have a productid, but only a hardware_version.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
arch/mips/bcm47xx/board.c | 1 +
1 file changed, 1 insertion(+)
--- a/arch/mips/bcm47xx/board.c
+++ b/arch/mips/bcm47xx/board.c
@@ -57,6 +57,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"},

View File

@ -1,8 +1,7 @@
From 9fff5375229a4ba3a200747e079c46fa19b90797 Mon Sep 17 00:00:00 2001
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:26:20 +0200
Subject: [3.17][PATCH 1/2] MIPS: BCM47XX: Distinguish WRT54G series devices by
boardtype
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
@ -12,6 +11,10 @@ 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 ++++++----
@ -21,7 +24,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
--- a/arch/mips/bcm47xx/board.c
+++ b/arch/mips/bcm47xx/board.c
@@ -179,9 +179,9 @@ struct bcm47xx_board_type_list3 bcm47xx_
@@ -187,9 +187,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"},
@ -36,7 +39,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
--- a/arch/mips/bcm47xx/buttons.c
+++ b/arch/mips/bcm47xx/buttons.c
@@ -265,7 +265,7 @@ bcm47xx_buttons_linksys_wrt54g3gv2[] __i
@@ -270,7 +270,7 @@ bcm47xx_buttons_linksys_wrt54g3gv2[] __i
};
static const struct gpio_keys_button
@ -45,7 +48,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
BCM47XX_GPIO_KEY(6, KEY_RESTART),
};
@@ -501,12 +501,14 @@ int __init bcm47xx_buttons_register(void
@@ -516,12 +516,14 @@ int __init bcm47xx_buttons_register(void
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
break;
@ -65,7 +68,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
break;
--- a/arch/mips/bcm47xx/leds.c
+++ b/arch/mips/bcm47xx/leds.c
@@ -292,7 +292,7 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc
@@ -297,7 +297,7 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc
};
static const struct gpio_led
@ -74,7 +77,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
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),
@@ -538,12 +538,14 @@ void __init bcm47xx_leds_register(void)
@@ -553,12 +553,14 @@ void __init bcm47xx_leds_register(void)
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
break;
@ -94,7 +97,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
break;
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
@@ -70,7 +70,9 @@ enum bcm47xx_board {
@@ -71,7 +71,9 @@ enum bcm47xx_board {
BCM47XX_BOARD_LINKSYS_WRT310NV1,
BCM47XX_BOARD_LINKSYS_WRT310NV2,
BCM47XX_BOARD_LINKSYS_WRT54G3GV2,

View File

@ -1,23 +0,0 @@
From 9ccf31da4cac8fdb58d3d47f21b9fc7d2857026d Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Mon, 14 Jul 2014 23:15:32 +0200
Subject: [PATCH 4/5] MIPS: BCM47XX: fix name of Dell TrueMobile 2300
This looks like a copy and paste error in the initial version.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
arch/mips/bcm47xx/board.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/mips/bcm47xx/board.c
+++ b/arch/mips/bcm47xx/board.c
@@ -98,7 +98,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"},

View File

@ -1,20 +1,25 @@
From d12264ddf6c29ddab9889cd87a1e60d2209f9922 Mon Sep 17 00:00:00 2001
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:53:14 +0200
Subject: [3.17][PATCH 2/2] MIPS: BCM47XX: Fix LEDs on WRT54GS V1.0
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
@@ -306,6 +306,14 @@ bcm47xx_leds_linksys_wrt54g3gv2[] __init
@@ -311,6 +311,14 @@ bcm47xx_leds_linksys_wrt54g3gv2[] __init
BCM47XX_GPIO_LED(3, "blue", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
};
@ -29,7 +34,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
static const struct gpio_led
bcm47xx_leds_linksys_wrt610nv1[] __initconst = {
BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
@@ -542,6 +550,8 @@ void __init bcm47xx_leds_register(void)
@@ -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:

View File

@ -1,3 +1,68 @@
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
@@ -57,6 +57,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"},
@@ -105,7 +106,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 =
@ -27,7 +92,7 @@
};
static const struct gpio_led
@@ -216,8 +225,8 @@ bcm47xx_leds_linksys_e1000v1[] __initcon
@@ -221,8 +230,8 @@ bcm47xx_leds_linksys_e1000v1[] __initcon
static const struct gpio_led
bcm47xx_leds_linksys_e1000v21[] __initconst = {
@ -38,7 +103,7 @@
BCM47XX_GPIO_LED(7, "amber", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
BCM47XX_GPIO_LED(8, "blue", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
};
@@ -314,6 +323,16 @@ bcm47xx_leds_linksys_wrt54g_type_0101[]
@@ -319,6 +328,16 @@ bcm47xx_leds_linksys_wrt54g_type_0101[]
BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
};
@ -55,7 +120,7 @@
static const struct gpio_led
bcm47xx_leds_linksys_wrt610nv1[] __initconst = {
BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
@@ -333,11 +352,10 @@ bcm47xx_leds_linksys_wrt610nv2[] __initc
@@ -338,11 +357,10 @@ bcm47xx_leds_linksys_wrt610nv2[] __initc
static const struct gpio_led
bcm47xx_leds_linksys_wrtsl54gs[] __initconst = {
@ -70,8 +135,8 @@
+ BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
};
/* Motorola */
@@ -385,6 +403,15 @@ bcm47xx_leds_netgear_wndr4500v1[] __init
/* Microsoft */
@@ -397,6 +415,15 @@ bcm47xx_leds_netgear_wndr4500v1[] __init
};
static const struct gpio_led
@ -87,7 +152,7 @@
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),
@@ -425,6 +452,9 @@ void __init bcm47xx_leds_register(void)
@@ -437,6 +464,9 @@ void __init bcm47xx_leds_register(void)
case BCM47XX_BOARD_ASUS_RTN12:
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
break;
@ -97,7 +162,7 @@
case BCM47XX_BOARD_ASUS_RTN16:
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16);
break;
@@ -553,6 +583,8 @@ void __init bcm47xx_leds_register(void)
@@ -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:
@ -106,7 +171,7 @@
case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708:
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_generic);
break;
@@ -582,6 +614,9 @@ void __init bcm47xx_leds_register(void)
@@ -601,6 +633,9 @@ void __init bcm47xx_leds_register(void)
case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1);
break;
@ -116,28 +181,3 @@
case BCM47XX_BOARD_NETGEAR_WNR834BV2:
bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
break;
--- a/arch/mips/bcm47xx/buttons.c
+++ b/arch/mips/bcm47xx/buttons.c
@@ -329,6 +329,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),
};
@@ -538,6 +544,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;