Add Trendware TEW-411BRplus (#1038)
[openwrt.git] / package / switch / src / switch-adm.c
index 921ad50..beaf9ca 100644 (file)
@@ -49,7 +49,7 @@ static int force = 0;
 
 MODULE_AUTHOR("Felix Fietkau <openwrt@nbd.name>");
 MODULE_LICENSE("GPL");
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,52)
 module_param(eecs, int, 0);
 module_param(eesk, int, 0);
 module_param(eedi, int, 0);
@@ -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);
This page took 0.020472 seconds and 4 git commands to generate.