blob: a0412bd340c87f4389e60dc279cbda5211fa5c3c [file] [log] [blame]
Matt Waddelb80e41a2010-10-07 15:48:45 -06001/*
2 * (C) Copyright 2010 Linaro
3 * Matt Waddel, <matt.waddel@linaro.org>
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Matt Waddelb80e41a2010-10-07 15:48:45 -06006 */
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 Herring714d1f52013-06-12 22:24:49 -050017#define SYSTIMER_PRESC_16 (1 << 2)
18#define SYSTIMER_PRESC_256 (1 << 3)
Matt Waddelb80e41a2010-10-07 15:48:45 -060019
20struct 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_ */