diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c
index c3b69b1..3574853 100644
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -79,8 +79,6 @@
 
 static char amiga_model_name[13] = "Amiga ";
 
-extern char m68k_debug_device[];
-
 static void amiga_sched_init(irq_handler_t handler);
 /* amiga specific irq functions */
 extern void amiga_init_IRQ(void);
@@ -95,12 +93,10 @@
 extern void amiga_mksound(unsigned int count, unsigned int ticks);
 static void amiga_reset(void);
 extern void amiga_init_sound(void);
-static void amiga_savekmsg_init(void);
 static void amiga_mem_console_write(struct console *co, const char *b,
 				    unsigned int count);
 void amiga_serial_console_write(struct console *co, const char *s,
 				unsigned int count);
-static void amiga_debug_init(void);
 #ifdef CONFIG_HEARTBEAT
 static void amiga_heartbeat(int on);
 #endif
@@ -370,7 +366,6 @@
 {
 	int i;
 
-	amiga_debug_init();
 	amiga_identify();
 
 	/* Yuk, we don't have PCI memory */
@@ -458,17 +453,6 @@
 	/* initialize chipram allocator */
 	amiga_chip_init();
 
-	/* debugging using chipram */
-	if (!strcmp(m68k_debug_device, "mem")) {
-		if (!AMIGAHW_PRESENT(CHIP_RAM))
-			printk("Warning: no chipram present for debugging\n");
-		else {
-			amiga_savekmsg_init();
-			amiga_console_driver.write = amiga_mem_console_write;
-			register_console(&amiga_console_driver);
-		}
-	}
-
 	/* our beloved beeper */
 	if (AMIGAHW_PRESENT(AMI_AUDIO))
 		amiga_init_sound();
@@ -787,17 +771,33 @@
 	}
 }
 
-static void amiga_savekmsg_init(void)
+static int __init amiga_savekmsg_setup(char *arg)
 {
 	static struct resource debug_res = { .name = "Debug" };
 
+	if (!MACH_IS_AMIGA || strcmp(arg, "mem"))
+		goto done;
+
+	if (!AMIGAHW_PRESENT(CHIP_RAM)) {
+		printk("Warning: no chipram present for debugging\n");
+		goto done;
+	}
+
 	savekmsg = amiga_chip_alloc_res(SAVEKMSG_MAXMEM, &debug_res);
 	savekmsg->magic1 = SAVEKMSG_MAGIC1;
 	savekmsg->magic2 = SAVEKMSG_MAGIC2;
 	savekmsg->magicptr = ZTWO_PADDR(savekmsg);
 	savekmsg->size = 0;
+
+	amiga_console_driver.write = amiga_mem_console_write;
+	register_console(&amiga_console_driver);
+
+done:
+	return 0;
 }
 
+early_param("debug", amiga_savekmsg_setup);
+
 static void amiga_serial_putc(char c)
 {
 	amiga_custom.serdat = (unsigned char)c | 0x100;
@@ -872,15 +872,18 @@
 }
 #endif
 
-static void __init amiga_debug_init(void)
+static int __init amiga_debug_setup(char *arg)
 {
-	if (!strcmp(m68k_debug_device, "ser" )) {
+	if (MACH_IS_AMIGA && !strcmp(arg, "ser")) {
 		/* no initialization required (?) */
 		amiga_console_driver.write = amiga_serial_console_write;
 		register_console(&amiga_console_driver);
 	}
+	return 0;
 }
 
+early_param("debug", amiga_debug_setup);
+
 #ifdef CONFIG_HEARTBEAT
 static void amiga_heartbeat(int on)
 {
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index b10e7ad..e40e5dc 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -69,9 +69,6 @@
 extern int atari_mste_set_clock_mmss (unsigned long);
 extern int atari_tt_set_clock_mmss (unsigned long);
 
-/* atari specific debug functions (in debug.c) */
-extern void atari_debug_init(void);
-
 
 /* ++roman: This is a more elaborate test for an SCC chip, since the plain
  * Medusa board generates DTACK at the SCC's standard addresses, but a SCC
@@ -137,15 +134,18 @@
 
 
 /* Parse the Atari-specific switches= option. */
-void __init atari_switches_setup(const char *str, unsigned len)
+static int __init atari_switches_setup(char *str)
 {
-	char switches[len+1];
+	char switches[strlen(str) + 1];
 	char *p;
 	int ovsc_shift;
 	char *args = switches;
 
+	if (!MACH_IS_ATARI)
+		return 0;
+
 	/* copy string to local array, strsep works destructively... */
-	strlcpy(switches, str, sizeof(switches));
+	strcpy(switches, str);
 	atari_switches = 0;
 
 	/* parse the options */
@@ -170,8 +170,11 @@
 			atari_switches |= ATARI_SWITCH_SND7 << ovsc_shift;
 		}
 	}
+	return 0;
 }
 
