aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/setup.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-19 12:46:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-19 12:46:18 -0400
commit0efacbbaee1e94e9942da0912f5b46ffd45a74bd (patch)
treea17933437de955f4ce5e74760610bab75f2ae385 /arch/arc/kernel/setup.c
parentf4f27d0028aabce57e44c16c2fdefccd6310d2f3 (diff)
parent776d7f1694a7d678291354a05f0243965708306a (diff)
Merge tag 'arc-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Pull ARC updates from Vineet Gupta: "We have a relatively big changeset for ARC for 4.7. The highlight is support for EZChip (now Mellanox) NPS-400 network processor, a 400-Gb throughput C-programmable packet processor based on ARC700 cores from Synopsys. See http://www.mellanox.com/related-docs/prod_npu/PB_NPS-400.pdf Also present are irqchip and clocksource drivers for NPS as agreed with respective maintainers to go via ARC tree due to an soc header dependency. I have the needed ACKs from Jason, Marc, Daniel. You might run into a trivial merge conflict in drivers/irqchip/* This EZChip platform support required some deep changes in ARC architecture code and also opportunity to cleanup past sins (legacy irq domains, missing irq domain lookup, hard coded timer irqs...) Summary: - Support for EZChip (now Mellanox) NPS-400 Network processor based on ARC700 - NPS interrupt controller and clocksource drivers - ARC timers probed off DT - ARC iqrchips switching to linear domain (upgrade from legacy domains)" * tag 'arc-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: (37 commits) arc: axs103_smp: Fix CPU frequency to 100MHz for dual-core arc: axs10x: Add DT bindings for I2S PLL Clock ARC: pae: STRICT_MM_TYPECHECKS was broken ARC: Add eznps platform to Kconfig and Makefile ARC: [plat-eznps] Use dedicated COMMAND_LINE_SIZE ARC: [plat-eznps] Use dedicated cpu_relax() ARC: [plat-eznps] Use dedicated identity auxiliary register. ARC: [plat-eznps] Use dedicated SMP barriers ARC: [plat-eznps] Use dedicated atomic/bitops/cmpxchg ARC: [plat-eznps] Use dedicated user stack top ARC: [plat-eznps] Add eznps platform ARC: [plat-eznps] Add eznps board defconfig and dts ARC: Mark secondary cpu online only after all HW setup is done ARC: rwlock: disable interrupts in !LLSC variant ARC: Make vmalloc size configurable ARC: clean out UAPI byteorder.h clean off Kconfig symbol irqchip: add nps Internal and external irqchips clocksource: Add NPS400 timers driver soc: Support for EZchip SoC Documentation: Add EZchip vendor to binding list ...
Diffstat (limited to 'arch/arc/kernel/setup.c')
-rw-r--r--arch/arc/kernel/setup.c17
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
445static int __init customize_machine(void) 436static 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);