xref: /rk3399_rockchip-uboot/arch/arm/include/asm/arch-armv7/systimer.h (revision e20cc2ca15b5b0644f51b6e58d530d70acd2bc00)
1b80e41acSMatt Waddel /*
2b80e41acSMatt Waddel  * (C) Copyright 2010 Linaro
3b80e41acSMatt Waddel  * Matt Waddel, <matt.waddel@linaro.org>
4b80e41acSMatt Waddel  *
51a459660SWolfgang Denk  * SPDX-License-Identifier:	GPL-2.0+
6b80e41acSMatt Waddel  */
7b80e41acSMatt Waddel #ifndef _SYSTIMER_H_
8b80e41acSMatt Waddel #define _SYSTIMER_H_
9b80e41acSMatt Waddel 
10b80e41acSMatt Waddel /* AMBA timer register base address */
11b80e41acSMatt Waddel #define SYSTIMER_BASE		0x10011000
12b80e41acSMatt Waddel 
13b80e41acSMatt Waddel #define SYSHZ_CLOCK		1000000		/* Timers -> 1Mhz */
14b80e41acSMatt Waddel #define SYSTIMER_RELOAD		0xFFFFFFFF
15b80e41acSMatt Waddel #define SYSTIMER_EN		(1 << 7)
16b80e41acSMatt Waddel #define SYSTIMER_32BIT		(1 << 1)
17*714d1f5dSRob Herring #define SYSTIMER_PRESC_16	(1 << 2)
18*714d1f5dSRob Herring #define SYSTIMER_PRESC_256	(1 << 3)
19b80e41acSMatt Waddel 
20b80e41acSMatt Waddel struct systimer {
21b80e41acSMatt Waddel 	u32 timer0load;		/* 0x00 */
22b80e41acSMatt Waddel 	u32 timer0value;
23b80e41acSMatt Waddel 	u32 timer0control;
24b80e41acSMatt Waddel 	u32 timer0intclr;
25b80e41acSMatt Waddel 	u32 timer0ris;
26b80e41acSMatt Waddel 	u32 timer0mis;
27b80e41acSMatt Waddel 	u32 timer0bgload;
28b80e41acSMatt Waddel 	u32 timer1load;		/* 0x20 */
29b80e41acSMatt Waddel 	u32 timer1value;
30b80e41acSMatt Waddel 	u32 timer1control;
31b80e41acSMatt Waddel 	u32 timer1intclr;
32b80e41acSMatt Waddel 	u32 timer1ris;
33b80e41acSMatt Waddel 	u32 timer1mis;
34b80e41acSMatt Waddel 	u32 timer1bgload;
35b80e41acSMatt Waddel };
36b80e41acSMatt Waddel #endif /* _SYSTIMER_H_ */
37