diff options
Diffstat (limited to 'arch/arc/kernel/setup.c')
-rw-r--r-- | arch/arc/kernel/setup.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index 151acf0c9383..f63b8bfefb0c 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/console.h> | 13 | #include <linux/console.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/cpu.h> | 15 | #include <linux/cpu.h> |
16 | #include <linux/clk-provider.h> | ||
17 | #include <linux/of_fdt.h> | 16 | #include <linux/of_fdt.h> |
18 | #include <linux/of_platform.h> | 17 | #include <linux/of_platform.h> |
19 | #include <linux/cache.h> | 18 | #include <linux/cache.h> |
@@ -24,7 +23,6 @@ | |||
24 | #include <asm/page.h> | 23 | #include <asm/page.h> |
25 | #include <asm/irq.h> | 24 | #include <asm/irq.h> |
26 | #include <asm/unwind.h> | 25 | #include <asm/unwind.h> |
27 | #include <asm/clk.h> | ||
28 | #include <asm/mach_desc.h> | 26 | #include <asm/mach_desc.h> |
29 | #include <asm/smp.h> | 27 | #include <asm/smp.h> |
30 | 28 | ||
@@ -220,10 +218,6 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len) | |||
220 | if (tbl->info.id == 0) | 218 | if (tbl->info.id == 0) |
221 | n += scnprintf(buf + n, len - n, "UNKNOWN ARC Processor\n"); | 219 | n += scnprintf(buf + n, len - n, "UNKNOWN ARC Processor\n"); |
222 | 220 | ||
223 | n += scnprintf(buf + n, len - n, "CPU speed\t: %u.%02u Mhz\n", | ||
224 | (unsigned int)(arc_get_core_freq() / 1000000), | ||
225 | (unsigned int)(arc_get_core_freq() / 10000) % 100); | ||
226 | |||
227 | n += scnprintf(buf + n, len - n, "Timers\t\t: %s%s%s%s\nISA Extn\t: ", | 221 | n += scnprintf(buf + n, len - n, "Timers\t\t: %s%s%s%s\nISA Extn\t: ", |
228 | IS_AVAIL1(cpu->extn.timer0, "Timer0 "), | 222 | IS_AVAIL1(cpu->extn.timer0, "Timer0 "), |
229 | IS_AVAIL1(cpu->extn.timer1, "Timer1 "), | 223 | IS_AVAIL1(cpu->extn.timer1, "Timer1 "), |
@@ -314,9 +308,6 @@ static void arc_chk_core_config(void) | |||
314 | if (!cpu->extn.timer1) | 308 | if (!cpu->extn.timer1) |
315 | panic("Timer1 is not present!\n"); | 309 | panic("Timer1 is not present!\n"); |
316 | 310 | ||
317 | if (IS_ENABLED(CONFIG_ARC_HAS_RTC) && !cpu->extn.rtc) | ||
318 | panic("RTC is not present\n"); | ||
319 | |||
320 | #ifdef CONFIG_ARC_HAS_DCCM | 311 | #ifdef CONFIG_ARC_HAS_DCCM |
321 | /* | 312 | /* |
322 | * DCCM can be arbit placed in hardware. | 313 | * DCCM can be arbit placed in hardware. |
@@ -444,7 +435,6 @@ void __init setup_arch(char **cmdline_p) | |||
444 | 435 | ||
445 | static int __init customize_machine(void) | 436 | static int __init customize_machine(void) |
446 | { | 437 | { |
447 | of_clk_init(NULL); | ||
448 | /* | 438 | /* |
449 | * Traverses flattened DeviceTree - registering platform devices | 439 | * Traverses flattened DeviceTree - registering platform devices |
450 | * (if any) complete with their resources | 440 | * (if any) complete with their resources |
@@ -477,6 +467,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
477 | { | 467 | { |
478 | char *str; | 468 | char *str; |
479 | int cpu_id = ptr_to_cpu(v); | 469 | int cpu_id = ptr_to_cpu(v); |
470 | struct device_node *core_clk = of_find_node_by_name(NULL, "core_clk"); | ||
471 | u32 freq = 0; | ||
480 | 472 | ||
481 | if (!cpu_online(cpu_id)) { | 473 | if (!cpu_online(cpu_id)) { |
482 | seq_printf(m, "processor [%d]\t: Offline\n", cpu_id); | 474 | seq_printf(m, "processor [%d]\t: Offline\n", cpu_id); |
@@ -489,6 +481,11 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
489 | 481 | ||
490 | seq_printf(m, arc_cpu_mumbojumbo(cpu_id, str, PAGE_SIZE)); | 482 | seq_printf(m, arc_cpu_mumbojumbo(cpu_id, str, PAGE_SIZE)); |
491 | 483 | ||
484 | of_property_read_u32(core_clk, "clock-frequency", &freq); | ||
485 | if (freq) | ||
486 | seq_printf(m, "CPU speed\t: %u.%02u Mhz\n", | ||
487 | freq / 1000000, (freq / 10000) % 100); | ||
488 | |||
492 | seq_printf(m, "Bogo MIPS\t: %lu.%02lu\n", | 489 | seq_printf(m, "Bogo MIPS\t: %lu.%02lu\n", |
493 | loops_per_jiffy / (500000 / HZ), | 490 | loops_per_jiffy / (500000 / HZ), |
494 | (loops_per_jiffy / (5000 / HZ)) % 100); | 491 | (loops_per_jiffy / (5000 / HZ)) % 100); |