.. | .. |
---|
43 | 43 | #include <asm/smp.h> |
---|
44 | 44 | #include <asm/mmu_context.h> |
---|
45 | 45 | #include <asm/mmzone.h> |
---|
| 46 | +#include <asm/processor.h> |
---|
46 | 47 | #include <asm/sparsemem.h> |
---|
47 | 48 | #include <asm/platform_early.h> |
---|
48 | 49 | |
---|
.. | .. |
---|
244 | 245 | { |
---|
245 | 246 | } |
---|
246 | 247 | |
---|
247 | | -#ifdef CONFIG_OF_FLATTREE |
---|
| 248 | +#ifdef CONFIG_OF_EARLY_FLATTREE |
---|
248 | 249 | void __ref sh_fdt_init(phys_addr_t dt_phys) |
---|
249 | 250 | { |
---|
250 | 251 | static int done = 0; |
---|
.. | .. |
---|
329 | 330 | /* Let earlyprintk output early console messages */ |
---|
330 | 331 | sh_early_platform_driver_probe("earlyprintk", 1, 1); |
---|
331 | 332 | |
---|
332 | | -#ifdef CONFIG_OF_FLATTREE |
---|
| 333 | +#ifdef CONFIG_OF_EARLY_FLATTREE |
---|
333 | 334 | #ifdef CONFIG_USE_BUILTIN_DTB |
---|
334 | 335 | unflatten_and_copy_device_tree(); |
---|
335 | 336 | #else |
---|
.. | .. |
---|
357 | 358 | { |
---|
358 | 359 | return sh_mv.mv_mode_pins() & pin; |
---|
359 | 360 | } |
---|
| 361 | + |
---|
| 362 | +void __init arch_cpu_finalize_init(void) |
---|
| 363 | +{ |
---|
| 364 | + char *p = &init_utsname()->machine[2]; /* "sh" */ |
---|
| 365 | + |
---|
| 366 | + select_idle_routine(); |
---|
| 367 | + |
---|
| 368 | + current_cpu_data.loops_per_jiffy = loops_per_jiffy; |
---|
| 369 | + |
---|
| 370 | + switch (current_cpu_data.family) { |
---|
| 371 | + case CPU_FAMILY_SH2: |
---|
| 372 | + *p++ = '2'; |
---|
| 373 | + break; |
---|
| 374 | + case CPU_FAMILY_SH2A: |
---|
| 375 | + *p++ = '2'; |
---|
| 376 | + *p++ = 'a'; |
---|
| 377 | + break; |
---|
| 378 | + case CPU_FAMILY_SH3: |
---|
| 379 | + *p++ = '3'; |
---|
| 380 | + break; |
---|
| 381 | + case CPU_FAMILY_SH4: |
---|
| 382 | + *p++ = '4'; |
---|
| 383 | + break; |
---|
| 384 | + case CPU_FAMILY_SH4A: |
---|
| 385 | + *p++ = '4'; |
---|
| 386 | + *p++ = 'a'; |
---|
| 387 | + break; |
---|
| 388 | + case CPU_FAMILY_SH4AL_DSP: |
---|
| 389 | + *p++ = '4'; |
---|
| 390 | + *p++ = 'a'; |
---|
| 391 | + *p++ = 'l'; |
---|
| 392 | + *p++ = '-'; |
---|
| 393 | + *p++ = 'd'; |
---|
| 394 | + *p++ = 's'; |
---|
| 395 | + *p++ = 'p'; |
---|
| 396 | + break; |
---|
| 397 | + case CPU_FAMILY_UNKNOWN: |
---|
| 398 | + /* |
---|
| 399 | + * Specifically use CPU_FAMILY_UNKNOWN rather than |
---|
| 400 | + * default:, so we're able to have the compiler whine |
---|
| 401 | + * about unhandled enumerations. |
---|
| 402 | + */ |
---|
| 403 | + break; |
---|
| 404 | + } |
---|
| 405 | + |
---|
| 406 | + pr_info("CPU: %s\n", get_cpu_subtype(¤t_cpu_data)); |
---|
| 407 | + |
---|
| 408 | +#ifndef __LITTLE_ENDIAN__ |
---|
| 409 | + /* 'eb' means 'Endian Big' */ |
---|
| 410 | + *p++ = 'e'; |
---|
| 411 | + *p++ = 'b'; |
---|
| 412 | +#endif |
---|
| 413 | + *p = '\0'; |
---|
| 414 | +} |
---|