+early_param("switches", atari_switches_setup);
+
 
     /*
      *  Setup the Atari configuration info
@@ -183,8 +186,6 @@
 
 	memset(&atari_hw_present, 0, sizeof(atari_hw_present));
 
-	atari_debug_init();
-
 	/* Change size of I/O space from 64KB to 4GB. */
 	ioport_resource.end  = 0xFFFFFFFF;
 
diff --git a/arch/m68k/atari/debug.c b/arch/m68k/atari/debug.c
index 66983fe..fbeed8c 100644
--- a/arch/m68k/atari/debug.c
+++ b/arch/m68k/atari/debug.c
@@ -19,8 +19,6 @@
 #include <asm/atarihw.h>
 #include <asm/atariints.h>
 
-extern char m68k_debug_device[];
-
 /* Flag that Modem1 port is already initialized and used */
 int atari_MFP_init_done;
 /* Flag that Modem1 port is already initialized and used */
@@ -305,26 +303,28 @@
 		     ACIA_RHTID : ACIA_RLTID);
 }
 
-void __init atari_debug_init(void)
+static int __init atari_debug_setup(char *arg)
 {
-	if (!strcmp(m68k_debug_device, "ser")) {
-		/* defaults to ser2 for a Falcon and ser1 otherwise */
-		strcpy(m68k_debug_device, MACH_IS_FALCON ? "ser2" : "ser1");
-	}
+	if (!MACH_IS_ATARI)
+		return 0;
 
-	if (!strcmp(m68k_debug_device, "ser1")) {
+	if (!strcmp(arg, "ser"))
+		/* defaults to ser2 for a Falcon and ser1 otherwise */
+		arg = MACH_IS_FALCON ? "ser2" : "ser1";
+
+	if (!strcmp(arg, "ser1")) {
 		/* ST-MFP Modem1 serial port */
 		atari_init_mfp_port(B9600|CS8);
 		atari_console_driver.write = atari_mfp_console_write;
-	} else if (!strcmp(m68k_debug_device, "ser2")) {
+	} else if (!strcmp(arg, "ser2")) {
 		/* SCC Modem2 serial port */
 		atari_init_scc_port(B9600|CS8);
 		atari_console_driver.write = atari_scc_console_write;
-	} else if (!strcmp(m68k_debug_device, "midi")) {
+	} else if (!strcmp(arg, "midi")) {
 		/* MIDI port */
 		atari_init_midi_port(B9600|CS8);
 		atari_console_driver.write = atari_midi_console_write;
-	} else if (!strcmp(m68k_debug_device, "par")) {
+	} else if (!strcmp(arg, "par")) {
 		/* parallel printer */
 		atari_turnoff_irq(IRQ_MFP_BUSY); /* avoid ints */
 		sound_ym.rd_data_reg_sel = 7;	/* select mixer control */
@@ -337,4 +337,8 @@
 	}
 	if (atari_console_driver.write)
 		register_console(&atari_console_driver);
+
+	return 0;
 }
+
+early_param("debug", atari_debug_setup);
diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c
index 852cefe..9b307a5 100644
--- a/arch/m68k/kernel/setup.c
+++ b/arch/m68k/kernel/setup.c
@@ -71,9 +71,6 @@
 
 static char m68k_command_line[CL_SIZE];
 
-char m68k_debug_device[6] = "";
-EXPORT_SYMBOL(m68k_debug_device);
-
 void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL;
 /* machine dependent irq functions */
 void (*mach_init_IRQ) (void) __initdata = NULL;
@@ -215,7 +212,6 @@
 	unsigned long endmem, startmem;
 #endif
 	int i;
-	char *p, *q;
 
 	/* The bootinfo is located right after the kernel bss */
 	m68k_parse_bootinfo((const struct bi_record *)&_end);
@@ -258,40 +254,7 @@
 	*cmdline_p = m68k_command_line;
 	memcpy(boot_command_line, *cmdline_p, CL_SIZE);
 
-	/* Parse the command line for arch-specific options.
-	 * For the m68k, this is currently only "debug=xxx" to enable printing
-	 * certain kernel messages to some machine-specific device.
-	 */
-	for (p = *cmdline_p; p && *p;) {
-		i = 0;
-		if (!strncmp(p, "debug=", 6)) {
-			strlcpy(m68k_debug_device, p+6, sizeof(m68k_debug_device));
-			q = strchr(m68k_debug_device, ' ');
-			if (q)
-				*q = 0;
-			i = 1;
-		}
-#ifdef CONFIG_ATARI
-		/* This option must be parsed very early */
-		if (!strncmp(p, "switches=", 9)) {
-			extern void atari_switches_setup(const char *, int);
-			q = strchr(p + 9, ' ');
-			atari_switches_setup(p + 9, q ? (q - (p + 9)) : strlen(p + 9));
-			i = 1;
-		}
-#endif
-
-		if (i) {
-			/* option processed, delete it */
-			if ((q = strchr(p, ' ')))
-				strcpy(p, q + 1);
-			else
-				*p = 0;
-		} else {
-			if ((p = strchr(p, ' ')))
-				++p;
-		}
-	}
+	parse_early_param();
 
 #ifdef CONFIG_DUMMY_CONSOLE
 	conswitchp = &dummy_con;
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index d2fbf43..5fd4132 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -82,10 +82,6 @@
 
 extern void nubus_sweep_video(void);
 
-/* Mac specific debug functions (in debug.c) */
-extern void mac_debug_init(void);
-extern void mac_debugging_long(int, long);
-
 static void mac_get_model(char *str);
 
 static void mac_sched_init(irq_handler_t vector)
@@ -180,9 +176,6 @@
 	mach_halt = mac_poweroff;
 	mach_power_off = mac_poweroff;
 	mach_max_dma_address = 0xffffffff;
-#if 0
-	mach_debug_init	= mac_debug_init;
-#endif
 #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
 	mach_beep = mac_mksound;
 #endif
@@ -802,7 +795,6 @@
 	/* the serial ports set to "Faster" mode in MacOS. */
 
 	iop_preinit();
-	mac_debug_init();
 
 	printk(KERN_INFO "Detected Macintosh model: %d \n", model);
 
diff --git a/arch/m68k/mac/debug.c b/arch/m68k/mac/debug.c
index 8399032..7a5bed5 100644
--- a/arch/m68k/mac/debug.c
+++ b/arch/m68k/mac/debug.c
@@ -27,10 +27,6 @@
 #include <asm/machw.h>
 #include <asm/macints.h>
 
-extern char m68k_debug_device[];
-
-extern struct compat_bootinfo compat_boot_info;
-
 extern unsigned long mac_videobase;
 extern unsigned long mac_videodepth;
 extern unsigned long mac_rowbytes;
@@ -360,16 +356,18 @@
 	mac_init_scc_port(cflag, 1);
 }
 
