aboutsummaryrefslogtreecommitdiffstats
path: root/package/broadcom-diag/src/diag.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2009-06-14 09:39:43 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2009-06-14 09:39:43 +0000
commitb63576359d0c3bc56b9b1326217b9a8ee318c3fb (patch)
treefca1bec052a26baafa3a620de10328491e5ff2bf /package/broadcom-diag/src/diag.c
parentc1918c778c4f60967a925c205e52108564bf3618 (diff)
downloadupstream-b63576359d0c3bc56b9b1326217b9a8ee318c3fb.tar.gz
upstream-b63576359d0c3bc56b9b1326217b9a8ee318c3fb.tar.bz2
upstream-b63576359d0c3bc56b9b1326217b9a8ee318c3fb.zip
D-Link DIR-320 support (broadcom-diag)
This patch adds D-Link DIR-320 support to broadcom-diag. "reserved" button is the button on the right side of the router without any title. I'm not sure if I've selected right name. Signed-off-by: Leonid Evdokimov <leon@darkk.net.ru> SVN-Revision: 16443
Diffstat (limited to 'package/broadcom-diag/src/diag.c')
-rw-r--r--package/broadcom-diag/src/diag.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/package/broadcom-diag/src/diag.c b/package/broadcom-diag/src/diag.c
index 4667591a16..834a83abdc 100644
--- a/package/broadcom-diag/src/diag.c
+++ b/package/broadcom-diag/src/diag.c
@@ -123,6 +123,7 @@ enum {
/* D-Link */
DIR130,
+ DIR320,
DIR330,
DWL3150,
@@ -718,6 +719,20 @@ static struct platform_t __initdata platforms[] = {
{ .name = "blue", .gpio = 1 << 6},
},
},
+ [DIR320] = {
+ .name = "D-Link DIR-320",
+ .buttons = {
+ { .name = "reserved", .gpio = 1 << 6},
+ { .name = "reset", .gpio = 1 << 7},
+ },
+ .leds = {
+ { .name = "wlan", .gpio = 1 << 0, .polarity = NORMAL },
+ { .name = "diag", .gpio = 1 << 1, .polarity = NORMAL }, /* "status led */
+ { .name = "red", .gpio = 1 << 3, .polarity = REVERSE },
+ { .name = "blue", .gpio = 1 << 4, .polarity = REVERSE },
+ { .name = "usb", .gpio = 1 << 5, .polarity = NORMAL },
+ },
+ },
[DIR330] = {
.name = "D-Link DIR-330",
.buttons = {
@@ -875,6 +890,10 @@ static struct platform_t __init *platform_detect(void)
if (!strcmp(getvar("boardtype"), "0x0101") && !strcmp(getvar("boardrev"), "0x10")) /* SE505V2 With Modified CFE */
return &platforms[SE505V2];
+ if (!strcmp(boardtype, "0x048e") && !strcmp(getvar("boardrev"),"0x35") &&
+ !strcmp(getvar("boardflags"), "0x750")) /* D-Link DIR-320 */
+ return &platforms[DIR320];
+
} else { /* PMON based - old stuff */
if ((simple_strtoul(getvar("GemtekPmonVer"), NULL, 0) == 9) &&
(simple_strtoul(getvar("et0phyaddr"), NULL, 0) == 30)) {