diff options
Diffstat (limited to 'include/asm-m68knommu/mcftimer.h')
-rw-r--r-- | include/asm-m68knommu/mcftimer.h | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/include/asm-m68knommu/mcftimer.h b/include/asm-m68knommu/mcftimer.h index 68bf33ac10d1..6f4d796e03db 100644 --- a/include/asm-m68knommu/mcftimer.h +++ b/include/asm-m68knommu/mcftimer.h | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * mcftimer.h -- ColdFire internal TIMER support defines. | 4 | * mcftimer.h -- ColdFire internal TIMER support defines. |
5 | * | 5 | * |
6 | * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com) | 6 | * (C) Copyright 1999-2006, Greg Ungerer <gerg@snapgear.com> |
7 | * (C) Copyright 2000, Lineo Inc. (www.lineo.com) | 7 | * (C) Copyright 2000, Lineo Inc. (www.lineo.com) |
8 | */ | 8 | */ |
9 | 9 | ||
@@ -27,6 +27,11 @@ | |||
27 | #elif defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) | 27 | #elif defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) |
28 | #define MCFTIMER_BASE1 0x140 /* Base address of TIMER1 */ | 28 | #define MCFTIMER_BASE1 0x140 /* Base address of TIMER1 */ |
29 | #define MCFTIMER_BASE2 0x180 /* Base address of TIMER2 */ | 29 | #define MCFTIMER_BASE2 0x180 /* Base address of TIMER2 */ |
30 | #elif defined(CONFIG_M532x) | ||
31 | #define MCFTIMER_BASE1 0xfc070000 /* Base address of TIMER1 */ | ||
32 | #define MCFTIMER_BASE2 0xfc074000 /* Base address of TIMER2 */ | ||
33 | #define MCFTIMER_BASE3 0xfc078000 /* Base address of TIMER3 */ | ||
34 | #define MCFTIMER_BASE4 0xfc07c000 /* Base address of TIMER4 */ | ||
30 | #endif | 35 | #endif |
31 | 36 | ||
32 | 37 | ||
@@ -34,23 +39,14 @@ | |||
34 | * Define the TIMER register set addresses. | 39 | * Define the TIMER register set addresses. |
35 | */ | 40 | */ |
36 | #define MCFTIMER_TMR 0x00 /* Timer Mode reg (r/w) */ | 41 | #define MCFTIMER_TMR 0x00 /* Timer Mode reg (r/w) */ |
37 | #define MCFTIMER_TRR 0x02 /* Timer Reference (r/w) */ | 42 | #define MCFTIMER_TRR 0x04 /* Timer Reference (r/w) */ |
38 | #define MCFTIMER_TCR 0x04 /* Timer Capture reg (r/w) */ | 43 | #define MCFTIMER_TCR 0x08 /* Timer Capture reg (r/w) */ |
39 | #define MCFTIMER_TCN 0x06 /* Timer Counter reg (r/w) */ | 44 | #define MCFTIMER_TCN 0x0C /* Timer Counter reg (r/w) */ |
45 | #if defined(CONFIG_M532x) | ||
46 | #define MCFTIMER_TER 0x03 /* Timer Event reg (r/w) */ | ||
47 | #else | ||
40 | #define MCFTIMER_TER 0x11 /* Timer Event reg (r/w) */ | 48 | #define MCFTIMER_TER 0x11 /* Timer Event reg (r/w) */ |
41 | 49 | #endif | |
42 | struct mcftimer { | ||
43 | unsigned short tmr; /* Timer Mode reg (r/w) */ | ||
44 | unsigned short reserved1; | ||
45 | unsigned short trr; /* Timer Reference (r/w) */ | ||
46 | unsigned short reserved2; | ||
47 | unsigned short tcr; /* Timer Capture reg (r/w) */ | ||
48 | unsigned short reserved3; | ||
49 | unsigned short tcn; /* Timer Counter reg (r/w) */ | ||
50 | unsigned short reserved4; | ||
51 | unsigned char reserved5; | ||
52 | unsigned char ter; /* Timer Event reg (r/w) */ | ||
53 | } __attribute__((packed)); | ||
54 | 50 | ||
55 | /* | 51 | /* |
56 | * Bit definitions for the Timer Mode Register (TMR). | 52 | * Bit definitions for the Timer Mode Register (TMR). |