diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2007-05-01 22:32:45 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 17:59:06 -0700 |
commit | d6713b4091a99fa2af2fabdcd2f3fb97f32ecf2e (patch) | |
tree | 7cabd0ff35f9ec4413ba936ddb203d13dffb1550 /arch/m68k/q40 | |
parent | f8744bc95dac461cef40df7143756d1bfa393991 (diff) | |
download | op-kernel-dev-d6713b4091a99fa2af2fabdcd2f3fb97f32ecf2e.zip op-kernel-dev-d6713b4091a99fa2af2fabdcd2f3fb97f32ecf2e.tar.gz |
m68k: early parameter support
Add early parameter support and convert current users to it.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68k/q40')
-rw-r--r-- | arch/m68k/q40/config.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c index 4c5b9e4..476e18e 100644 --- a/arch/m68k/q40/config.c +++ b/arch/m68k/q40/config.c @@ -54,7 +54,6 @@ void q40_set_vectors(void); extern void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/); -extern char m68k_debug_device[]; static void q40_mem_console_write(struct console *co, const char *b, unsigned int count); @@ -62,6 +61,7 @@ extern int ql_ticks; static struct console q40_console_driver = { .name = "debug", + .write = q40_mem_console_write, .flags = CON_PRINTBUFFER, .index = -1, }; @@ -85,6 +85,19 @@ static void q40_mem_console_write(struct console *co, const char *s, } } +static int __init q40_debug_setup(char *arg) +{ + /* useful for early debugging stages - writes kernel messages into SRAM */ + if (MACH_IS_Q40 && !strncmp(arg, "mem", 3)) { + /*printk("using NVRAM debug, q40_mem_cptr=%p\n",q40_mem_cptr);*/ + _cpleft = 2000 - ((long)q40_mem_cptr-0xff020000) / 4; + register_console(&q40_console_driver); + } + return 0; +} + +early_param("debug", q40_debug_setup); + #if 0 void printq40(char *str) { @@ -194,14 +207,6 @@ void __init config_q40(void) * all physical RAM fits into the boundary - otherwise * allocator may play costly and useless tricks */ mach_max_dma_address = 1024*1024*1024; - - /* useful for early debugging stages - writes kernel messages into SRAM */ - if (!strncmp( m68k_debug_device,"mem", 3)) { - /*printk("using NVRAM debug, q40_mem_cptr=%p\n",q40_mem_cptr);*/ - _cpleft = 2000 - ((long)q40_mem_cptr-0xff020000) / 4; - q40_console_driver.write = q40_mem_console_write; - register_console(&q40_console_driver); - } } |