diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-12-11 19:00:47 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-12-11 19:00:47 -0500 |
commit | b641fe016a29fe2c0c7b0d717a5918e3f067a44f (patch) | |
tree | 461143f1ed3f43dbbb6c5388020e24add1601ce0 /arch/sh/kernel/setup.c | |
parent | e2dfb912d3cea97d8b1d6750abbe9c942b6f73f5 (diff) |
sh: Use early_param() for earlyprintk parsing.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r-- | arch/sh/kernel/setup.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index fe545bbb1e1f..225f9ea5cdd7 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -84,8 +84,7 @@ unsigned long memory_start, memory_end; | |||
84 | 84 | ||
85 | static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | 85 | static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], |
86 | struct sh_machine_vector** mvp, | 86 | struct sh_machine_vector** mvp, |
87 | unsigned long *mv_io_base, | 87 | unsigned long *mv_io_base) |
88 | int *mv_mmio_enable) | ||
89 | { | 88 | { |
90 | char c = ' ', *to = command_line, *from = COMMAND_LINE; | 89 | char c = ' ', *to = command_line, *from = COMMAND_LINE; |
91 | int len = 0; | 90 | int len = 0; |
@@ -112,23 +111,6 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | |||
112 | } | 111 | } |
113 | } | 112 | } |
114 | 113 | ||
115 | #ifdef CONFIG_EARLY_PRINTK | ||
116 | if (c == ' ' && !memcmp(from, "earlyprintk=", 12)) { | ||
117 | char *ep_end; | ||
118 | |||
119 | if (to != command_line) | ||
120 | to--; | ||
121 | |||
122 | from += 12; | ||
123 | ep_end = strchr(from, ' '); | ||
124 | |||
125 | setup_early_printk(from); | ||
126 | printk("early console enabled\n"); | ||
127 | |||
128 | from = ep_end; | ||
129 | } | ||
130 | #endif | ||
131 | |||
132 | if (c == ' ' && !memcmp(from, "sh_mv=", 6)) { | 114 | if (c == ' ' && !memcmp(from, "sh_mv=", 6)) { |
133 | char* mv_end; | 115 | char* mv_end; |
134 | char* mv_comma; | 116 | char* mv_comma; |
@@ -145,7 +127,6 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | |||
145 | int ints[3]; | 127 | int ints[3]; |
146 | get_options(mv_comma+1, ARRAY_SIZE(ints), ints); | 128 | get_options(mv_comma+1, ARRAY_SIZE(ints), ints); |
147 | *mv_io_base = ints[1]; | 129 | *mv_io_base = ints[1]; |
148 | *mv_mmio_enable = ints[2]; | ||
149 | mv_len = mv_comma - from; | 130 | mv_len = mv_comma - from; |
150 | } else { | 131 | } else { |
151 | mv_len = mv_end - from; | 132 | mv_len = mv_end - from; |
@@ -158,6 +139,7 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | |||
158 | 139 | ||
159 | *mvp = get_mv_byname(mv_name); | 140 | *mvp = get_mv_byname(mv_name); |
160 | } | 141 | } |
142 | |||
161 | c = *(from++); | 143 | c = *(from++); |
162 | if (!c) | 144 | if (!c) |
163 | break; | 145 | break; |
@@ -177,9 +159,8 @@ static int __init sh_mv_setup(char **cmdline_p) | |||
177 | struct sh_machine_vector *mv = NULL; | 159 | struct sh_machine_vector *mv = NULL; |
178 | char mv_name[MV_NAME_SIZE] = ""; | 160 | char mv_name[MV_NAME_SIZE] = ""; |
179 | unsigned long mv_io_base = 0; | 161 | unsigned long mv_io_base = 0; |
180 | int mv_mmio_enable = 0; | ||
181 | 162 | ||
182 | parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base, &mv_mmio_enable); | 163 | parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base); |
183 | 164 | ||
184 | #ifdef CONFIG_SH_UNKNOWN | 165 | #ifdef CONFIG_SH_UNKNOWN |
185 | if (mv == NULL) { | 166 | if (mv == NULL) { |
@@ -258,6 +239,7 @@ void __init setup_arch(char **cmdline_p) | |||
258 | 239 | ||
259 | sh_mv_setup(cmdline_p); | 240 | sh_mv_setup(cmdline_p); |
260 | 241 | ||
242 | |||
261 | /* | 243 | /* |
262 | * Find the highest page frame number we have available | 244 | * Find the highest page frame number we have available |
263 | */ | 245 | */ |
@@ -305,6 +287,7 @@ void __init setup_arch(char **cmdline_p) | |||
305 | PFN_PHYS(pages)); | 287 | PFN_PHYS(pages)); |
306 | } | 288 | } |
307 | 289 | ||
290 | |||
308 | /* | 291 | /* |
309 | * Reserve the kernel text and | 292 | * Reserve the kernel text and |
310 | * Reserve the bootmem bitmap. We do this in two steps (first step | 293 | * Reserve the bootmem bitmap. We do this in two steps (first step |