[adm5120] calling of prom_detect_board is needed only when we still don't know the...
[openwrt/svn-archive/archive.git] / target / linux / adm5120-2.6 / files / arch / mips / adm5120 / prom.c
index a288b07..c2e1dcb 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <asm/mach-adm5120/adm5120_info.h>
 
-static char **prom_envp;
+static char **prom_envp = NULL;
 
 void setup_prom_printf(int);
 void prom_printf(char *, ...);
@@ -106,7 +106,9 @@ void __init prom_init(void)
 {
        char *cmd;
 
-       prom_envp = (char **)fw_arg2;
+       if ((fw_arg2 & 3) == 0) {
+               prom_envp = (char **)fw_arg2;
+       }
 
        adm5120_info_init();