[MIPS] IP22: Export sgi_gfxaddr for use by the Newport console driver.
[pandora-kernel.git] / arch / mips / sgi-ip22 / ip22-setup.c
index 5e59b4c..e7ce798 100644 (file)
@@ -4,7 +4,6 @@
  * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
  * Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org)
  */
-#include <linux/config.h>
 #include <linux/ds1286.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
@@ -30,6 +29,7 @@
 #include <asm/sgi/ip22.h>
 
 unsigned long sgi_gfxaddr;
+EXPORT_SYMBOL_GPL(sgi_gfxaddr);
 
 /*
  * Stop-A is originally a Sun thing that isn't standard on IP22 so to avoid
@@ -53,9 +53,10 @@ EXPORT_SYMBOL(ip22_do_break);
 extern void ip22_be_init(void) __init;
 extern void ip22_time_init(void) __init;
 
-void __init plat_setup(void)
+void __init plat_mem_setup(void)
 {
        char *ctype;
+       char *cserial;
 
        board_be_init = ip22_be_init;
        ip22_time_init();
@@ -81,9 +82,14 @@ void __init plat_setup(void)
        /* ARCS console environment variable is set to "g?" for
         * graphics console, it is set to "d" for the first serial
         * line and "d2" for the second serial line.
+        *
+        * Need to check if the case is 'g' but no keyboard:
+        * (ConsoleIn/Out = serial)
         */
        ctype = ArcGetEnvironmentVariable("console");
-       if (ctype && *ctype == 'd') {
+       cserial = ArcGetEnvironmentVariable("ConsoleOut");
+
+       if ((ctype && *ctype == 'd') || (cserial && *cserial == 's')) {
                static char options[8];
                char *baud = ArcGetEnvironmentVariable("dbaud");
                if (baud)
@@ -91,7 +97,7 @@ void __init plat_setup(void)
                add_preferred_console("ttyS", *(ctype + 1) == '2' ? 1 : 0,
                                      baud ? options : NULL);
        } else if (!ctype || *ctype != 'g') {
-               /* Use ARC if we don't want serial ('d') or Newport ('g'). */
+               /* Use ARC if we don't want serial ('d') or graphics ('g'). */
                prom_flags |= PROM_FLAG_USE_AS_CONSOLE;
                add_preferred_console("arc", 0, NULL);
        }