Matt Waddel | 35c638b | 2010-10-07 15:48:45 -0600 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2010 Linaro |
| 3 | * Matt Waddel, <matt.waddel@linaro.org> |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Matt Waddel | 35c638b | 2010-10-07 15:48:45 -0600 | [diff] [blame] | 6 | */ |
| 7 | #ifndef _SYSTIMER_H_ |
| 8 | #define _SYSTIMER_H_ |
| 9 | |
| 10 | /* AMBA timer register base address */ |
| 11 | #define SYSTIMER_BASE 0x10011000 |
| 12 | |
| 13 | #define SYSHZ_CLOCK 1000000 /* Timers -> 1Mhz */ |
| 14 | #define SYSTIMER_RELOAD 0xFFFFFFFF |
| 15 | #define SYSTIMER_EN (1 << 7) |
| 16 | #define SYSTIMER_32BIT (1 << 1) |
Rob Herring | d7dadc7 | 2013-06-12 22:24:49 -0500 | [diff] [blame] | 17 | #define SYSTIMER_PRESC_16 (1 << 2) |
| 18 | #define SYSTIMER_PRESC_256 (1 << 3) |
Matt Waddel | 35c638b | 2010-10-07 15:48:45 -0600 | [diff] [blame] | 19 | |
| 20 | struct systimer { |
| 21 | u32 timer0load; /* 0x00 */ |
| 22 | u32 timer0value; |
| 23 | u32 timer0control; |
| 24 | u32 timer0intclr; |
| 25 | u32 timer0ris; |
| 26 | u32 timer0mis; |
| 27 | u32 timer0bgload; |
| 28 | u32 timer1load; /* 0x20 */ |
| 29 | u32 timer1value; |
| 30 | u32 timer1control; |
| 31 | u32 timer1intclr; |
| 32 | u32 timer1ris; |
| 33 | u32 timer1mis; |
| 34 | u32 timer1bgload; |
| 35 | }; |
| 36 | #endif /* _SYSTIMER_H_ */ |