ARM/clocksource: use automatic DT probing for ux500 PRCMU
Subsystems (4)
PATCH 1/1 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 <linux/clksrc-dbx500-prcmu.h>
---
ARM SoC folks: I have only this Ux500 patch queued for v4.5. Can you please apply it directly to the proper place in ARM SoC?
--- 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 ------------------------------- drivers/clocksource/clksrc-dbx500-prcmu.c | 9 ++++-- include/linux/clksrc-dbx500-prcmu.h | 20 ------------- 7 files changed, 7 insertions(+), 78 deletions(-) delete mode 100644 arch/arm/mach-ux500/timer.c delete mode 100644 include/linux/clksrc-dbx500-prcmu.h
arch/arm/mach-ux500/Makefile +1 -1
@@ -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 \
arch/arm/mach-ux500/cpu-db8500.c +0 -2
@@ -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,
arch/arm/mach-ux500/cpu.c +0 -1
@@ -9,7 +9,6 @@#include <linux/platform_device.h> #include <linux/io.h> #include <linux/mfd/dbx500-prcmu.h> -#include <linux/clksrc-dbx500-prcmu.h> #include <linux/sys_soc.h> #include <linux/err.h> #include <linux/slab.h>
arch/arm/mach-ux500/setup.h +0 -3
@@ -12,7 +12,6 @@#define __ASM_ARCH_SETUP_H#include <asm/mach/arch.h> -#include <asm/mach/time.h> #include <linux/init.h> #include <linux/mfd/abx500/ab8500.h>
@@ -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 */
arch/arm/mach-ux500/timer.c deleted +0 -48
48 lines not on this page · raw message
drivers/clocksource/clksrc-dbx500-prcmu.c +6 -3
@@ -12,8 +12,9 @@* power domain. We use the Timer 4 for our always-on clock * source on DB8500. */ +#include <linux/of.h> +#include <linux/of_address.h> #include <linux/clockchips.h> -#include <linux/clksrc-dbx500-prcmu.h> #include <linux/sched_clock.h> #define RATE_32K 32768
@@ -63,9 +64,9 @@ static u64 notrace dbx500_prcmu_sched_clock_read(void)#endif -void __init clksrc_dbx500_prcmu_init (void __iomem *base) +static void __init clksrc_dbx500_prcmu_init (struct device_node *node) { - clksrc_dbx500_timer_base = base; + clksrc_dbx500_timer_base =of_iomap (node,0 );/* * The A9 sub system expects the timer to be configured as
@@ -85,3 +86,5 @@ void __init clksrc_dbx500_prcmu_init(void __iomem *base)#endif clocksource_register_hz (&clocksource_dbx500_prcmu,RATE_32K ); } +CLOCKSOURCE_OF_DECLARE (dbx500_prcmu,"stericsson,db8500-prcmu-timer-4" , + clksrc_dbx500_prcmu_init);
include/linux/clksrc-dbx500-prcmu.h deleted +0 -20
@@ -1,20 +0,0 @@ -/* -* Copyright (C) ST-Ericsson SA 2011 -* -* License Terms: GNU General Public License v2 -* Author: Mattias Wallin <[email protected]> -* -*/ -#ifndef __CLKSRC_DBX500_PRCMU_H -#define __CLKSRC_DBX500_PRCMU_H - -#include <linux/init.h> -#include <linux/io.h> - -#ifdef CONFIG_CLKSRC_DBX500_PRCMU -void __init clksrc_dbx500_prcmu_init (void __iomem *base); -#else -static inline void __init clksrc_dbx500_prcmu_init (void __iomem *base) {} -#endif - -#endif
Signature · 1 line
2.4.3
Arnd Bergmann
AppliedPATCH 1/1 ARM/clocksource: use automatic DT probing for ux500 PRCMU
Quoted 10 lines · On Tuesday 01 December 2015 15:00:24 Linus Walleij wrote:
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 <linux/clksrc-dbx500-prcmu.h>Suggested-by Arnd Bergmann <[email protected]>Acked-by Thomas Gleixner <[email protected]>Acked-by Daniel Lezcano <[email protected]>Signed-off-by Linus Walleij <[email protected]>
Quoted 5 lines
---
ARM SoC folks: I have only this Ux500 patch queued for v4.5. Can you please apply it directly to the proper place in ARM SoC?
---
Applied to next/cleanup, thanks!
Arnd