-void __init mac_debug_init(void)
+static int __init mac_debug_setup(char *arg)
 {
+	if (!MACH_IS_MAC)
+		return 0;
+
 #ifdef DEBUG_SERIAL
-	if (!strcmp(m68k_debug_device, "ser") ||
-            !strcmp(m68k_debug_device, "ser1")) {
+	if (!strcmp(arg, "ser") || !strcmp(arg, "ser1")) {
 		/* Mac modem port */
 		mac_init_scc_port(B9600|CS8, 0);
 		mac_console_driver.write = mac_scca_console_write;
 		scc_port = 0;
-	} else if (!strcmp(m68k_debug_device, "ser2")) {
+	} else if (!strcmp(arg, "ser2")) {
 		/* Mac printer port */
 		mac_init_scc_port(B9600|CS8, 1);
 		mac_console_driver.write = mac_sccb_console_write;
@@ -377,12 +375,14 @@
 	}
 #endif
 #ifdef DEBUG_HEADS
-	if (!strcmp(m68k_debug_device, "scn") ||
-	    !strcmp(m68k_debug_device, "con")) {
+	if (!strcmp(arg, "scn") || !strcmp(arg, "con")) {
 		/* display, using head.S console routines */
 		mac_console_driver.write = mac_debug_console_write;
 	}
 #endif
 	if (mac_console_driver.write)
 		register_console(&mac_console_driver);
+	return 0;
 }
+
+early_param("debug", mac_debug_setup);
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 @@
 
 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 @@
 
 static struct console q40_console_driver = {
 	.name	= "debug",
+	.write	= q40_mem_console_write,
 	.flags	= CON_PRINTBUFFER,
 	.index	= -1,
 };
@@ -85,6 +85,19 @@
 	}
 }
 
+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 @@
 	 * 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);
-	}
 }
 
 
diff --git a/arch/m68k/sun3x/prom.c b/arch/m68k/sun3x/prom.c
index f23d425..48f8eb7 100644
--- a/arch/m68k/sun3x/prom.c
+++ b/arch/m68k/sun3x/prom.c
@@ -73,8 +73,6 @@
 	(*romvec->pv_reboot)("vmlinux");
 }
 
-extern char m68k_debug_device[];
-
 static void sun3x_prom_write(struct console *co, const char *s,
                              unsigned int count)
 {
@@ -119,13 +117,18 @@
 	 * XXX this is futile since we restore the vbr first - oops
 	 */
 	vectors[VEC_TRAP14] = sun3x_prom_abort;
-
-	/* If debug=prom was specified, start the debug console */
-
-	if (!strcmp(m68k_debug_device, "prom"))
-		register_console(&sun3x_debug);
 }
 
+static int __init sun3x_debug_setup(char *arg)
+{
+	/* If debug=prom was specified, start the debug console */
+	if (MACH_IS_SUN3X && !strcmp(arg, "prom"))
+		register_console(&sun3x_debug);
+	return 0;
+}
+
+early_param("debug", sun3x_debug_setup);
+
 /* some prom functions to export */
 int prom_getintdefault(int node, char *property, int deflt)
 {
