diff options
Diffstat (limited to 'arch/sh/kernel/setup.c')
| -rw-r--r-- | arch/sh/kernel/setup.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 04a6004fccc4..dd38338553ef 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/mmzone.h> | 29 | #include <linux/mmzone.h> |
| 30 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
| 31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
| 32 | #include <linux/platform_device.h> | ||
| 32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
| 33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
| 34 | #include <asm/page.h> | 35 | #include <asm/page.h> |
| @@ -155,7 +156,7 @@ static void __init reserve_crashkernel(void) | |||
| 155 | &crash_size, &crash_base); | 156 | &crash_size, &crash_base); |
| 156 | if (ret == 0 && crash_size) { | 157 | if (ret == 0 && crash_size) { |
| 157 | if (crash_base <= 0) { | 158 | if (crash_base <= 0) { |
| 158 | vp = alloc_bootmem_nopanic(crash_size); | 159 | vp = alloc_bootmem_nopanic(crash_size); |
| 159 | if (!vp) { | 160 | if (!vp) { |
| 160 | printk(KERN_INFO "crashkernel allocation " | 161 | printk(KERN_INFO "crashkernel allocation " |
| 161 | "failed\n"); | 162 | "failed\n"); |
| @@ -184,7 +185,6 @@ static inline void __init reserve_crashkernel(void) | |||
| 184 | {} | 185 | {} |
| 185 | #endif | 186 | #endif |
| 186 | 187 | ||
| 187 | #ifndef CONFIG_GENERIC_CALIBRATE_DELAY | ||
| 188 | void __cpuinit calibrate_delay(void) | 188 | void __cpuinit calibrate_delay(void) |
| 189 | { | 189 | { |
| 190 | struct clk *clk = clk_get(NULL, "cpu_clk"); | 190 | struct clk *clk = clk_get(NULL, "cpu_clk"); |
| @@ -200,7 +200,6 @@ void __cpuinit calibrate_delay(void) | |||
| 200 | (loops_per_jiffy/(5000/HZ)) % 100, | 200 | (loops_per_jiffy/(5000/HZ)) % 100, |
| 201 | loops_per_jiffy); | 201 | loops_per_jiffy); |
| 202 | } | 202 | } |
| 203 | #endif | ||
| 204 | 203 | ||
| 205 | void __init __add_active_range(unsigned int nid, unsigned long start_pfn, | 204 | void __init __add_active_range(unsigned int nid, unsigned long start_pfn, |
| 206 | unsigned long end_pfn) | 205 | unsigned long end_pfn) |
| @@ -328,6 +327,10 @@ static int __init parse_elfcorehdr(char *arg) | |||
| 328 | early_param("elfcorehdr", parse_elfcorehdr); | 327 | early_param("elfcorehdr", parse_elfcorehdr); |
| 329 | #endif | 328 | #endif |
| 330 | 329 | ||
| 330 | void __init __attribute__ ((weak)) plat_early_device_setup(void) | ||
| 331 | { | ||
| 332 | } | ||
| 333 | |||
| 331 | void __init setup_arch(char **cmdline_p) | 334 | void __init setup_arch(char **cmdline_p) |
| 332 | { | 335 | { |
| 333 | enable_mmu(); | 336 | enable_mmu(); |
| @@ -381,6 +384,8 @@ void __init setup_arch(char **cmdline_p) | |||
| 381 | 384 | ||
| 382 | parse_early_param(); | 385 | parse_early_param(); |
| 383 | 386 | ||
| 387 | plat_early_device_setup(); | ||
| 388 | |||
| 384 | sh_mv_setup(); | 389 | sh_mv_setup(); |
| 385 | 390 | ||
| 386 | /* | 391 | /* |
| @@ -415,6 +420,18 @@ void __init setup_arch(char **cmdline_p) | |||
| 415 | #endif | 420 | #endif |
| 416 | } | 421 | } |
| 417 | 422 | ||
| 423 | /* processor boot mode configuration */ | ||
| 424 | int generic_mode_pins(void) | ||
| 425 | { | ||
| 426 | pr_warning("generic_mode_pins(): missing mode pin configuration\n"); | ||
| 427 | return 0; | ||
| 428 | } | ||
| 429 | |||
| 430 | int test_mode_pin(int pin) | ||
| 431 | { | ||
| 432 | return sh_mv.mv_mode_pins() & pin; | ||
| 433 | } | ||
| 434 | |||
| 418 | static const char *cpu_name[] = { | 435 | static const char *cpu_name[] = { |
| 419 | [CPU_SH7201] = "SH7201", | 436 | [CPU_SH7201] = "SH7201", |
| 420 | [CPU_SH7203] = "SH7203", [CPU_SH7263] = "SH7263", | 437 | [CPU_SH7203] = "SH7203", [CPU_SH7263] = "SH7263", |
| @@ -435,7 +452,8 @@ static const char *cpu_name[] = { | |||
| 435 | [CPU_SH7722] = "SH7722", [CPU_SHX3] = "SH-X3", | 452 | [CPU_SH7722] = "SH7722", [CPU_SHX3] = "SH-X3", |
| 436 | [CPU_SH5_101] = "SH5-101", [CPU_SH5_103] = "SH5-103", | 453 | [CPU_SH5_101] = "SH5-101", [CPU_SH5_103] = "SH5-103", |
| 437 | [CPU_MXG] = "MX-G", [CPU_SH7723] = "SH7723", | 454 | [CPU_MXG] = "MX-G", [CPU_SH7723] = "SH7723", |
| 438 | [CPU_SH7366] = "SH7366", [CPU_SH_NONE] = "Unknown" | 455 | [CPU_SH7366] = "SH7366", [CPU_SH7724] = "SH7724", |
| 456 | [CPU_SH_NONE] = "Unknown" | ||
| 439 | }; | 457 | }; |
| 440 | 458 | ||
| 441 | const char *get_cpu_subtype(struct sh_cpuinfo *c) | 459 | const char *get_cpu_subtype(struct sh_cpuinfo *c) |
