Replace hardcoded values with their correct definitions
[openwrt.git] / target / linux / adm5120-2.6 / files / arch / mips / adm5120 / prom.c
index 97ecc99..c14c172 100644 (file)
@@ -62,9 +62,9 @@ static struct board_desc common_boards[] __initdata = {
        DEFBOARD("BR-6104K",            MACH_ADM5120_BR6104K),
        DEFBOARD("BR-6104KP",           MACH_ADM5120_BR6104K),
        /* Infineon boards */
        DEFBOARD("BR-6104K",            MACH_ADM5120_BR6104K),
        DEFBOARD("BR-6104KP",           MACH_ADM5120_BR6104K),
        /* Infineon boards */
-       DEFBOARD("EASY 5120",           MACH_ADM5120_EASY5120),
-       DEFBOARD("EASY 5120-RT",        MACH_ADM5120_EASY5120RT),
        DEFBOARD("EASY 5120P-ATA",      MACH_ADM5120_EASY5120PATA),
        DEFBOARD("EASY 5120P-ATA",      MACH_ADM5120_EASY5120PATA),
+       DEFBOARD("EASY 5120-RT",        MACH_ADM5120_EASY5120RT),
+       DEFBOARD("EASY 5120-WVoIP",     MACH_ADM5120_EASY5120WVOIP),
        DEFBOARD("EASY 83000",          MACH_ADM5120_EASY83000),
        /* Mikrotik RouterBOARDs */
        DEFBOARD("111",                 MACH_ADM5120_RB_111),
        DEFBOARD("EASY 83000",          MACH_ADM5120_EASY83000),
        /* Mikrotik RouterBOARDs */
        DEFBOARD("111",                 MACH_ADM5120_RB_111),
@@ -110,7 +110,7 @@ static unsigned long __init detect_machtype_generic(void)
 {
        char *name;
 
 {
        char *name;
 
-       name = generic_prom_getenv("board");
+       name = generic_prom_getenv("board_name");
        return find_machtype_byname(name);
 }
 
        return find_machtype_byname(name);
 }
 
@@ -228,8 +228,13 @@ static void __init prom_detect_machtype(void)
                return;
        }
 
                return;
        }
 
-       adm5120_prom_type = ADM5120_PROM_GENERIC;
-       mips_machtype = detect_machtype_generic();
+       if (generic_prom_present()) {
+               adm5120_prom_type = ADM5120_PROM_GENERIC;
+               mips_machtype = detect_machtype_generic();
+               return;
+       }
+
+       mips_machtype = MACH_ADM5120_GENERIC;
 }
 
 /* TODO: this is an ugly hack for RouterBOARDS */
 }
 
 /* TODO: this is an ugly hack for RouterBOARDS */
This page took 0.026669 seconds and 4 git commands to generate.