aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/atari/debug.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2007-05-01 16:32:45 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-04 20:59:06 -0400
commitd6713b4091a99fa2af2fabdcd2f3fb97f32ecf2e (patch)
tree7cabd0ff35f9ec4413ba936ddb203d13dffb1550 /arch/m68k/atari/debug.c
parentf8744bc95dac461cef40df7143756d1bfa393991 (diff)
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/atari/debug.c')
-rw-r--r--arch/m68k/atari/debug.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/arch/m68k/atari/debug.c b/arch/m68k/atari/debug.c
index 66983fe87509..fbeed8c8ecbc 100644
--- a/arch/m68k/atari/debug.c
+++ b/arch/m68k/atari/debug.c
@@ -19,8 +19,6 @@
19#include <asm/atarihw.h> 19#include <asm/atarihw.h>
20#include <asm/atariints.h> 20#include <asm/atariints.h>
21 21
22extern char m68k_debug_device[];
23
24/* Flag that Modem1 port is already initialized and used */ 22/* Flag that Modem1 port is already initialized and used */
25int atari_MFP_init_done; 23int atari_MFP_init_done;
26/* Flag that Modem1 port is already initialized and used */ 24/* Flag that Modem1 port is already initialized and used */
@@ -305,26 +303,28 @@ void atari_init_midi_port(int cflag)
305 ACIA_RHTID : ACIA_RLTID); 303 ACIA_RHTID : ACIA_RLTID);
306} 304}
307 305
308void __init atari_debug_init(void) 306static int __init atari_debug_setup(char *arg)
309{ 307{
310 if (!strcmp(m68k_debug_device, "ser")) { 308 if (!MACH_IS_ATARI)
309 return 0;
310
311 if (!strcmp(arg, "ser"))
311 /* defaults to ser2 for a Falcon and ser1 otherwise */ 312 /* defaults to ser2 for a Falcon and ser1 otherwise */
312 strcpy(m68k_debug_device, MACH_IS_FALCON ? "ser2" : "ser1"); 313 arg = MACH_IS_FALCON ? "ser2" : "ser1";
313 }
314 314
315 if (!strcmp(m68k_debug_device, "ser1")) { 315 if (!strcmp(arg, "ser1")) {
316 /* ST-MFP Modem1 serial port */ 316 /* ST-MFP Modem1 serial port */
317 atari_init_mfp_port(B9600|CS8); 317 atari_init_mfp_port(B9600|CS8);
318 atari_console_driver.write = atari_mfp_console_write; 318 atari_console_driver.write = atari_mfp_console_write;
319 } else if (!strcmp(m68k_debug_device, "ser2")) { 319 } else if (!strcmp(arg, "ser2")) {
320 /* SCC Modem2 serial port */ 320 /* SCC Modem2 serial port */
321 atari_init_scc_port(B9600|CS8); 321 atari_init_scc_port(B9600|CS8);
322 atari_console_driver.write = atari_scc_console_write; 322 atari_console_driver.write = atari_scc_console_write;
323 } else if (!strcmp(m68k_debug_device, "midi")) { 323 } else if (!strcmp(arg, "midi")) {
324 /* MIDI port */ 324 /* MIDI port */
325 atari_init_midi_port(B9600|CS8); 325 atari_init_midi_port(B9600|CS8);
326 atari_console_driver.write = atari_midi_console_write; 326 atari_console_driver.write = atari_midi_console_write;
327 } else if (!strcmp(m68k_debug_device, "par")) { 327 } else if (!strcmp(arg, "par")) {
328 /* parallel printer */ 328 /* parallel printer */
329 atari_turnoff_irq(IRQ_MFP_BUSY); /* avoid ints */ 329 atari_turnoff_irq(IRQ_MFP_BUSY); /* avoid ints */
330 sound_ym.rd_data_reg_sel = 7; /* select mixer control */ 330 sound_ym.rd_data_reg_sel = 7; /* select mixer control */
@@ -337,4 +337,8 @@ void __init atari_debug_init(void)
337 } 337 }
338 if (atari_console_driver.write) 338 if (atari_console_driver.write)
339 register_console(&atari_console_driver); 339 register_console(&atari_console_driver);
340
341 return 0;
340} 342}
343
344early_param("debug", atari_debug_setup);