Add back Sitecom WL-105b support
[openwrt/svn-archive/archive.git] / package / broadcom-diag / src / diag.c
index 07b89d3759109d23b79054b485e531f9abbbd80b..e672982dc905eea639c57fddbb10554a5af20d69 100644 (file)
@@ -115,6 +115,9 @@ enum {
        DIR130,
        DIR330,
        DWL3150,
+
+       /* Sitecom */
+       WL105B,
 };
 
 static void __init bcm4780_init(void) {
@@ -131,6 +134,14 @@ static void __init bcm4780_init(void) {
                schedule_timeout(HZ * 5);
 }
 
+static void __init bcm57xx_init(void) {
+       int pin = 1 << 2;
+
+       gpio_outen(pin, pin);
+       gpio_control(pin, 0);
+       gpio_out(pin, pin);
+}
+
 static struct platform_t __initdata platforms[] = {
        /* Linksys */
        [WAP54GV1] = {
@@ -138,7 +149,7 @@ static struct platform_t __initdata platforms[] = {
                .buttons        = {
                        { .name = "reset",      .gpio = 1 << 0 },
                },
-               .leds           = { 
+               .leds           = {
                        { .name = "diag",       .gpio = 1 << 3 },
                        { .name = "wlan",       .gpio = 1 << 4 },
                },
@@ -219,6 +230,7 @@ static struct platform_t __initdata platforms[] = {
                        { .name = "usb_blink",  .gpio = 1 << 10, .polarity = REVERSE },
                        { .name = "usb",        .gpio = 1 << 11, .polarity = REVERSE },
                },
+               .platform_init = bcm57xx_init,
        },
        /* Asus */
        [WLHDD] = {
@@ -609,6 +621,17 @@ static struct platform_t __initdata platforms[] = {
                        { .name = "status",     .gpio = 1 << 1},
                },
        },
+       /* Double check */
+       [WL105B] = {
+               .name   = "Sitecom WL-105b",
+               .buttons        = {
+                       { .name = "reset",      .gpio = 1 << 10},
+               },
+               .leds     = {
+                       { .name = "wlan",       .gpio = 1 << 4},
+                       { .name = "power",      .gpio = 1 << 3},
+               },
+       },
 };
 
 static struct platform_t __init *platform_detect(void)
@@ -721,6 +744,9 @@ static struct platform_t __init *platform_detect(void)
                                (simple_strtoul(getvar("et1phyaddr"), NULL, 0) == 10))
                                return &platforms[WL300G];
                }
+               /* Sitecom WL-105b */
+               if (!strncmp(boardnum, "2", 1) && simple_strtoul(getvar("GemtekPmonVer"), NULL, 0) == 1)
+                       return &platforms[WL105B];
 
                /* unknown asus stuff, probably bcm4702 */
                if (!strncmp(boardnum, "asusX", 5))