.. | .. |
---|
10 | 10 | * |
---|
11 | 11 | * Every SP804 contains two identical timers. |
---|
12 | 12 | */ |
---|
| 13 | +#define NR_TIMERS 2 |
---|
13 | 14 | #define TIMER_1_BASE 0x00 |
---|
14 | 15 | #define TIMER_2_BASE 0x20 |
---|
15 | 16 | |
---|
.. | .. |
---|
29 | 30 | #define TIMER_RIS 0x10 /* CVR ro */ |
---|
30 | 31 | #define TIMER_MIS 0x14 /* CVR ro */ |
---|
31 | 32 | #define TIMER_BGLOAD 0x18 /* CVR rw */ |
---|
| 33 | + |
---|
| 34 | +struct sp804_timer { |
---|
| 35 | + int load; |
---|
| 36 | + int load_h; |
---|
| 37 | + int value; |
---|
| 38 | + int value_h; |
---|
| 39 | + int ctrl; |
---|
| 40 | + int intclr; |
---|
| 41 | + int ris; |
---|
| 42 | + int mis; |
---|
| 43 | + int bgload; |
---|
| 44 | + int bgload_h; |
---|
| 45 | + int timer_base[NR_TIMERS]; |
---|
| 46 | + int width; |
---|
| 47 | +}; |
---|
| 48 | + |
---|
| 49 | +struct sp804_clkevt { |
---|
| 50 | + void __iomem *base; |
---|
| 51 | + void __iomem *load; |
---|
| 52 | + void __iomem *load_h; |
---|
| 53 | + void __iomem *value; |
---|
| 54 | + void __iomem *value_h; |
---|
| 55 | + void __iomem *ctrl; |
---|
| 56 | + void __iomem *intclr; |
---|
| 57 | + void __iomem *ris; |
---|
| 58 | + void __iomem *mis; |
---|
| 59 | + void __iomem *bgload; |
---|
| 60 | + void __iomem *bgload_h; |
---|
| 61 | + unsigned long reload; |
---|
| 62 | + int width; |
---|
| 63 | +}; |
---|