diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2007-05-01 16:32:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 20:59:06 -0400 |
commit | d6713b4091a99fa2af2fabdcd2f3fb97f32ecf2e (patch) | |
tree | 7cabd0ff35f9ec4413ba936ddb203d13dffb1550 /arch/m68k/kernel/setup.c | |
parent | f8744bc95dac461cef40df7143756d1bfa393991 (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/kernel/setup.c')
-rw-r--r-- | arch/m68k/kernel/setup.c | 39 |
1 files changed, 1 insertions, 38 deletions
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 | ||
72 | static char m68k_command_line[CL_SIZE]; | 72 | static char m68k_command_line[CL_SIZE]; |
73 | 73 | ||
74 | char m68k_debug_device[6] = ""; | ||
75 | EXPORT_SYMBOL(m68k_debug_device); | ||
76 | |||
77 | void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL; | 74 | void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL; |
78 | /* machine dependent irq functions */ | 75 | /* machine dependent irq functions */ |
79 | void (*mach_init_IRQ) (void) __initdata = NULL; | 76 | void (*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; |