[OpenWrt-Devel] [PATCH 1/2] brcm47xx: backport BCM47XX Linksys WRT54G series patches

Rafał Miłecki zajec5 at gmail.com
Sat Jun 21 07:34:45 EDT 2014


Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
---
 ...-BCM47XX-Devices-database-update-for-3.16.patch |  13 ---
 ...X-Distinguish-WRT54G-series-devices-by-bo.patch | 118 +++++++++++++++++++++
 ...145-MIPS-BCM47XX-Fix-LEDs-on-WRT54GS-V1.0.patch |  45 ++++++++
 ...-BCM47XX-Devices-database-update-for-3.17.patch |  13 +++
 ...-BCM47XX-Devices-database-update-for-3.16.patch |  13 ---
 ...X-Distinguish-WRT54G-series-devices-by-bo.patch | 118 +++++++++++++++++++++
 ...145-MIPS-BCM47XX-Fix-LEDs-on-WRT54GS-V1.0.patch |  45 ++++++++
 ...-BCM47XX-Devices-database-update-for-3.17.patch |  13 +++
 8 files changed, 352 insertions(+), 26 deletions(-)
 delete mode 100644 target/linux/brcm47xx/patches-3.10/144-MIPS-BCM47XX-Devices-database-update-for-3.16.patch
 create mode 100644 target/linux/brcm47xx/patches-3.10/144-MIPS-BCM47XX-Distinguish-WRT54G-series-devices-by-bo.patch
 create mode 100644 target/linux/brcm47xx/patches-3.10/145-MIPS-BCM47XX-Fix-LEDs-on-WRT54GS-V1.0.patch
 create mode 100644 target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
 delete mode 100644 target/linux/brcm47xx/patches-3.14/144-MIPS-BCM47XX-Devices-database-update-for-3.16.patch
 create mode 100644 target/linux/brcm47xx/patches-3.14/144-MIPS-BCM47XX-Distinguish-WRT54G-series-devices-by-bo.patch
 create mode 100644 target/linux/brcm47xx/patches-3.14/145-MIPS-BCM47XX-Fix-LEDs-on-WRT54GS-V1.0.patch
 create mode 100644 target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch

