aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
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
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')
-rw-r--r--arch/m68k/amiga/config.c41
-rw-r--r--arch/m68k/atari/config.c17
-rw-r--r--arch/m68k/atari/debug.c24
-rw-r--r--arch/m68k/kernel/setup.c39
-rw-r--r--arch/m68k/mac/config.c8
-rw-r--r--arch/m68k/mac/debug.c20
-rw-r--r--arch/m68k/q40/config.c23
-rw-r--r--arch/m68k/sun3x/prom.c11
8 files changed, 77 insertions, 106 deletions
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c
index c3b69b1b0cef..35748531327d 100644
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -79,8 +79,6 @@ static char *amiga_models[] __initdata = {
79 79
80static char amiga_model_name[13] = "Amiga "; 80static char amiga_model_name[13] = "Amiga ";
81 81
82extern char m68k_debug_device[];
83
84static void amiga_sched_init(irq_handler_t handler); 82static void amiga_sched_init(irq_handler_t handler);
85/* amiga specific irq functions */ 83/* amiga specific irq functions */
86extern void amiga_init_IRQ(void); 84extern void amiga_init_IRQ(void);
@@ -95,12 +93,10 @@ static unsigned int amiga_get_ss(void);
95extern void amiga_mksound(unsigned int count, unsigned int ticks); 93extern void amiga_mksound(unsigned int count, unsigned int ticks);
96static void amiga_reset(void); 94static void amiga_reset(void);
97extern void amiga_init_sound(void); 95extern void amiga_init_sound(void);
98static void amiga_savekmsg_init(void);
99static void amiga_mem_console_write(struct console *co, const char *b, 96static void amiga_mem_console_write(struct console *co, const char *b,
100 unsigned int count); 97 unsigned int count);
101void amiga_serial_console_write(struct console *co, const char *s, 98void amiga_serial_console_write(struct console *co, const char *s,
102 unsigned int count); 99 unsigned int count);
103static void amiga_debug_init(void);
104#ifdef CONFIG_HEARTBEAT 100#ifdef CONFIG_HEARTBEAT
105static void amiga_heartbeat(int on); 101static void amiga_heartbeat(int on);
106#endif 102#endif
@@ -370,7 +366,6 @@ void __init config_amiga(void)
370{ 366{
371 int i; 367 int i;
372 368
373 amiga_debug_init();
374 amiga_identify(); 369 amiga_identify();
375 370
376 /* Yuk, we don't have PCI memory */ 371 /* Yuk, we don't have PCI memory */
@@ -458,17 +453,6 @@ void __init config_amiga(void)
458 /* initialize chipram allocator */ 453 /* initialize chipram allocator */
459 amiga_chip_init(); 454 amiga_chip_init();
460 455
461 /* debugging using chipram */
462 if (!strcmp(m68k_debug_device, "mem")) {
463 if (!AMIGAHW_PRESENT(CHIP_RAM))
464 printk("Warning: no chipram present for debugging\n");
465 else {
466 amiga_savekmsg_init();
467 amiga_console_driver.write = amiga_mem_console_write;
468 register_console(&amiga_console_driver);
469 }
470 }
471
472 /* our beloved beeper */ 456 /* our beloved beeper */
473 if (AMIGAHW_PRESENT(AMI_AUDIO)) 457 if (AMIGAHW_PRESENT(AMI_AUDIO))
474 amiga_init_sound(); 458 amiga_init_sound();
@@ -787,17 +771,33 @@ static void amiga_mem_console_write(struct console *co, const char *s,
787 } 771 }
788} 772}
789 773
790static void amiga_savekmsg_init(void) 774static int __init amiga_savekmsg_setup(char *arg)
791{ 775{
792 static struct resource debug_res = { .name = "Debug" }; 776 static struct resource debug_res = { .name = "Debug" };
793 777
778 if (!MACH_IS_AMIGA || strcmp(arg, "mem"))
779 goto done;
780
781 if (!AMIGAHW_PRESENT(CHIP_RAM)) {
782 printk("Warning: no chipram present for debugging\n");
783 goto done;
784 }
785
794 savekmsg = amiga_chip_alloc_res(SAVEKMSG_MAXMEM, &debug_res); 786 savekmsg = amiga_chip_alloc_res(SAVEKMSG_MAXMEM, &debug_res);
795 savekmsg->magic1 = SAVEKMSG_MAGIC1; 787 savekmsg->magic1 = SAVEKMSG_MAGIC1;
796 savekmsg->magic2 = SAVEKMSG_MAGIC2; 788 savekmsg->magic2 = SAVEKMSG_MAGIC2;
797 savekmsg->magicptr = ZTWO_PADDR(savekmsg); 789 savekmsg->magicptr = ZTWO_PADDR(savekmsg);
798 savekmsg->size = 0; 790 savekmsg->size = 0;
791
792 amiga_console_driver.write = amiga_mem_console_write;
793 register_console(&amiga_console_driver);
794
795done:
796 return 0;
799} 797}
800 798
799early_param("debug", amiga_savekmsg_setup);
800
801static void amiga_serial_putc(char c) 801static void amiga_serial_putc(char c)
802{ 802{
803 amiga_custom.serdat = (unsigned char)c | 0x100; 803 amiga_custom.serdat = (unsigned char)c | 0x100;
@@ -872,15 +872,18 @@ void amiga_serial_gets(struct console *co, char *s, int len)
872} 872}
873#endif 873#endif
874 874
875static void __init amiga_debug_init(void) 875static int __init amiga_debug_setup(char *arg)
876{ 876{
877 if (!strcmp(m68k_debug_device, "ser" )) { 877 if (MACH_IS_AMIGA && !strcmp(arg, "ser")) {
878 /* no initialization required (?) */ 878 /* no initialization required (?) */
879 amiga_console_driver.write = amiga_serial_console_write; 879 amiga_console_driver.write = amiga_serial_console_write;
880 register_console(&amiga_console_driver); 880 register_console(&amiga_console_driver);
881 } 881 }
882 return 0;
882} 883}
883 884
885early_param("debug", amiga_debug_setup);
886
884#ifdef CONFIG_HEARTBEAT 887#ifdef CONFIG_HEARTBEAT
885static void amiga_heartbeat(int on) 888static void amiga_heartbeat(int on)
886{ 889{
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index b10e7addae5c..e40e5dcaa347 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -69,9 +69,6 @@ extern int atari_tt_hwclk (int, struct rtc_time *);
69extern int atari_mste_set_clock_mmss (unsigned long); 69extern int atari_mste_set_clock_mmss (unsigned long);
70extern int atari_tt_set_clock_mmss (unsigned long); 70extern int atari_tt_set_clock_mmss (unsigned long);
71 71
72/* atari specific debug functions (in debug.c) */
73extern void atari_debug_init(void);
74
75 72
76/* ++roman: This is a more elaborate test for an SCC chip, since the plain 73/* ++roman: This is a more elaborate test for an SCC chip, since the plain
77 * Medusa board generates DTACK at the SCC's standard addresses, but a SCC 74 * Medusa board generates DTACK at the SCC's standard addresses, but a SCC
@@ -137,15 +134,18 @@ int __init atari_parse_bootinfo(const struct bi_record *record)
137 134
138 135
139/* Parse the Atari-specific switches= option. */ 136/* Parse the Atari-specific switches= option. */
140void __init atari_switches_setup(const char *str, unsigned len) 137static int __init atari_switches_setup(char *str)
141{ 138{
142 char switches[len+1]; 139 char switches[strlen(str) + 1];
143 char *p; 140 char *p;
144 int ovsc_shift; 141 int ovsc_shift;
145 char *args = switches; 142 char *args = switches;
146 143
144 if (!MACH_IS_ATARI)
145 return 0;
146
147 /* copy string to local array, strsep works destructively... */ 147 /* copy string to local array, strsep works destructively... */
148 strlcpy(switches, str, sizeof(switches)); 148 strcpy(switches, str);
149 atari_switches = 0; 149 atari_switches = 0;
150 150
151 /* parse the options */ 151 /* parse the options */
@@ -170,8 +170,11 @@ void __init atari_switches_setup(const char *str, unsigned len)
170 atari_switches |= ATARI_SWITCH_SND7 << ovsc_shift; 170 atari_switches |= ATARI_SWITCH_SND7 << ovsc_shift;
171 } 171 }
172 } 172 }
173 return 0;
173} 174}
174 175
176early_param("switches", atari_switches_setup);
177
175 178
176 /* 179 /*
177 * Setup the Atari configuration info 180 * Setup the Atari configuration info
@@ -183,8 +186,6 @@ void __init config_atari(void)
183 186
184 memset(&atari_hw_present, 0, sizeof(atari_hw_present)); 187 memset(&atari_hw_present, 0, sizeof(atari_hw_present));
185 188
186 atari_debug_init();
187
188 /* Change size of I/O space from 64KB to 4GB. */ 189 /* Change size of I/O space from 64KB to 4GB. */
189 ioport_resource.end = 0xFFFFFFFF; 190 ioport_resource.end = 0xFFFFFFFF;
190 191
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);
diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c
index 852cefe7c800..9b307a5f4f22 100644
--- a/arch/m68k/kernel/setup.c
+++ b/arch/m68k/kernel/setup.c
@@ -71,9 +71,6 @@ static struct mem_info m68k_ramdisk;
71 71
72static char m68k_command_line[CL_SIZE]; 72static char m68k_command_line[CL_SIZE];
73 73
74char m68k_debug_device[6] = "";
75EXPORT_SYMBOL(m68k_debug_device);
76
77void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL; 74void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL;
78/* machine dependent irq functions */ 75/* machine dependent irq functions */
79void (*mach_init_IRQ) (void) __initdata = NULL; 76void (*mach_init_IRQ) (void) __initdata = NULL;
@@ -215,7 +212,6 @@ void __init setup_arch(char **cmdline_p)
215 unsigned long endmem, startmem; 212 unsigned long endmem, startmem;
216#endif 213#endif
217 int i; 214 int i;
218 char *p, *q;
219 215
220 /* The bootinfo is located right after the kernel bss */ 216 /* The bootinfo is located right after the kernel bss */
221 m68k_parse_bootinfo((const struct bi_record *)&_end); 217 m68k_parse_bootinfo((const struct bi_record *)&_end);
@@ -258,40 +254,7 @@ void __init setup_arch(char **cmdline_p)
258 *cmdline_p = m68k_command_line; 254 *cmdline_p = m68k_command_line;
259 memcpy(boot_command_line, *cmdline_p, CL_SIZE); 255 memcpy(boot_command_line, *cmdline_p, CL_SIZE);
260 256
261 /* Parse the command line for arch-specific options. 257 parse_early_param();
262 * For the m68k, this is currently only "debug=xxx" to enable printing
263 * certain kernel messages to some machine-specific device.
264 */
265 for (p = *cmdline_p; p && *p;) {
266 i = 0;
267 if (!strncmp(p, "debug=", 6)) {
268 strlcpy(m68k_debug_device, p+6, sizeof(m68k_debug_device));
269 q = strchr(m68k_debug_device, ' ');
270 if (q)
271 *q = 0;
272 i = 1;
273 }
274#ifdef CONFIG_ATARI
275 /* This option must be parsed very early */
276 if (!strncmp(p, "switches=", 9)) {
277 extern void atari_switches_setup(const char *, int);
278 q = strchr(p + 9, ' ');
279 atari_switches_setup(p + 9, q ? (q - (p + 9)) : strlen(p + 9));
280 i = 1;
281 }
282#endif
283
284 if (i) {
285 /* option processed, delete it */
286 if ((q = strchr(p, ' ')))
287 strcpy(p, q + 1);
288 else
289 *p = 0;
290 } else {
291 if ((p = strchr(p, ' ')))
292 ++p;
293 }
294 }
295 258
296#ifdef CONFIG_DUMMY_CONSOLE 259#ifdef CONFIG_DUMMY_CONSOLE
297 conswitchp = &dummy_con; 260 conswitchp = &dummy_con;
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index d2fbf436a1fb..5fd413246f89 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -82,10 +82,6 @@ extern void mac_mksound(unsigned int, unsigned int);
82 82
83extern void nubus_sweep_video(void); 83extern void nubus_sweep_video(void);
84 84
85/* Mac specific debug functions (in debug.c) */
86extern void mac_debug_init(void);
87extern void mac_debugging_long(int, long);
88
89static void mac_get_model(char *str); 85static void mac_get_model(char *str);
90 86
91static void mac_sched_init(irq_handler_t vector) 87static void mac_sched_init(irq_handler_t vector)
@@ -180,9 +176,6 @@ void __init config_mac(void)
180 mach_halt = mac_poweroff; 176 mach_halt = mac_poweroff;
181 mach_power_off = mac_poweroff; 177 mach_power_off = mac_poweroff;
182 mach_max_dma_address = 0xffffffff; 178 mach_max_dma_address = 0xffffffff;
183#if 0
184 mach_debug_init = mac_debug_init;
185#endif
186#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) 179#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
187 mach_beep = mac_mksound; 180 mach_beep = mac_mksound;
188#endif 181#endif
@@ -802,7 +795,6 @@ void mac_identify(void)
802 /* the serial ports set to "Faster" mode in MacOS. */ 795 /* the serial ports set to "Faster" mode in MacOS. */
803 796
804 iop_preinit(); 797 iop_preinit();
805 mac_debug_init();
806 798
807 printk(KERN_INFO "Detected Macintosh model: %d \n", model); 799 printk(KERN_INFO "Detected Macintosh model: %d \n", model);
808 800
diff --git a/arch/m68k/mac/debug.c b/arch/m68k/mac/debug.c
index 83990326099b..7a5bed5bdc57 100644
--- a/arch/m68k/mac/debug.c
+++ b/arch/m68k/mac/debug.c
@@ -27,10 +27,6 @@
27#include <asm/machw.h> 27#include <asm/machw.h>
28#include <asm/macints.h> 28#include <asm/macints.h>
29 29
30extern char m68k_debug_device[];
31
32extern struct compat_bootinfo compat_boot_info;
33
34extern unsigned long mac_videobase; 30extern unsigned long mac_videobase;
35extern unsigned long mac_videodepth; 31extern unsigned long mac_videodepth;
36extern unsigned long mac_rowbytes; 32extern unsigned long mac_rowbytes;
@@ -360,16 +356,18 @@ void mac_init_sccb_port(int cflag)
360 mac_init_scc_port(cflag, 1); 356 mac_init_scc_port(cflag, 1);
361} 357}
362 358
363void __init mac_debug_init(void) 359static int __init mac_debug_setup(char *arg)
364{ 360{
361 if (!MACH_IS_MAC)
362 return 0;
363
365#ifdef DEBUG_SERIAL 364#ifdef DEBUG_SERIAL
366 if (!strcmp(m68k_debug_device, "ser") || 365 if (!strcmp(arg, "ser") || !strcmp(arg, "ser1")) {
367 !strcmp(m68k_debug_device, "ser1")) {
368 /* Mac modem port */ 366 /* Mac modem port */
369 mac_init_scc_port(B9600|CS8, 0); 367 mac_init_scc_port(B9600|CS8, 0);
370 mac_console_driver.write = mac_scca_console_write; 368 mac_console_driver.write = mac_scca_console_write;
371 scc_port = 0; 369 scc_port = 0;
372 } else if (!strcmp(m68k_debug_device, "ser2")) { 370 } else if (!strcmp(arg, "ser2")) {
373 /* Mac printer port */ 371 /* Mac printer port */
374 mac_init_scc_port(B9600|CS8, 1); 372 mac_init_scc_port(B9600|CS8, 1);
375 mac_console_driver.write = mac_sccb_console_write; 373 mac_console_driver.write = mac_sccb_console_write;
@@ -377,12 +375,14 @@ void __init mac_debug_init(void)
377 } 375 }
378#endif 376#endif
379#ifdef DEBUG_HEADS 377#ifdef DEBUG_HEADS
380 if (!strcmp(m68k_debug_device, "scn") || 378 if (!strcmp(arg, "scn") || !strcmp(arg, "con")) {
381 !strcmp(m68k_debug_device, "con")) {
382 /* display, using head.S console routines */ 379 /* display, using head.S console routines */
383 mac_console_driver.write = mac_debug_console_write; 380 mac_console_driver.write = mac_debug_console_write;
384 } 381 }
385#endif 382#endif
386 if (mac_console_driver.write) 383 if (mac_console_driver.write)
387 register_console(&mac_console_driver); 384 register_console(&mac_console_driver);
385 return 0;
388} 386}
387
388early_param("debug", mac_debug_setup);
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
55extern void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/); 55extern void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/);
56 56
57extern char m68k_debug_device[];
58static void q40_mem_console_write(struct console *co, const char *b, 57static 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
63static struct console q40_console_driver = { 62static 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
88static 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
99early_param("debug", q40_debug_setup);
100
88#if 0 101#if 0
89void printq40(char *str) 102void 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
diff --git a/arch/m68k/sun3x/prom.c b/arch/m68k/sun3x/prom.c
index f23d4255a6fa..48f8eb7b1565 100644
--- a/arch/m68k/sun3x/prom.c
+++ b/arch/m68k/sun3x/prom.c
@@ -73,8 +73,6 @@ void sun3x_reboot(void)
73 (*romvec->pv_reboot)("vmlinux"); 73 (*romvec->pv_reboot)("vmlinux");
74} 74}
75 75
76extern char m68k_debug_device[];
77
78static void sun3x_prom_write(struct console *co, const char *s, 76static void sun3x_prom_write(struct console *co, const char *s,
79 unsigned int count) 77 unsigned int count)
80{ 78{
@@ -119,13 +117,18 @@ void sun3x_prom_init(void)
119 * XXX this is futile since we restore the vbr first - oops 117 * XXX this is futile since we restore the vbr first - oops
120 */ 118 */
121 vectors[VEC_TRAP14] = sun3x_prom_abort; 119 vectors[VEC_TRAP14] = sun3x_prom_abort;
120}
122 121
122static int __init sun3x_debug_setup(char *arg)
123{
123 /* If debug=prom was specified, start the debug console */ 124 /* If debug=prom was specified, start the debug console */
124 125 if (MACH_IS_SUN3X && !strcmp(arg, "prom"))
125 if (!strcmp(m68k_debug_device, "prom"))
126 register_console(&sun3x_debug); 126 register_console(&sun3x_debug);
127 return 0;
127} 128}
128 129
130early_param("debug", sun3x_debug_setup);
131
129/* some prom functions to export */ 132/* some prom functions to export */
130int prom_getintdefault(int node, char *property, int deflt) 133int prom_getintdefault(int node, char *property, int deflt)
131{ 134{