diff options
author | Alexey Brodkin <abrodkin@synopsys.com> | 2016-02-01 09:30:17 -0500 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2016-05-09 00:02:30 -0400 |
commit | 20c7dbbdbe12db75f9e9ac3fd0d713ab95549623 (patch) | |
tree | c23b637b6c47e3cf499d0eb175624c998cb5527d | |
parent | 0e6e9b648d802fe6641fe543b6dc4828baded159 (diff) |
ARC: Don't try to use value of top level clock-frequency in DT
We no longer use it and instead a real clk device such as fixed-clk
instance is fed to timers etc.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
[vgupta: broken out of a bigger patch, rewrote changelog]
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r-- | arch/arc/kernel/setup.c | 12 | ||||
-rw-r--r-- | arch/arc/plat-axs10x/axs10x.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index 91f79fa447bc..f63b8bfefb0c 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | #include <asm/irq.h> | 24 | #include <asm/irq.h> |
25 | #include <asm/unwind.h> | 25 | #include <asm/unwind.h> |
26 | #include <asm/clk.h> | ||
27 | #include <asm/mach_desc.h> | 26 | #include <asm/mach_desc.h> |
28 | #include <asm/smp.h> | 27 | #include <asm/smp.h> |
29 | 28 | ||
@@ -219,10 +218,6 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len) | |||
219 | if (tbl->info.id == 0) | 218 | if (tbl->info.id == 0) |
220 | n += scnprintf(buf + n, len - n, "UNKNOWN ARC Processor\n"); | 219 | n += scnprintf(buf + n, len - n, "UNKNOWN ARC Processor\n"); |
221 | 220 | ||
222 | n += scnprintf(buf + n, len - n, "CPU speed\t: %u.%02u Mhz\n", | ||
223 | (unsigned int)(arc_get_core_freq() / 1000000), | ||
224 | (unsigned int)(arc_get_core_freq() / 10000) % 100); | ||
225 | |||
226 | 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: ", |
227 | IS_AVAIL1(cpu->extn.timer0, "Timer0 "), | 222 | IS_AVAIL1(cpu->extn.timer0, "Timer0 "), |
228 | IS_AVAIL1(cpu->extn.timer1, "Timer1 "), | 223 | IS_AVAIL1(cpu->extn.timer1, "Timer1 "), |
@@ -472,6 +467,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
472 | { | 467 | { |
473 | char *str; | 468 | char *str; |
474 | 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; | ||
475 | 472 | ||
476 | if (!cpu_online(cpu_id)) { | 473 | if (!cpu_online(cpu_id)) { |
477 | seq_printf(m, "processor [%d]\t: Offline\n", cpu_id); | 474 | seq_printf(m, "processor [%d]\t: Offline\n", cpu_id); |
@@ -484,6 +481,11 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
484 | 481 | ||
485 | seq_printf(m, arc_cpu_mumbojumbo(cpu_id, str, PAGE_SIZE)); | 482 | seq_printf(m, arc_cpu_mumbojumbo(cpu_id, str, PAGE_SIZE)); |
486 | 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 | |||
487 | seq_printf(m, "Bogo MIPS\t: %lu.%02lu\n", | 489 | seq_printf(m, "Bogo MIPS\t: %lu.%02lu\n", |
488 | loops_per_jiffy / (500000 / HZ), | 490 | loops_per_jiffy / (500000 / HZ), |
489 | (loops_per_jiffy / (5000 / HZ)) % 100); | 491 | (loops_per_jiffy / (5000 / HZ)) % 100); |
diff --git a/arch/arc/plat-axs10x/axs10x.c b/arch/arc/plat-axs10x/axs10x.c index f90fac271d16..9701c93f315d 100644 --- a/arch/arc/plat-axs10x/axs10x.c +++ b/arch/arc/plat-axs10x/axs10x.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/libfdt.h> | 19 | #include <linux/libfdt.h> |
20 | 20 | ||
21 | #include <asm/asm-offsets.h> | 21 | #include <asm/asm-offsets.h> |
22 | #include <asm/clk.h> | ||
23 | #include <asm/io.h> | 22 | #include <asm/io.h> |
24 | #include <asm/mach_desc.h> | 23 | #include <asm/mach_desc.h> |
25 | #include <asm/mcip.h> | 24 | #include <asm/mcip.h> |
@@ -448,7 +447,6 @@ static void __init axs103_early_init(void) | |||
448 | 447 | ||
449 | /* Patching .dtb in-place with new core clock value */ | 448 | /* Patching .dtb in-place with new core clock value */ |
450 | if (freq != orig ) { | 449 | if (freq != orig ) { |
451 | arc_set_core_freq(freq * 1000000); | ||
452 | freq = cpu_to_be32(freq * 1000000); | 450 | freq = cpu_to_be32(freq * 1000000); |
453 | fdt_setprop_inplace(initial_boot_params, offset, | 451 | fdt_setprop_inplace(initial_boot_params, offset, |
454 | "clock-frequency", &freq, sizeof(freq)); | 452 | "clock-frequency", &freq, sizeof(freq)); |