]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ARC: Don't try to use value of top level clock-frequency in DT
authorAlexey Brodkin <abrodkin@synopsys.com>
Mon, 1 Feb 2016 14:30:17 +0000 (17:30 +0300)
committerVineet Gupta <vgupta@synopsys.com>
Mon, 9 May 2016 04:02:30 +0000 (09:32 +0530)
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>
arch/arc/kernel/setup.c
arch/arc/plat-axs10x/axs10x.c

index 91f79fa447bc04dc434b86184561264b69373296..f63b8bfefb0ca789dcbac3ad0459dfc4b3e98760 100644 (file)
@@ -23,7 +23,6 @@
 #include <asm/page.h>
 #include <asm/irq.h>
 #include <asm/unwind.h>
-#include <asm/clk.h>
 #include <asm/mach_desc.h>
 #include <asm/smp.h>
 
@@ -219,10 +218,6 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
        if (tbl->info.id == 0)
                n += scnprintf(buf + n, len - n, "UNKNOWN ARC Processor\n");
 
-       n += scnprintf(buf + n, len - n, "CPU speed\t: %u.%02u Mhz\n",
-                      (unsigned int)(arc_get_core_freq() / 1000000),
-                      (unsigned int)(arc_get_core_freq() / 10000) % 100);
-
        n += scnprintf(buf + n, len - n, "Timers\t\t: %s%s%s%s\nISA Extn\t: ",
                       IS_AVAIL1(cpu->extn.timer0, "Timer0 "),
                       IS_AVAIL1(cpu->extn.timer1, "Timer1 "),
@@ -472,6 +467,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 {
        char *str;
        int cpu_id = ptr_to_cpu(v);
+       struct device_node *core_clk = of_find_node_by_name(NULL, "core_clk");
+       u32 freq = 0;
 
        if (!cpu_online(cpu_id)) {
                seq_printf(m, "processor [%d]\t: Offline\n", cpu_id);
@@ -484,6 +481,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 
        seq_printf(m, arc_cpu_mumbojumbo(cpu_id, str, PAGE_SIZE));
 
+       of_property_read_u32(core_clk, "clock-frequency", &freq);
+       if (freq)
+               seq_printf(m, "CPU speed\t: %u.%02u Mhz\n",
+                          freq / 1000000, (freq / 10000) % 100);
+
        seq_printf(m, "Bogo MIPS\t: %lu.%02lu\n",
                   loops_per_jiffy / (500000 / HZ),
                   (loops_per_jiffy / (5000 / HZ)) % 100);
index f90fac271d166c8c3c6b5415b84df827cfc60961..9701c93f315d5e1a1b19c882b2dce6c0d5e1c24f 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/libfdt.h>
 
 #include <asm/asm-offsets.h>
-#include <asm/clk.h>
 #include <asm/io.h>
 #include <asm/mach_desc.h>
 #include <asm/mcip.h>
@@ -448,7 +447,6 @@ static void __init axs103_early_init(void)
 
        /* Patching .dtb in-place with new core clock value */
        if (freq != orig ) {
-               arc_set_core_freq(freq * 1000000);
                freq = cpu_to_be32(freq * 1000000);
                fdt_setprop_inplace(initial_boot_params, offset,
                                    "clock-frequency", &freq, sizeof(freq));