diff options
Diffstat (limited to 'arch/m68k/q40/config.c')
-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 4c5b9e4e98bc..476e18eca758 100644 --- a/arch/m68k/q40/config.c +++ b/arch/m68k/q40/config.c | |||
@@ -54,7 +54,6 @@ void q40_set_vectors(void); | |||
54 | 54 | ||
55 | extern void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/); | 55 | extern void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/); |
56 | 56 | ||
57 | extern char m68k_debug_device[]; | ||
58 | static void q40_mem_console_write(struct console *co, const char *b, | 57 | static void q40_mem_console_write(struct console *co, const char *b, |
59 | unsigned int count); | 58 | unsigned int count); |
60 | 59 | ||
@@ -62,6 +61,7 @@ extern int ql_ticks; | |||
62 | 61 | ||
63 | static struct console q40_console_driver = { | 62 | static struct console q40_console_driver = { |
64 | .name = "debug", | 63 | .name = "debug", |
64 | .write = q40_mem_console_write, | ||
65 | .flags = CON_PRINTBUFFER, | 65 | .flags = CON_PRINTBUFFER, |
66 | .index = -1, | 66 | .index = -1, |
67 | }; | 67 | }; |
@@ -85,6 +85,19 @@ static void q40_mem_console_write(struct console *co, const char *s, | |||
85 | } | 85 | } |
86 | } | 86 | } |
87 | 87 | ||
88 | static int __init q40_debug_setup(char *arg) | ||
89 | { | ||
90 | /* useful for early debugging stages - writes kernel messages into SRAM */ | ||
91 | if (MACH_IS_Q40 && !strncmp(arg, "mem", 3)) { | ||
92 | /*printk("using NVRAM debug, q40_mem_cptr=%p\n",q40_mem_cptr);*/ | ||
93 | _cpleft = 2000 - ((long)q40_mem_cptr-0xff020000) / 4; | ||
94 | register_console(&q40_console_driver); | ||
95 | } | ||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | early_param("debug", q40_debug_setup); | ||
100 | |||
88 | #if 0 | 101 | #if 0 |
89 | void printq40(char *str) | 102 | void printq40(char *str) |
90 | { | 103 | { |
@@ -194,14 +207,6 @@ void __init config_q40(void) | |||
194 | * all physical RAM fits into the boundary - otherwise | 207 | * all physical RAM fits into the boundary - otherwise |
195 | * allocator may play costly and useless tricks */ | 208 | * allocator may play costly and useless tricks */ |
196 | mach_max_dma_address = 1024*1024*1024; | 209 | mach_max_dma_address = 1024*1024*1024; |
197 | |||
198 | /* useful for early debugging stages - writes kernel messages into SRAM */ | ||
199 | if (!strncmp( m68k_debug_device,"mem", 3)) { | ||
200 | /*printk("using NVRAM debug, q40_mem_cptr=%p\n",q40_mem_cptr);*/ | ||
201 | _cpleft = 2000 - ((long)q40_mem_cptr-0xff020000) / 4; | ||
202 | q40_console_driver.write = q40_mem_console_write; | ||
203 | register_console(&q40_console_driver); | ||
204 | } | ||
205 | } | 210 | } |
206 | 211 | ||
207 | 212 | ||