diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-11-21 06:43:33 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-12 12:32:39 -0500 |
commit | 2781681ea6629ac0a685f5afe2011f916ab3c8ba (patch) | |
tree | e2fdbb0126d2983ca9d6e4da8758b6fbe2089519 /arch/arm/mach-pnx4008 | |
parent | 6fff3da998ac3cc9ed8a84bf4f19911bd63c8c32 (diff) |
ARM: PNX4008: remove platform definitions from mach/timex.h
mach/timex.h is only supposed to contain a definition for
CLOCK_TICK_RATE. Remove additional includes, and move private
definitions to a private header file.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pnx4008')
-rw-r--r-- | arch/arm/mach-pnx4008/include/mach/timex.h | 54 | ||||
-rw-r--r-- | arch/arm/mach-pnx4008/pm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pnx4008/time.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pnx4008/time.h | 70 |
4 files changed, 74 insertions, 54 deletions
diff --git a/arch/arm/mach-pnx4008/include/mach/timex.h b/arch/arm/mach-pnx4008/include/mach/timex.h index 5ff0196c0f16..b383c7de7ab4 100644 --- a/arch/arm/mach-pnx4008/include/mach/timex.h +++ b/arch/arm/mach-pnx4008/include/mach/timex.h | |||
@@ -14,60 +14,6 @@ | |||
14 | #ifndef __PNX4008_TIMEX_H | 14 | #ifndef __PNX4008_TIMEX_H |
15 | #define __PNX4008_TIMEX_H | 15 | #define __PNX4008_TIMEX_H |
16 | 16 | ||
17 | #include <linux/io.h> | ||
18 | #include <mach/hardware.h> | ||
19 | |||
20 | #define CLOCK_TICK_RATE 1000000 | 17 | #define CLOCK_TICK_RATE 1000000 |
21 | 18 | ||
22 | #define TICKS2USECS(x) (x) | ||
23 | |||
24 | /* MilliSecond Timer - Chapter 21 Page 202 */ | ||
25 | |||
26 | #define MSTIM_INT IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x0)) | ||
27 | #define MSTIM_CTRL IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x4)) | ||
28 | #define MSTIM_COUNTER IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x8)) | ||
29 | #define MSTIM_MCTRL IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x14)) | ||
30 | #define MSTIM_MATCH0 IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x18)) | ||
31 | #define MSTIM_MATCH1 IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x1c)) | ||
32 | |||
33 | /* High Speed Timer - Chpater 22, Page 205 */ | ||
34 | |||
35 | #define HSTIM_INT IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x0)) | ||
36 | #define HSTIM_CTRL IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x4)) | ||
37 | #define HSTIM_COUNTER IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x8)) | ||
38 | #define HSTIM_PMATCH IO_ADDRESS((PNX4008_HSTIMER_BASE + 0xC)) | ||
39 | #define HSTIM_PCOUNT IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x10)) | ||
40 | #define HSTIM_MCTRL IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x14)) | ||
41 | #define HSTIM_MATCH0 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x18)) | ||
42 | #define HSTIM_MATCH1 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x1c)) | ||
43 | #define HSTIM_MATCH2 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x20)) | ||
44 | #define HSTIM_CCR IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x28)) | ||
45 | #define HSTIM_CR0 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x2C)) | ||
46 | #define HSTIM_CR1 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x30)) | ||
47 | |||
48 | /* IMPORTANT: both timers are UPCOUNTING */ | ||
49 | |||
50 | /* xSTIM_MCTRL bit definitions */ | ||
51 | #define MR0_INT 1 | ||
52 | #define RESET_COUNT0 (1<<1) | ||
53 | #define STOP_COUNT0 (1<<2) | ||
54 | #define MR1_INT (1<<3) | ||
55 | #define RESET_COUNT1 (1<<4) | ||
56 | #define STOP_COUNT1 (1<<5) | ||
57 | #define MR2_INT (1<<6) | ||
58 | #define RESET_COUNT2 (1<<7) | ||
59 | #define STOP_COUNT2 (1<<8) | ||
60 | |||
61 | /* xSTIM_CTRL bit definitions */ | ||
62 | #define COUNT_ENAB 1 | ||
63 | #define RESET_COUNT (1<<1) | ||
64 | #define DEBUG_EN (1<<2) | ||
65 | |||
66 | /* xSTIM_INT bit definitions */ | ||
67 | #define MATCH0_INT 1 | ||
68 | #define MATCH1_INT (1<<1) | ||
69 | #define MATCH2_INT (1<<2) | ||
70 | #define RTC_TICK0 (1<<4) | ||
71 | #define RTC_TICK1 (1<<5) | ||
72 | |||
73 | #endif | 19 | #endif |
diff --git a/arch/arm/mach-pnx4008/pm.c b/arch/arm/mach-pnx4008/pm.c index b3d8d53e32ef..1f0585329be4 100644 --- a/arch/arm/mach-pnx4008/pm.c +++ b/arch/arm/mach-pnx4008/pm.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | 22 | ||
23 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
24 | |||
25 | #include <mach/hardware.h> | ||
24 | #include <mach/pm.h> | 26 | #include <mach/pm.h> |
25 | #include <mach/clock.h> | 27 | #include <mach/clock.h> |
26 | 28 | ||
diff --git a/arch/arm/mach-pnx4008/time.c b/arch/arm/mach-pnx4008/time.c index fc0ba183fe12..0c8aad4bb0dc 100644 --- a/arch/arm/mach-pnx4008/time.c +++ b/arch/arm/mach-pnx4008/time.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <asm/mach/time.h> | 30 | #include <asm/mach/time.h> |
31 | #include <asm/errno.h> | 31 | #include <asm/errno.h> |
32 | 32 | ||
33 | #include "time.h" | ||
34 | |||
33 | /*! Note: all timers are UPCOUNTING */ | 35 | /*! Note: all timers are UPCOUNTING */ |
34 | 36 | ||
35 | /*! | 37 | /*! |
diff --git a/arch/arm/mach-pnx4008/time.h b/arch/arm/mach-pnx4008/time.h new file mode 100644 index 000000000000..75e88c570aa7 --- /dev/null +++ b/arch/arm/mach-pnx4008/time.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-pnx4008/include/mach/timex.h | ||
3 | * | ||
4 | * PNX4008 timers header file | ||
5 | * | ||
6 | * Author: Dmitry Chigirev <source@mvista.com> | ||
7 | * | ||
8 | * 2005 (c) MontaVista Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | */ | ||
13 | #ifndef PNX_TIME_H | ||
14 | #define PNX_TIME_H | ||
15 | |||
16 | #include <linux/io.h> | ||
17 | #include <mach/hardware.h> | ||
18 | |||
19 | #define TICKS2USECS(x) (x) | ||
20 | |||
21 | /* MilliSecond Timer - Chapter 21 Page 202 */ | ||
22 | |||
23 | #define MSTIM_INT IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x0)) | ||
24 | #define MSTIM_CTRL IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x4)) | ||
25 | #define MSTIM_COUNTER IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x8)) | ||
26 | #define MSTIM_MCTRL IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x14)) | ||
27 | #define MSTIM_MATCH0 IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x18)) | ||
28 | #define MSTIM_MATCH1 IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x1c)) | ||
29 | |||
30 | /* High Speed Timer - Chpater 22, Page 205 */ | ||
31 | |||
32 | #define HSTIM_INT IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x0)) | ||
33 | #define HSTIM_CTRL IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x4)) | ||
34 | #define HSTIM_COUNTER IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x8)) | ||
35 | #define HSTIM_PMATCH IO_ADDRESS((PNX4008_HSTIMER_BASE + 0xC)) | ||
36 | #define HSTIM_PCOUNT IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x10)) | ||
37 | #define HSTIM_MCTRL IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x14)) | ||
38 | #define HSTIM_MATCH0 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x18)) | ||
39 | #define HSTIM_MATCH1 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x1c)) | ||
40 | #define HSTIM_MATCH2 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x20)) | ||
41 | #define HSTIM_CCR IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x28)) | ||
42 | #define HSTIM_CR0 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x2C)) | ||
43 | #define HSTIM_CR1 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x30)) | ||
44 | |||
45 | /* IMPORTANT: both timers are UPCOUNTING */ | ||
46 | |||
47 | /* xSTIM_MCTRL bit definitions */ | ||
48 | #define MR0_INT 1 | ||
49 | #define RESET_COUNT0 (1<<1) | ||
50 | #define STOP_COUNT0 (1<<2) | ||
51 | #define MR1_INT (1<<3) | ||
52 | #define RESET_COUNT1 (1<<4) | ||
53 | #define STOP_COUNT1 (1<<5) | ||
54 | #define MR2_INT (1<<6) | ||
55 | #define RESET_COUNT2 (1<<7) | ||
56 | #define STOP_COUNT2 (1<<8) | ||
57 | |||
58 | /* xSTIM_CTRL bit definitions */ | ||
59 | #define COUNT_ENAB 1 | ||
60 | #define RESET_COUNT (1<<1) | ||
61 | #define DEBUG_EN (1<<2) | ||
62 | |||
63 | /* xSTIM_INT bit definitions */ | ||
64 | #define MATCH0_INT 1 | ||
65 | #define MATCH1_INT (1<<1) | ||
66 | #define MATCH2_INT (1<<2) | ||
67 | #define RTC_TICK0 (1<<4) | ||
68 | #define RTC_TICK1 (1<<5) | ||
69 | |||
70 | #endif | ||