summaryrefslogtreecommitdiff
path: root/arch/sh/kernel/setup.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 14:26:53 +0900
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 14:26:53 +0900
commita80fd21e52cc09ff1e4d36de5781173a5b87b2dc (patch)
tree9e4ee0efc4809209f5bb9c9a288a6a1cf43c060e /arch/sh/kernel/setup.c
parente86d6b66f5b38680746b2cb71186d90af17f150f (diff)
sh: earlyprintk= support and cleanups.
Allow multiple early printk consoles via earlyprintk=. With this change earlyprintk is no longer enabled by default, it must be specified on the kernel command line. Optionally with ,keep to prevent unreg by tty_io. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r--arch/sh/kernel/setup.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index e75189cb1db7..cff8d36f91b0 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -145,6 +145,24 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE],
memory_end = memory_start + mem_size;
}
}
+
+#ifdef CONFIG_EARLY_PRINTK
+ if (c == ' ' && !memcmp(from, "earlyprintk=", 12)) {
+ char *ep_end;
+
+ if (to != command_line)
+ to--;
+
+ from += 12;
+ ep_end = strchr(from, ' ');
+
+ setup_early_printk(from);
+ printk("early console enabled\n");
+
+ from = ep_end;
+ }
+#endif
+
if (c == ' ' && !memcmp(from, "sh_mv=", 6)) {
char* mv_end;
char* mv_comma;
@@ -245,11 +263,7 @@ void __init setup_arch(char **cmdline_p)
unsigned long bootmap_size;
unsigned long start_pfn, max_pfn, max_low_pfn;
-#ifdef CONFIG_EARLY_PRINTK
- extern void enable_early_printk(void);
- enable_early_printk();
-#endif
#ifdef CONFIG_CMDLINE_BOOL
strcpy(COMMAND_LINE, CONFIG_CMDLINE);
#endif