Skip to content

Commit 0b7402d

Browse files
sudeep-hollaRussell King
authored andcommitted
ARM: 8366/1: move Dual-Timer SP804 driver to drivers/clocksource
The ARM Dual-Timer SP804 module is peripheral found not only on ARM32 platforms but also on ARM64 platforms. This patch moves the driver out of arch/arm to driver/clocksource so that it can be used on ARM64 platforms also. Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Rob Herring <robh@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Olof Johansson <olof@lixom.net> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 1e5f051 commit 0b7402d

File tree

11 files changed

+20
-20
lines changed

11 files changed

+20
-20
lines changed

arch/arm/Kconfig

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -975,11 +975,6 @@ config PLAT_PXA
975975
config PLAT_VERSATILE
976976
bool
977977

978-
config ARM_TIMER_SP804
979-
bool
980-
select CLKSRC_MMIO
981-
select CLKSRC_OF if OF
982-
983978
source "arch/arm/firmware/Kconfig"
984979

985980
source arch/arm/mm/Kconfig

arch/arm/common/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ obj-$(CONFIG_SHARP_LOCOMO) += locomo.o
1111
obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o
1212
obj-$(CONFIG_SHARP_SCOOP) += scoop.o
1313
obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o
14-
obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o
1514
obj-$(CONFIG_MCPM) += mcpm_head.o mcpm_entry.o mcpm_platsmp.o vlock.o
1615
CFLAGS_REMOVE_mcpm_entry.o = -pg
1716
AFLAGS_mcpm_head.o := -march=armv7-a

arch/arm/mach-nspire/nspire.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
#include <asm/mach-types.h>
2323
#include <asm/mach/map.h>
2424

25-
#include <asm/hardware/timer-sp.h>
26-
2725
#include "mmio.h"
2826
#include "clcd.h"
2927

arch/arm/mach-realview/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
#include <linux/mtd/physmap.h>
3636
#include <linux/memblock.h>
3737

38+
#include <clocksource/timer-sp804.h>
39+
3840
#include <mach/hardware.h>
3941
#include <asm/irq.h>
4042
#include <asm/mach-types.h>
@@ -44,10 +46,8 @@
4446
#include <asm/mach/irq.h>
4547
#include <asm/mach/map.h>
4648

47-
4849
#include <mach/platform.h>
4950
#include <mach/irqs.h>
50-
#include <asm/hardware/timer-sp.h>
5151

5252
#include <plat/sched_clock.h>
5353

arch/arm/mach-versatile/core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
#include <linux/bitops.h>
4242
#include <linux/reboot.h>
4343

44+
#include <clocksource/timer-sp804.h>
45+
4446
#include <asm/irq.h>
4547
#include <asm/hardware/icst.h>
4648
#include <asm/mach-types.h>
@@ -51,7 +53,6 @@
5153
#include <asm/mach/map.h>
5254
#include <mach/hardware.h>
5355
#include <mach/platform.h>
54-
#include <asm/hardware/timer-sp.h>
5556

5657
#include <plat/sched_clock.h>
5758

drivers/clocksource/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ config ARM_GLOBAL_TIMER
132132
help
133133
This options enables support for the ARM global timer unit
134134

135+
config ARM_TIMER_SP804
136+
bool "Support for Dual Timer SP804 module"
137+
select CLKSRC_MMIO
138+
select CLKSRC_OF if OF
139+
135140
config CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
136141
bool
137142
depends on ARM_GLOBAL_TIMER

drivers/clocksource/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ obj-$(CONFIG_MTK_TIMER) += mtk_timer.o
4545

4646
obj-$(CONFIG_ARM_ARCH_TIMER) += arm_arch_timer.o
4747
obj-$(CONFIG_ARM_GLOBAL_TIMER) += arm_global_timer.o
48+
obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp804.o
4849
obj-$(CONFIG_CLKSRC_METAG_GENERIC) += metag_generic.o
4950
obj-$(CONFIG_ARCH_HAS_TICK_BROADCAST) += dummy_timer.o
5051
obj-$(CONFIG_ARCH_KEYSTONE) += timer-keystone.o

drivers/clocksource/timer-integrator-ap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
#include <linux/clockchips.h>
2727
#include <linux/interrupt.h>
2828
#include <linux/sched_clock.h>
29-
#include <asm/hardware/arm_timer.h>
29+
30+
#include "timer-sp.h"
3031

3132
static void __iomem * sched_clk_base;
3233

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#ifndef __ASM_ARM_HARDWARE_ARM_TIMER_H
2-
#define __ASM_ARM_HARDWARE_ARM_TIMER_H
3-
41
/*
52
* ARM timer implementation, found in Integrator, Versatile and Realview
63
* platforms. Not all platforms support all registers and bits in these
@@ -31,5 +28,3 @@
3128
#define TIMER_RIS 0x10 /* CVR ro */
3229
#define TIMER_MIS 0x14 /* CVR ro */
3330
#define TIMER_BGLOAD 0x18 /* CVR rw */
34-
35-
#endif
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* linux/arch/arm/common/timer-sp.c
2+
* linux/drivers/clocksource/timer-sp.c
33
*
44
* Copyright (C) 1999 - 2003 ARM Limited
55
* Copyright (C) 2000 Deep Blue Solutions Ltd
@@ -30,8 +30,9 @@
3030
#include <linux/of_irq.h>
3131
#include <linux/sched_clock.h>
3232

33-
#include <asm/hardware/arm_timer.h>
34-
#include <asm/hardware/timer-sp.h>
33+
#include <clocksource/timer-sp804.h>
34+
35+
#include "timer-sp.h"
3536

3637
static long __init sp804_get_clock_rate(struct clk *clk)
3738
{

0 commit comments

Comments
 (0)