]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/txx9/generic/setup.c
MIPS: TXx9: Add prom_getenv
[linux-2.6-omap-h63xx.git] / arch / mips / txx9 / generic / setup.c
index 33d8c9e3223d37ac90e0b756f22c85b07d38f833..005179c2af21ffc892bea142f97eeac0f3a95fd4 100644 (file)
@@ -212,6 +212,21 @@ char * __init prom_getcmdline(void)
        return &(arcs_cmdline[0]);
 }
 
+const char *__init prom_getenv(const char *name)
+{
+       const s32 *str = (const s32 *)fw_arg2;
+
+       if (!str)
+               return NULL;
+       /* YAMON style ("name", "value" pairs) */
+       while (str[0] && str[1]) {
+               if (!strcmp((const char *)(unsigned long)str[0], name))
+                       return (const char *)(unsigned long)str[1];
+               str += 2;
+       }
+       return NULL;
+}
+
 static void __noreturn txx9_machine_halt(void)
 {
        local_irq_disable();