diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-03-16 19:35:25 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-03-16 19:35:25 -0400 |
commit | 1f0090a1eaa1b750a2fc5c99c91b790d5322a1fd (patch) | |
tree | c685060f260410e6704c9dfd457ed8c347141f1d /arch/arm/kernel/setup.c | |
parent | 2472f3c8d8fc18b25b2cf1574c036e238187c0ff (diff) | |
parent | 10a8c3839810ac9af1aec836d61b92e7a879f5fa (diff) |
Merge branch 'misc' into devel
Conflicts:
arch/arm/Kconfig
Diffstat (limited to 'arch/arm/kernel/setup.c')
-rw-r--r-- | arch/arm/kernel/setup.c | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 5ea4fb718b97..db2382853450 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -308,7 +308,44 @@ static void __init cacheid_init(void) | |||
308 | * already provide the required functionality. | 308 | * already provide the required functionality. |
309 | */ | 309 | */ |
310 | extern struct proc_info_list *lookup_processor_type(unsigned int); | 310 | extern struct proc_info_list *lookup_processor_type(unsigned int); |
311 | extern struct machine_desc *lookup_machine_type(unsigned int); | 311 | |
312 | static void __init early_print(const char *str, ...) | ||
313 | { | ||
314 | extern void printascii(const char *); | ||
315 | char buf[256]; | ||
316 | va_list ap; | ||
317 | |||
318 | va_start(ap, str); | ||
319 | vsnprintf(buf, sizeof(buf), str, ap); | ||
320 | va_end(ap); | ||
321 | |||
322 | #ifdef CONFIG_DEBUG_LL | ||
323 | printascii(buf); | ||
324 | #endif | ||
325 | printk("%s", buf); | ||
326 | } | ||
327 | |||
328 | static struct machine_desc * __init lookup_machine_type(unsigned int type) | ||
329 | { | ||
330 | extern struct machine_desc __arch_info_begin[], __arch_info_end[]; | ||
331 | struct machine_desc *p; | ||
332 | |||
333 | for (p = __arch_info_begin; p < __arch_info_end; p++) | ||
334 | if (type == p->nr) | ||
335 | return p; | ||
336 | |||
337 | early_print("\n" | ||
338 | "Error: unrecognized/unsupported machine ID (r1 = 0x%08x).\n\n" | ||
339 | "Available machine support:\n\nID (hex)\tNAME\n", type); | ||
340 | |||
341 | for (p = __arch_info_begin; p < __arch_info_end; p++) | ||
342 | early_print("%08x\t%s\n", p->nr, p->name); | ||
343 | |||
344 | early_print("\nPlease check your kernel config and/or bootloader.\n"); | ||
345 | |||
346 | while (true) | ||
347 | /* can't use cpu_relax() here as it may require MMU setup */; | ||
348 | } | ||
312 | 349 | ||
313 | static void __init feat_v6_fixup(void) | 350 | static void __init feat_v6_fixup(void) |
314 | { | 351 | { |