Add support for the D-Link DIR-130/330
authorFlorian Fainelli <florian@openwrt.org>
Mon, 18 Jun 2007 08:14:11 +0000 (08:14 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Mon, 18 Jun 2007 08:14:11 +0000 (08:14 +0000)
SVN-Revision: 7660

package/broadcom-diag/src/diag.c

index 401adbfd85d533ff9a24622adbac55bc14fc1c66..0b074673e8ef02afbdd4cae0c14b90617d4a1b27 100644 (file)
@@ -104,6 +104,10 @@ enum {
        
        /* SimpleTech */
        STI_NAS,
+
+       /* D-Link */
+       DIR130,
+       DIR330,
 };
 
 static void __init bcm4780_init(void) {
@@ -533,6 +537,30 @@ static struct platform_t __initdata platforms[] = {
                },
                .platform_init = bcm4780_init,
        },
+       /* D-Link */
+       [DIR130] = {
+               .name     = "D-Link DIR-130",
+               .buttons        = {
+                       { .name = "reset",      .gpio = 1 << 3},
+                       { .name = "reserved",   .gpio = 1 << 7},
+               },
+               .leds      = {
+                       { .name = "diag",       .gpio = 1 << 0},
+                       { .name = "blue",       .gpio = 1 << 6},
+               },
+       },
+       [DIR330] = {
+               .name     = "D-Link DIR-330",
+               .buttons        = {
+                       { .name = "reset",      .gpio = 1 << 3},
+                       { .name = "reserved",   .gpio = 1 << 7},
+               },
+               .leds      = {
+                       { .name = "diag",       .gpio = 1 << 0},
+                       { .name = "usb",        .gpio = 1 << 4},
+                       { .name = "blue",       .gpio = 1 << 6},
+               },
+       },
 };
 
 static struct platform_t __init *platform_detect(void)
@@ -575,6 +603,13 @@ static struct platform_t __init *platform_detect(void)
                
                if (!strcmp(boardnum, "10496"))
                        return &platforms[USR5461];
+
+               /* D-Link */
+               if (!strcmp(getvar("model_name"), "DIR-130"))
+                       return &platforms[DIR130];
+               if (!strcmp(getvar("model_name"), "DIR-330"))
+                       return &platforms[DIR330];
+
        } else { /* PMON based - old stuff */
 
                /* Dell TrueMobile 2300 */