diff --git a/target/linux/brcm47xx/patches-3.10/144-MIPS-BCM47XX-Devices-database-update-for-3.16.patch b/target/linux/brcm47xx/patches-3.10/144-MIPS-BCM47XX-Devices-database-update-for-3.16.patch
deleted file mode 100644
index 8612856..0000000
--- a/target/linux/brcm47xx/patches-3.10/144-MIPS-BCM47XX-Devices-database-update-for-3.16.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/arch/mips/bcm47xx/leds.c
-+++ b/arch/mips/bcm47xx/leds.c
-@@ -216,8 +216,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),
- };
diff --git a/target/linux/brcm47xx/patches-3.10/144-MIPS-BCM47XX-Distinguish-WRT54G-series-devices-by-bo.patch b/target/linux/brcm47xx/patches-3.10/144-MIPS-BCM47XX-Distinguish-WRT54G-series-devices-by-bo.patch
new file mode 100644
index 0000000..2874d74
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.10/144-MIPS-BCM47XX-Distinguish-WRT54G-series-devices-by-bo.patch
@@ -0,0 +1,118 @@
+From 9fff5375229a4ba3a200747e079c46fa19b90797 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5 at 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
+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 at vv.carleton.ca>
+Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
+---
+ 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(-)
+
+diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c
+index 44ab1be..63359f4 100644
+--- a/arch/mips/bcm47xx/board.c
++++ b/arch/mips/bcm47xx/board.c
+@@ -180,9 +180,9 @@ struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = {
+ 	{{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},
+ };
+ 
+diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c
+index 49a1ce0..e9b3cab 100644
+--- a/arch/mips/bcm47xx/buttons.c
++++ b/arch/mips/bcm47xx/buttons.c
+@@ -265,7 +265,7 @@ bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
+ };
+ 
+ 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),
+ };
+@@ -501,12 +501,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;
+diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c
+index adcb547..909e00f 100644
+--- a/arch/mips/bcm47xx/leds.c
++++ b/arch/mips/bcm47xx/leds.c
+@@ -292,7 +292,7 @@ bcm47xx_leds_linksys_wrt310nv1[] __initconst = {
+ };
+ 
+ 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),
+@@ -538,12 +538,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;
+diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
+index bba7399..bcae0e8 100644
+--- 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 {
+ 	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,
+-- 
+1.8.4.5
+
diff --git a/target/linux/brcm47xx/patches-3.10/145-MIPS-BCM47XX-Fix-LEDs-on-WRT54GS-V1.0.patch b/target/linux/brcm47xx/patches-3.10/145-MIPS-BCM47XX-Fix-LEDs-on-WRT54GS-V1.0.patch
new file mode 100644
index 0000000..ed3fdb9
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.10/145-MIPS-BCM47XX-Fix-LEDs-on-WRT54GS-V1.0.patch
@@ -0,0 +1,45 @@
+From d12264ddf6c29ddab9889cd87a1e60d2209f9922 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5 at 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
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reported-by: Catalin Patulea <cat at vv.carleton.ca>
+Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
+---
+ arch/mips/bcm47xx/leds.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c
+index 909e00f..23324e3 100644
+--- a/arch/mips/bcm47xx/leds.c
++++ b/arch/mips/bcm47xx/leds.c
+@@ -306,6 +306,14 @@ bcm47xx_leds_linksys_wrt54g3gv2[] __initconst = {
+ 	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),
+@@ -542,6 +550,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);
+-- 
+1.8.4.5
+
diff --git a/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch b/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
new file mode 100644
index 0000000..8612856
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
@@ -0,0 +1,13 @@
+--- a/arch/mips/bcm47xx/leds.c
++++ b/arch/mips/bcm47xx/leds.c
+@@ -216,8 +216,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),
+ };
diff --git a/target/linux/brcm47xx/patches-3.14/144-MIPS-BCM47XX-Devices-database-update-for-3.16.patch b/target/linux/brcm47xx/patches-3.14/144-MIPS-BCM47XX-Devices-database-update-for-3.16.patch
deleted file mode 100644
index 8612856..0000000
--- a/target/linux/brcm47xx/patches-3.14/144-MIPS-BCM47XX-Devices-database-update-for-3.16.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/arch/mips/bcm47xx/leds.c
-+++ b/arch/mips/bcm47xx/leds.c
-@@ -216,8 +216,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),
- };
diff --git a/target/linux/brcm47xx/patches-3.14/144-MIPS-BCM47XX-Distinguish-WRT54G-series-devices-by-bo.patch b/target/linux/brcm47xx/patches-3.14/144-MIPS-BCM47XX-Distinguish-WRT54G-series-devices-by-bo.patch
new file mode 100644
index 0000000..2874d74
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.14/144-MIPS-BCM47XX-Distinguish-WRT54G-series-devices-by-bo.patch
@@ -0,0 +1,118 @@
+From 9fff5375229a4ba3a200747e079c46fa19b90797 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5 at 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
+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 at vv.carleton.ca>
+Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
+---
+ 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(-)
+
+diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c
+index 44ab1be..63359f4 100644
+--- a/arch/mips/bcm47xx/board.c
++++ b/arch/mips/bcm47xx/board.c
+@@ -180,9 +180,9 @@ struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = {
+ 	{{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},
+ };
+ 
+diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c
+index 49a1ce0..e9b3cab 100644
+--- a/arch/mips/bcm47xx/buttons.c
++++ b/arch/mips/bcm47xx/buttons.c
+@@ -265,7 +265,7 @@ bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
+ };
+ 
+ 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),
+ };
+@@ -501,12 +501,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;
+diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c
+index adcb547..909e00f 100644
+--- a/arch/mips/bcm47xx/leds.c
++++ b/arch/mips/bcm47xx/leds.c
+@@ -292,7 +292,7 @@ bcm47xx_leds_linksys_wrt310nv1[] __initconst = {
+ };
+ 
+ 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),
+@@ -538,12 +538,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;
+diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
+index bba7399..bcae0e8 100644
+--- 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 {
+ 	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,
+-- 
+1.8.4.5
+
diff --git a/target/linux/brcm47xx/patches-3.14/145-MIPS-BCM47XX-Fix-LEDs-on-WRT54GS-V1.0.patch b/target/linux/brcm47xx/patches-3.14/145-MIPS-BCM47XX-Fix-LEDs-on-WRT54GS-V1.0.patch
new file mode 100644
index 0000000..ed3fdb9
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.14/145-MIPS-BCM47XX-Fix-LEDs-on-WRT54GS-V1.0.patch
@@ -0,0 +1,45 @@
+From d12264ddf6c29ddab9889cd87a1e60d2209f9922 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5 at 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
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reported-by: Catalin Patulea <cat at vv.carleton.ca>
+Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
+---
+ arch/mips/bcm47xx/leds.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c
+index 909e00f..23324e3 100644
+--- a/arch/mips/bcm47xx/leds.c
++++ b/arch/mips/bcm47xx/leds.c
+@@ -306,6 +306,14 @@ bcm47xx_leds_linksys_wrt54g3gv2[] __initconst = {
+ 	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),
+@@ -542,6 +550,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);
+-- 
+1.8.4.5
+
diff --git a/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch b/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
new file mode 100644
index 0000000..8612856
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
@@ -0,0 +1,13 @@
+--- a/arch/mips/bcm47xx/leds.c
++++ b/arch/mips/bcm47xx/leds.c
+@@ -216,8 +216,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),
+ };
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list