fix gpios for wzr-rs-g54, add support for the wzr-rs-g54hp
authorFelix Fietkau <nbd@openwrt.org>
Fri, 24 Nov 2006 02:39:41 +0000 (02:39 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 24 Nov 2006 02:39:41 +0000 (02:39 +0000)
SVN-Revision: 5636

openwrt/target/linux/package/diag/src/diag.c

index 7d2fc93a55d6a60e168e0da97cb8da9e33bfe236..e2e772c490f7f56ff843dfbcf57d2671adcfc72c 100644 (file)
@@ -64,6 +64,7 @@ enum {
        WHR2_A54G54,
        WLA2_G54L,
        WZR_RS_G54,
+       WZR_RS_G54HP,
        BUFFALO_UNKNOWN,
        BUFFALO_UNKNOWN_4710,
 
@@ -278,10 +279,24 @@ static struct platform_t __init platforms[] = {
                .name           = "Buffalo WZR-RS-G54",
                .buttons        = {
                        { .name = "ses",        .gpio = 1 << 0 },
-                       { .name = "reset",      .gpio = 1 << 7 },
+                       { .name = "reset",      .gpio = 1 << 4 },
                },
                .leds           = {
-                       { .name = "diag",       .gpio = 1 << 1, .polarity = REVERSE },
+                       { .name = "diag",       .gpio = 1 << 7, .polarity = REVERSE },
+                       { .name = "ses",        .gpio = 1 << 6, .polarity = REVERSE },
+                       { .name = "vpn",        .gpio = 1 << 1, .polarity = REVERSE },
+               },
+       },
+       [WZR_RS_G54HP] = {
+               .name           = "Buffalo WZR-RS-G54HP",
+               .buttons        = {
+                       { .name = "ses",        .gpio = 1 << 0 },
+                       { .name = "reset",      .gpio = 1 << 4 },
+               },
+               .leds           = {
+                       { .name = "diag",       .gpio = 1 << 7, .polarity = REVERSE },
+                       { .name = "ses",        .gpio = 1 << 6, .polarity = REVERSE },
+                       { .name = "vpn",        .gpio = 1 << 1, .polarity = REVERSE },
                },
        },
        [BUFFALO_UNKNOWN] = {
@@ -475,6 +490,8 @@ static struct platform_t __init *platform_detect(void)
                        return &platforms[WHR2_A54G54];
                if (!strcmp(buf, "30083"))
                        return &platforms[WZR_RS_G54];
+               if (!strcmp(buf, "30103"))
+                       return &platforms[WZR_RS_G54HP];
        }
 
        if (buf || !strcmp(boardnum, "00")) {/* probably buffalo */