[ar71xx] use enum for the machine type
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / files / arch / mips / ar71xx / prom.c
index 9117e3063617a0a9e9bc6ee2182a1cf7619de381..6907be8ee9d79b49c59ca4c3bddecdb57e847783 100644 (file)
@@ -23,8 +23,8 @@
 #include "devices.h"
 
 struct board_rec {
-       char            *name;
-       unsigned long   mach_type;
+       char                    *name;
+       enum ar71xx_mach_type   mach_type;
 };
 
 static int ar71xx_prom_argc __initdata;
@@ -77,6 +77,9 @@ static struct board_rec boards[] __initdata = {
        }, {
                .name           = "WNR2000",
                .mach_type      = AR71XX_MACH_WNR2000,
+       }, {
+               .name           = "WRT160NL",
+               .mach_type      = AR71XX_MACH_WRT160NL,
        }, {
                .name           = "WRT400N",
                .mach_type      = AR71XX_MACH_WRT400N,
@@ -171,7 +174,7 @@ static int ar71xx_prom_init_myloader(void)
 
        switch (mylo->did) {
        case DEVID_COMPEX_WP543:
-               ar71xx_mach_type = AR71XX_MACH_WP543;
+               ar71xx_mach = AR71XX_MACH_WP543;
                break;
        default:
                printk(KERN_WARNING "prom: unknown device id: %x\n",
@@ -194,7 +197,7 @@ static void ar71xx_prom_init_generic(void)
        if (!p)
                p = ar71xx_prom_getenv("board");
        if (p)
-               ar71xx_mach_type = find_board_byname(p);
+               ar71xx_mach = find_board_byname(p);
 
        p = ar71xx_prom_getenv("ethaddr");
        if (!p)
@@ -210,7 +213,7 @@ void __init prom_init(void)
                        (unsigned int)fw_arg0, (unsigned int)fw_arg1,
                        (unsigned int)fw_arg2, (unsigned int)fw_arg3);
 
-       ar71xx_mach_type = AR71XX_MACH_GENERIC;
+       ar71xx_mach = AR71XX_MACH_GENERIC;
 
        if (ar71xx_prom_init_myloader())
                return;