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>
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)
 {