diff options
author | Florian Fainelli <florian@openwrt.org> | 2006-12-11 21:46:31 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2006-12-11 21:46:31 +0000 |
commit | 7790289f3e47f73861913e1ce72e26a853456dd5 (patch) | |
tree | e956888bb040c1bd22339b4afc85bf19e9d9092e | |
parent | a8b83afe372c03575f4de568df81d7a7c2d742d0 (diff) | |
download | upstream-7790289f3e47f73861913e1ce72e26a853456dd5.tar.gz upstream-7790289f3e47f73861913e1ce72e26a853456dd5.tar.bz2 upstream-7790289f3e47f73861913e1ce72e26a853456dd5.zip |
Add Trendware TEW-411BRplus (#1038)
SVN-Revision: 5764
-rw-r--r-- | package/broadcom-diag/src/diag.c | 19 | ||||
-rw-r--r-- | package/switch/src/switch-adm.c | 11 |
2 files changed, 29 insertions, 1 deletions
diff --git a/package/broadcom-diag/src/diag.c b/package/broadcom-diag/src/diag.c index b0def22e46..bb25d57581 100644 --- a/package/broadcom-diag/src/diag.c +++ b/package/broadcom-diag/src/diag.c @@ -91,6 +91,9 @@ enum { /* Belkin */ BELKIN_UNKNOWN, + + /* Trendware */ + TEW411BRPP, }; static struct platform_t __initdata platforms[] = { @@ -416,6 +419,18 @@ static struct platform_t __initdata platforms[] = { { .name = "connected", .gpio = 1 << 0, .polarity = NORMAL }, }, }, + /* Trendware */ + [TEW411BRPP] = { + .name = "Trendware TEW411BRP+", + .buttons = { + { /* No usable buttons */ }, + }, + .leds = { + { .name = "power", .gpio = 1 << 7, .polarity = NORMAL }, + { .name = "wlan", .gpio = 1 << 1, .polarity = NORMAL }, + { .name = "bridge", .gpio = 1 << 6, .polarity = NORMAL }, + }, + }, }; static struct platform_t __init *platform_detect(void) @@ -509,6 +524,10 @@ static struct platform_t __init *platform_detect(void) return &platforms[WR850GV2V3]; } + if (!strcmp(boardnum, "44")) { /* Trendware TEW-411BRP+ */ + return &platforms[TEW411BRPP]; + } + /* not found */ return NULL; } diff --git a/package/switch/src/switch-adm.c b/package/switch/src/switch-adm.c index 083b6ebc47..beaf9ca787 100644 --- a/package/switch/src/switch-adm.c +++ b/package/switch/src/switch-adm.c @@ -498,8 +498,17 @@ static int detect_adm(void) #if defined(BCMGPIO2) || defined(BCMGPIO) int boardflags = atoi(nvram_get("boardflags")); + int boardnum = atoi(nvram_get("boardnum")); - if ((boardflags & 0x80) || force) { + if (boardnum == 44) { /* Trendware TEW-411BRP+ */ + ret = 1; + + eecs = getgpiopin("adm_eecs", 2); + eesk = getgpiopin("adm_eesk", 3); + eedi = getgpiopin("adm_eedi", 4); + eerc = getgpiopin("adm_rc", 5); + + } else if ((boardflags & 0x80) || force) { ret = 1; eecs = getgpiopin("adm_eecs", 2); |