Modify

Opened 4 years ago

Last modified 4 years ago

#14574 new defect

Tenda N6 Support diag patch.

Reported by: zjwangmin Owned by: developers
Priority: normal Milestone:
Component: other Version: Trunk
Keywords: Tenda N6 diag error patch Cc:

Description

Index: package/kernel/broadcom-diag/src/diag.c
===================================================================
--- package/kernel/broadcom-diag/src/diag.c (revision 38993)
+++ package/kernel/broadcom-diag/src/diag.c (working copy)
@@ -187,6 +187,9 @@

/* Huawei */
HUAWEI_E970,

+
+ /* Tenda */
+ TENDA_N6,

};

static void init bcm4780_init(void) {

@@ -1222,6 +1225,17 @@

{ .name = "wlan", .gpio = 1 << 0, .polarity = NORMAL },

},

},

+ /* Tenda */
+ [TENDA_N6] = {
+ .name = "Tenda N6",
+ .buttons = {
+ { .name = "wombo_reset", .gpio = 1 << 22 },
+ { .name = "wps_button", .gpio = 1 << 20 },
+ },
+ .leds = {
+ { .name = "wps_led", .gpio = 1 << 7, .polarity = REVERSE },
+ },
+ },

};

static struct platform_t init *platform_detect_legacy(void)

@@ -1244,6 +1258,11 @@

return &platforms[WRT600N];

}

+ printk("test for board boardnum:%s boardrev:%s\n",boardnum,getvar("boardrev"));
+ if (!strcmp(boardnum, "6") && !strcmp(getvar("boardrev"), "0x1444")){ /* Tenda N6 */
+ return &platforms[TENDA_N6];
+ }
+

if (startswith(getvar("pmon_ver"), "CFE")) {

/* CFE based - newer hardware */
if (!strcmp(boardnum, "42")) { /* Linksys */

@@ -1429,6 +1448,8 @@

return &platforms[DIR330];

case BCM47XX_BOARD_HUAWEI_E970:

return &platforms[HUAWEI_E970];

+ case BCM47XX_BOARD_TENDA_N6:
+ return &platforms[TENDA_N6];

case BCM47XX_BOARD_LINKSYS_E1000V1:

return &platforms[E1000V1];

case BCM47XX_BOARD_LINKSYS_E1000V21:

Index: target/linux/brcm47xx/image/Makefile
===================================================================
--- target/linux/brcm47xx/image/Makefile (revision 38993)
+++ target/linux/brcm47xx/image/Makefile (working copy)
@@ -115,6 +115,7 @@

$(call Image/Build/CyberTAN,$(1),e1550_v1,1550,1.0.3,$(patsubst jffs2-%,jffs2,$(1)))
$(call Image/Build/CyberTAN,$(1),e2000_v1,32XN,1.0.4,$(patsubst jffs2-%,jffs2,$(1)))
$(call Image/Build/CyberTAN,$(1),e2500_v1_v2,E25X,1.0.7,$(patsubst jffs2-%,jffs2,$(1)))

+ $(call Image/Build/TENDA,$(1),N6,E25X,1.0.1,$(patsubst jffs2-%,jffs2,$(1)))

$(call Image/Build/CyberTAN,$(1),e3000_v1,61XN,1.0.3,$(patsubst jffs2-%,jffs2,$(1)))
$(call Image/Build/CyberTAN,$(1),e3200_v1,3200,1.0.1,$(patsubst jffs2-%,jffs2,$(1)))
$(call Image/Build/CyberTAN,$(1),e4200_v1,4200,1.0.5,$(patsubst jffs2-%,jffs2,$(1)))

Index: target/linux/brcm47xx/patches-3.10/070-MIPS-BCM47XX-add-board-detection.patch
===================================================================
--- target/linux/brcm47xx/patches-3.10/070-MIPS-BCM47XX-add-board-detection.patch (revision 38993)
+++ target/linux/brcm47xx/patches-3.10/070-MIPS-BCM47XX-add-board-detection.patch (working copy)
@@ -26,7 +26,7 @@

obj-$(CONFIG_BCM47XX_SSB) += wgt634u.o

--- /dev/null
+++ b/arch/mips/bcm47xx/board.c

-@@ -0,0 +1,309 @@
+@@ -0,0 +1,310 @@

+#include <linux/export.h>
+#include <linux/string.h>
+#include <bcm47xx_board.h>

@@ -201,6 +201,7 @@

+static const
+struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] initconst = {
+ {{BCM47XX_BOARD_HUAWEI_E970, "Huawei E970"}, "0x048e", "0x5347", "0x11"},

++ {{BCM47XX_BOARD_TENDA_N6, "Tenda N6"}, "0x0550", "6", "0x1444"},

+ {{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
+ {{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
+ { {0}, 0},

@@ -356,7 +357,7 @@

static int init bcm47xx_register_bus_complete(void)

--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h

-@@ -0,0 +1,110 @@
+@@ -0,0 +1,111 @@

+#ifndef BCM47XX_BOARD_H
+#define
BCM47XX_BOARD_H
+

@@ -407,6 +408,7 @@

+ BCM47XX_BOARD_DLINK_DIR330,
+
+ BCM47XX_BOARD_HUAWEI_E970,

++ BCM47XX_BOARD_TENDA_N6,

+
+ BCM47XX_BOARD_LINKSYS_E900V1,
+ BCM47XX_BOARD_LINKSYS_E1000V1,

Attachments (1)

1 (3.7 KB) - added by zjwangmin 4 years ago.

Download all attachments as: .zip

Change History (2)

Changed 4 years ago by zjwangmin

  • Attachment 1 added

comment:1 Changed 4 years ago by Zajec

Nack! Don't use board_list_board unless you really have to! This is not the case.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.