Skip to content

Commit ff7ec34

Browse files
committed
timer: vt8500: Move timer code to drivers/clocksource
This patch moves arch-vt8500/timer.c into drivers/clocksource and updates the necessary Kconfig/Makefile options. Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
1 parent 1c2584c commit ff7ec34

8 files changed

Lines changed: 29 additions & 2 deletions

File tree

‎arch/arm/mach-vt8500/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ config ARCH_VT8500
88
select GENERIC_CLOCKEVENTS
99
select GENERIC_GPIO
1010
select HAVE_CLK
11+
select VT8500_TIMER
1112
help
1213
Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip.

‎arch/arm/mach-vt8500/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
obj-$(CONFIG_ARCH_VT8500) += irq.o timer.o vt8500.o
1+
obj-$(CONFIG_ARCH_VT8500) += irq.o vt8500.o

‎arch/arm/mach-vt8500/common.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#include <linux/of.h>
2020

21-
void __init vt8500_timer_init(void);
2221
int __init vt8500_irq_init(struct device_node *node,
2322
struct device_node *parent);
2423

‎arch/arm/mach-vt8500/vt8500.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include <linux/io.h>
2222
#include <linux/pm.h>
23+
#include <linux/vt8500_timer.h>
2324

2425
#include <asm/mach-types.h>
2526
#include <asm/mach/arch.h>

‎drivers/clocksource/Kconfig‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ config ARMADA_370_XP_TIMER
2828
config SUNXI_TIMER
2929
bool
3030

31+
config VT8500_TIMER
32+
bool
33+
3134
config CLKSRC_NOMADIK_MTU
3235
bool
3336
depends on (ARCH_NOMADIK || ARCH_U8500)

‎drivers/clocksource/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ obj-$(CONFIG_CLKSRC_DBX500_PRCMU) += clksrc-dbx500-prcmu.o
1717
obj-$(CONFIG_ARMADA_370_XP_TIMER) += time-armada-370-xp.o
1818
obj-$(CONFIG_ARCH_BCM2835) += bcm2835_timer.o
1919
obj-$(CONFIG_SUNXI_TIMER) += sunxi_timer.o
20+
obj-$(CONFIG_VT8500_TIMER) += vt8500_timer.o
2021

2122
obj-$(CONFIG_CLKSRC_ARM_GENERIC) += arm_generic.o

‎include/linux/vt8500_timer.h‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright 2012 Tony Prisk <linux@prisktech.co.nz>
3+
*
4+
* This program is free software; you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation; either version 2 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*/
14+
15+
#ifndef __VT8500_TIMER_H
16+
#define __VT8500_TIMER_H
17+
18+
#include <asm/mach/time.h>
19+
20+
void vt8500_timer_init(void);
21+
22+
#endif

0 commit comments

Comments
 (0)