From 75305275a721d33ae9abfaeed2817cec8b2fee9a Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 15 Nov 2015 10:39:53 +0900 Subject: ARM: use const and __initconst for smp_operations These smp_operations structures are not over-written, so add "const" qualifier and replace __initdata with __initconst. Also, add "static" where it is possible. Signed-off-by: Masahiro Yamada Acked-by: Krzysztof Kozlowski Acked-by: Maxime Ripard Acked-by: Moritz Fischer Acked-by: Stephen Boyd # qcom part Acked-by: Viresh Kumar Acked-by: Patrice Chotard Acked-by: Heiko Stuebner Acked-by: Wei Xu Acked-by: Florian Fainelli Acked-by: Sebastian Hesselbarth Acked-by: Gregory CLEMENT Acked-by: Shawn Guo Acked-by: Matthias Brugger Acked-by: Thierry Reding Acked-by: Nicolas Pitre Acked-by: Liviu Dudau Acked-by: Linus Walleij Signed-off-by: Arnd Bergmann --- arch/arm/mach-ux500/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-ux500') diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index 70766b963758..88b8ab4f300c 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c @@ -98,7 +98,7 @@ static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle) return 0; } -struct smp_operations ux500_smp_ops __initdata = { +static const struct smp_operations ux500_smp_ops __initconst = { .smp_prepare_cpus = ux500_smp_prepare_cpus, .smp_boot_secondary = ux500_boot_secondary, #ifdef CONFIG_HOTPLUG_CPU -- cgit v1.2.3 From 9d2aa8c7961ae9af5f75af2dc171dd4e4f441e89 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 1 Dec 2015 15:00:24 +0100 Subject: ARM/clocksource: use automatic DT probing for ux500 PRCMU The ARM core kernel already calls clocksource_of_init() so why go to all the trouble of locating and probing this node in the machine. CLOCKSOURCE_OF_DECLARE() will take care of it in the clocksource driver, and thus we can also get rid of the dangling header file Suggested-by: Arnd Bergmann Acked-by: Thomas Gleixner Acked-by: Daniel Lezcano Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann --- arch/arm/mach-ux500/Makefile | 2 +- arch/arm/mach-ux500/cpu-db8500.c | 2 -- arch/arm/mach-ux500/cpu.c | 1 - arch/arm/mach-ux500/setup.h | 3 --- arch/arm/mach-ux500/timer.c | 48 ---------------------------------------- 5 files changed, 1 insertion(+), 55 deletions(-) delete mode 100644 arch/arm/mach-ux500/timer.c (limited to 'arch/arm/mach-ux500') diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile index c8643ac5db71..edfff1ae1f8d 100644 --- a/arch/arm/mach-ux500/Makefile +++ b/arch/arm/mach-ux500/Makefile @@ -2,7 +2,7 @@ # Makefile for the linux kernel, U8500 machine. # -obj-y := cpu.o id.o timer.o pm.o +obj-y := cpu.o id.o pm.o obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o obj-$(CONFIG_MACH_MOP500) += board-mop500-regulators.o \ diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index f80560318c58..a0ffaad1fb61 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -156,8 +156,6 @@ static const char * stericsson_dt_platform_compat[] = { DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)") .map_io = u8500_map_io, .init_irq = ux500_init_irq, - /* we re-use nomadik timer here */ - .init_time = ux500_timer_init, .init_machine = u8500_init_machine, .init_late = NULL, .dt_compat = stericsson_dt_platform_compat, diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 41b81c4fbe63..82156cbc22ce 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/arm/mach-ux500/setup.h b/arch/arm/mach-ux500/setup.h index 65876eac0761..c704254ab67c 100644 --- a/arch/arm/mach-ux500/setup.h +++ b/arch/arm/mach-ux500/setup.h @@ -12,7 +12,6 @@ #define __ASM_ARCH_SETUP_H #include -#include #include #include @@ -24,8 +23,6 @@ extern void __init ux500_init_irq(void); extern struct device *ux500_soc_device_init(const char *soc_id); -extern void ux500_timer_init(void); - extern void ux500_cpu_die(unsigned int cpu); #endif /* __ASM_ARCH_SETUP_H */ diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c deleted file mode 100644 index 8d2d233f8e6c..000000000000 --- a/arch/arm/mach-ux500/timer.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) ST-Ericsson SA 2011 - * - * License Terms: GNU General Public License v2 - * Author: Mattias Wallin for ST-Ericsson - */ -#include -#include -#include -#include -#include -#include - -#include "setup.h" - -#include "db8500-regs.h" -#include "id.h" - -static const struct of_device_id prcmu_timer_of_match[] __initconst = { - { .compatible = "stericsson,db8500-prcmu-timer-4", }, - { }, -}; - -void __init ux500_timer_init(void) -{ - void __iomem *prcmu_timer_base; - void __iomem *tmp_base; - struct device_node *np; - - if (cpu_is_u8500_family() || cpu_is_ux540_family()) - prcmu_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE); - else - ux500_unknown_soc(); - - np = of_find_matching_node(NULL, prcmu_timer_of_match); - if (!np) - goto dt_fail; - - tmp_base = of_iomap(np, 0); - if (!tmp_base) - goto dt_fail; - - prcmu_timer_base = tmp_base; - -dt_fail: - clksrc_dbx500_prcmu_init(prcmu_timer_base); - clocksource_probe(); -} -- cgit v1.2.3 From e324654294907a420ab3773efe8849a935f37bf0 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 16 Nov 2015 12:06:10 +0900 Subject: ARM: use "depends on" for SoC configs instead of "if" after prompt Many ARM sub-architectures use prompts followed by "if" conditional, but it is wrong. Please notice the difference between config ARCH_FOO bool "Foo SoCs" if ARCH_MULTI_V7 and config ARCH_FOO bool "Foo SoCs" depends on ARCH_MULTI_V7 These two are *not* equivalent! In the former statement, it is not ARCH_FOO, but its prompt that depends on ARCH_MULTI_V7. So, it is completely valid that ARCH_FOO is selected by another, but ARCH_MULTI_V7 is still disabled. As it is not unmet dependency, Kconfig never warns. This is probably not what you want. The former should be used only when you need to do so, and you really understand what you are doing. (In most cases, it should be wrong!) For enabling/disabling sub-architectures, the latter is always correct. As a good side effect, this commit fixes some entries over 80 columns (mach-imx, mach-integrator, mach-mbevu). [Arnd: I note that there is not really a bug here, according to the discussion that followed, but I can see value in being consistent and in making the lines shorter] Signed-off-by: Masahiro Yamada Acked-by: Maxime Ripard Acked-by: Nicolas Ferre Acked-by: Heiko Stuebner Acked-by: Patrice Chotard Acked-by: Liviu Dudau Acked-by: Krzysztof Kozlowski Acked-by: Jun Nie Acked-by: Matthias Brugger Acked-by: Simon Horman Acked-by: Gregory CLEMENT Acked-by: Shawn Guo Acked-by: Sebastian Hesselbarth Acked-by: Thierry Reding Acked-by: Krzysztof Halasa Acked-by: Maxime Coquelin Signed-off-by: Arnd Bergmann --- arch/arm/mach-ux500/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-ux500') diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index c9ac19b24e5a..a5c3373c7f76 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig @@ -1,6 +1,6 @@ menuconfig ARCH_U8500 - bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7 - depends on MMU + bool "ST-Ericsson U8500 Series" + depends on ARCH_MULTI_V7 && MMU select AB8500_CORE select ABX500_CORE select ARCH_REQUIRE_GPIOLIB -- cgit v1.2.3