aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ks8695/time.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-08-29 14:26:42 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-09-05 02:48:56 -0400
commit70adc3f32adc2fb90b0107c020678588e4cf9f51 (patch)
tree69ca380e6e0cdf7a6d8aa45bcb3e332a2b7b3581 /arch/arm/mach-ks8695/time.c
parentfea7a08acb13524b47711625eebea40a0ede69a0 (diff)
ARM: ks8695: merge the timer header into the timer driver
This <mach/regs-timer.h> is broadcasted in the entire kernel for no good reason, since it's only used by the timer driver. Merge it into the driver. Tested-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ks8695/time.c')
-rw-r--r--arch/arm/mach-ks8695/time.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/arm/mach-ks8695/time.c b/arch/arm/mach-ks8695/time.c
index ec783a3070ae..6427b7c2c9fa 100644
--- a/arch/arm/mach-ks8695/time.c
+++ b/arch/arm/mach-ks8695/time.c
@@ -29,11 +29,30 @@
29#include <asm/mach/time.h> 29#include <asm/mach/time.h>
30#include <asm/system_misc.h> 30#include <asm/system_misc.h>
31 31
32#include <mach/regs-timer.h>
33#include <mach/regs-irq.h> 32#include <mach/regs-irq.h>
34 33
35#include "generic.h" 34#include "generic.h"
36 35
36#define KS8695_TMR_OFFSET (0xF0000 + 0xE400)
37#define KS8695_TMR_VA (KS8695_IO_VA + KS8695_TMR_OFFSET)
38#define KS8695_TMR_PA (KS8695_IO_PA + KS8695_TMR_OFFSET)
39
40/*
41 * Timer registers
42 */
43#define KS8695_TMCON (0x00) /* Timer Control Register */
44#define KS8695_T1TC (0x04) /* Timer 1 Timeout Count Register */
45#define KS8695_T0TC (0x08) /* Timer 0 Timeout Count Register */
46#define KS8695_T1PD (0x0C) /* Timer 1 Pulse Count Register */
47#define KS8695_T0PD (0x10) /* Timer 0 Pulse Count Register */
48
49/* Timer Control Register */
50#define TMCON_T1EN (1 << 1) /* Timer 1 Enable */
51#define TMCON_T0EN (1 << 0) /* Timer 0 Enable */
52
53/* Timer0 Timeout Counter Register */
54#define T0TC_WATCHDOG (0xff) /* Enable watchdog mode */
55
37/* 56/*
38 * Returns number of ms since last clock interrupt. Note that interrupts 57 * Returns number of ms since last clock interrupt. Note that interrupts
39 * will have been disabled by do_gettimeoffset() 58 * will have been disabled by do_gettimeoffset()