]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/setup-common.c
powerpc: Simplify and clean up the xmon terminal I/O
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / setup-common.c
index e22856ecb5a0396f1000cae57289a24107a168dd..26bb1fe6384b4fd988c9a5476c446a7e9dcbcecb 100644 (file)
@@ -51,6 +51,7 @@
 #include <asm/page.h>
 #include <asm/mmu.h>
 #include <asm/lmb.h>
+#include <asm/xmon.h>
 
 #undef DEBUG
 
@@ -559,3 +560,23 @@ void __init smp_setup_cpu_maps(void)
 #endif /* CONFIG_PPC64 */
 }
 #endif /* CONFIG_SMP */
+
+#ifdef CONFIG_XMON
+static int __init early_xmon(char *p)
+{
+       /* ensure xmon is enabled */
+       if (p) {
+               if (strncmp(p, "on", 2) == 0)
+                       xmon_init(1);
+               if (strncmp(p, "off", 3) == 0)
+                       xmon_init(0);
+               if (strncmp(p, "early", 5) != 0)
+                       return 0;
+       }
+       xmon_init(1);
+       debugger(NULL);
+
+       return 0;
+}
+early_param("xmon", early_xmon);
+#endif