diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-08 12:55:08 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-08 12:55:08 +0100 |
commit | fca5dcd4835ed09bb1a48a355344aff7a25c76e0 (patch) | |
tree | b596fad4509d3208ef974b9e22b2326ecfd85b83 /arch/powerpc/kernel/setup-common.c | |
parent | powerpc: Fix crash in early boot on some powermacs (diff) | |
download | linux-fca5dcd4835ed09bb1a48a355344aff7a25c76e0.tar.xz linux-fca5dcd4835ed09bb1a48a355344aff7a25c76e0.zip |
powerpc: Simplify and clean up the xmon terminal I/O
This factors out the common bits of arch/powerpc/xmon/start_*.c into
a new nonstdio.c, and removes some stuff that was supposed to make
xmon's I/O routines somewhat stdio-like but was never used.
It also makes the parsing of the xmon= command line option common,
so that ppc32 can now use xmon={off,on,early} also.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index e22856ecb5a0..26bb1fe6384b 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -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 |