diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-08-29 14:26:42 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-09-05 02:48:56 -0400 |
commit | 70adc3f32adc2fb90b0107c020678588e4cf9f51 (patch) | |
tree | 69ca380e6e0cdf7a6d8aa45bcb3e332a2b7b3581 /arch | |
parent | fea7a08acb13524b47711625eebea40a0ede69a0 (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')
-rw-r--r-- | arch/arm/mach-ks8695/include/mach/regs-timer.h | 40 | ||||
-rw-r--r-- | arch/arm/mach-ks8695/time.c | 21 |
2 files changed, 20 insertions, 41 deletions
diff --git a/arch/arm/mach-ks8695/include/mach/regs-timer.h b/arch/arm/mach-ks8695/include/mach/regs-timer.h deleted file mode 100644 index e620cda99d2d..000000000000 --- a/arch/arm/mach-ks8695/include/mach/regs-timer.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ks8695/include/mach/regs-timer.h | ||
3 | * | ||
4 | * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk> | ||
5 | * Copyright (C) 2006 Simtec Electronics | ||
6 | * | ||
7 | * KS8695 - Timer registers and bit definitions. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef KS8695_TIMER_H | ||
15 | #define KS8695_TIMER_H | ||
16 | |||
17 | #define KS8695_TMR_OFFSET (0xF0000 + 0xE400) | ||
18 | #define KS8695_TMR_VA (KS8695_IO_VA + KS8695_TMR_OFFSET) | ||
19 | #define KS8695_TMR_PA (KS8695_IO_PA + KS8695_TMR_OFFSET) | ||
20 | |||
21 | |||
22 | /* | ||
23 | * Timer registers | ||
24 | */ | ||
25 | #define KS8695_TMCON (0x00) /* Timer Control Register */ | ||
26 | #define KS8695_T1TC (0x04) /* Timer 1 Timeout Count Register */ | ||
27 | #define KS8695_T0TC (0x08) /* Timer 0 Timeout Count Register */ | ||
28 | #define KS8695_T1PD (0x0C) /* Timer 1 Pulse Count Register */ | ||
29 | #define KS8695_T0PD (0x10) /* Timer 0 Pulse Count Register */ | ||
30 | |||
31 | |||
32 | /* Timer Control Register */ | ||
33 | #define TMCON_T1EN (1 << 1) /* Timer 1 Enable */ | ||
34 | #define TMCON_T0EN (1 << 0) /* Timer 0 Enable */ | ||
35 | |||
36 | /* Timer0 Timeout Counter Register */ | ||
37 | #define T0TC_WATCHDOG (0xff) /* Enable watchdog mode */ | ||
38 | |||
39 | |||
40 | #endif | ||
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() |