diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-20 00:09:43 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-20 00:09:43 +0100 |
commit | b31a3bc3dbd2f42b61674d37de7f46022e1f6846 (patch) | |
tree | f497661f34009eff1455df8729ce750fdddad7e5 /arch/sh/kernel/setup.c | |
parent | Merge tag 'powerpc-4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/po... (diff) | |
parent | sched/preempt, sh: kmap_coherent relies on disabled preemption (diff) | |
download | linux-b31a3bc3dbd2f42b61674d37de7f46022e1f6846.tar.xz linux-b31a3bc3dbd2f42b61674d37de7f46022e1f6846.zip |
Merge tag 'tag-sh-for-4.6' of git://git.libc.org/linux-sh
Pull arch/sh updates from Rich Felker:
"This includes minor cleanups, a fix for a crash that likely affects
all sh models with MMU, and introduction of a framework for boards
described by device tree, which sets the stage for future J2 support"
* tag 'tag-sh-for-4.6' of git://git.libc.org/linux-sh:
sched/preempt, sh: kmap_coherent relies on disabled preemption
sh: add SMP method selection to device tree pseudo-board
sh: add device tree support and generic board using device tree
sh: remove arch-specific localtimer and use generic one
sh: make MMU-specific SMP code conditional on CONFIG_MMU
sh: provide unified syscall trap compatible with all SH models
sh: New gcc support
sh: Disable trace for kernel uncompressing.
sh: Use generic clkdev.h header
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r-- | arch/sh/kernel/setup.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 3f1c18b28e8a..5d34605b58b5 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -29,6 +29,8 @@ #include <linux/delay.h> #include <linux/platform_device.h> #include <linux/memblock.h> +#include <linux/of.h> +#include <linux/of_fdt.h> #include <asm/uaccess.h> #include <asm/io.h> #include <asm/page.h> @@ -172,6 +174,7 @@ disable: #endif } +#ifndef CONFIG_GENERIC_CALIBRATE_DELAY void calibrate_delay(void) { struct clk *clk = clk_get(NULL, "cpu_clk"); @@ -187,6 +190,7 @@ void calibrate_delay(void) (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy); } +#endif void __init __add_active_range(unsigned int nid, unsigned long start_pfn, unsigned long end_pfn) @@ -238,6 +242,29 @@ void __init __weak plat_early_device_setup(void) { } +#ifdef CONFIG_OF +void __ref sh_fdt_init(phys_addr_t dt_phys) +{ + static int done = 0; + void *dt_virt; + + /* Avoid calling an __init function on secondary cpus. */ + if (done) return; + + dt_virt = phys_to_virt(dt_phys); + + if (!dt_virt || !early_init_dt_scan(dt_virt)) { + pr_crit("Error: invalid device tree blob" + " at physical address %p\n", (void *)dt_phys); + + while (true) + cpu_relax(); + } + + done = 1; +} +#endif + void __init setup_arch(char **cmdline_p) { enable_mmu(); |