1b80e41acSMatt Waddel /*
2b80e41acSMatt Waddel  * (C) Copyright 2010 Linaro
3b80e41acSMatt Waddel  * Matt Waddel, <matt.waddel@linaro.org>
4b80e41acSMatt Waddel  *
5b80e41acSMatt Waddel  * See file CREDITS for list of people who contributed to this
6b80e41acSMatt Waddel  * project.
7b80e41acSMatt Waddel  *
8b80e41acSMatt Waddel  * This program is free software; you can redistribute it and/or
9b80e41acSMatt Waddel  * modify it under the terms of the GNU General Public License as
10b80e41acSMatt Waddel  * published by the Free Software Foundation; either version 2 of
11b80e41acSMatt Waddel  * the License, or (at your option) any later version.
12b80e41acSMatt Waddel  *
13b80e41acSMatt Waddel  * This program is distributed in the hope that it will be useful,
14b80e41acSMatt Waddel  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15b80e41acSMatt Waddel  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16b80e41acSMatt Waddel  * GNU General Public License for more details.
17b80e41acSMatt Waddel  *
18b80e41acSMatt Waddel  * You should have received a copy of the GNU General Public License
19b80e41acSMatt Waddel  * along with this program; if not, write to the Free Software
20b80e41acSMatt Waddel  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21b80e41acSMatt Waddel  * MA 02111-1307 USA
22b80e41acSMatt Waddel  */
23b80e41acSMatt Waddel #ifndef _SYSTIMER_H_
24b80e41acSMatt Waddel #define _SYSTIMER_H_
25b80e41acSMatt Waddel 
26b80e41acSMatt Waddel /* AMBA timer register base address */
27b80e41acSMatt Waddel #define SYSTIMER_BASE		0x10011000
28b80e41acSMatt Waddel 
29b80e41acSMatt Waddel #define SYSHZ_CLOCK		1000000		/* Timers -> 1Mhz */
30b80e41acSMatt Waddel #define SYSTIMER_RELOAD		0xFFFFFFFF
31b80e41acSMatt Waddel #define SYSTIMER_EN		(1 << 7)
32b80e41acSMatt Waddel #define SYSTIMER_32BIT		(1 << 1)
33*714d1f5dSRob Herring #define SYSTIMER_PRESC_16	(1 << 2)
34*714d1f5dSRob Herring #define SYSTIMER_PRESC_256	(1 << 3)
35b80e41acSMatt Waddel 
36b80e41acSMatt Waddel struct systimer {
37b80e41acSMatt Waddel 	u32 timer0load;		/* 0x00 */
38b80e41acSMatt Waddel 	u32 timer0value;
39b80e41acSMatt Waddel 	u32 timer0control;
40b80e41acSMatt Waddel 	u32 timer0intclr;
41b80e41acSMatt Waddel 	u32 timer0ris;
42b80e41acSMatt Waddel 	u32 timer0mis;
43b80e41acSMatt Waddel 	u32 timer0bgload;
44b80e41acSMatt Waddel 	u32 timer1load;		/* 0x20 */
45b80e41acSMatt Waddel 	u32 timer1value;
46b80e41acSMatt Waddel 	u32 timer1control;
47b80e41acSMatt Waddel 	u32 timer1intclr;
48b80e41acSMatt Waddel 	u32 timer1ris;
49b80e41acSMatt Waddel 	u32 timer1mis;
50b80e41acSMatt Waddel 	u32 timer1bgload;
51b80e41acSMatt Waddel };
52b80e41acSMatt Waddel #endif /* _SYSTIMER_H_ */
53