blob: 110e67e454cea6233f908113e6a97a368c36f86b [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Heiko Schocher420cd0a2011-09-14 19:44:00 +00002/*
3 * Copyright (C) 2011 DENX Software Engineering GmbH
4 * Heiko Schocher <hs@denx.de>
Heiko Schocher420cd0a2011-09-14 19:44:00 +00005 */
6#ifndef _TIMER_DEFS_H_
7#define _TIMER_DEFS_H_
8
9struct davinci_timer {
10 u_int32_t pid12;
11 u_int32_t emumgt;
12 u_int32_t na1;
13 u_int32_t na2;
14 u_int32_t tim12;
15 u_int32_t tim34;
16 u_int32_t prd12;
17 u_int32_t prd34;
18 u_int32_t tcr;
19 u_int32_t tgcr;
20 u_int32_t wdtcr;
21};
22
Heiko Schocher507dfab2012-01-14 21:43:04 +000023#define DV_TIMER_TCR_ENAMODE_MASK 3
24
25#define DV_TIMER_TCR_ENAMODE12_SHIFT 6
26#define DV_TIMER_TCR_CLKSRC12_SHIFT 8
27#define DV_TIMER_TCR_READRSTMODE12_SHIFT 10
28#define DV_TIMER_TCR_CAPMODE12_SHIFT 11
29#define DV_TIMER_TCR_CAPVTMODE12_SHIFT 12
30#define DV_TIMER_TCR_ENAMODE34_SHIFT 22
31#define DV_TIMER_TCR_CLKSRC34_SHIFT 24
32#define DV_TIMER_TCR_READRSTMODE34_SHIFT 26
33#define DV_TIMER_TCR_CAPMODE34_SHIFT 27
34#define DV_TIMER_TCR_CAPEVTMODE12_SHIFT 28
35
Heiko Schocherf15223f2012-01-14 21:42:46 +000036#define DV_WDT_ENABLE_SYS_RESET 0x00020000
37#define DV_WDT_TRIGGER_SYS_RESET 0x00020002
38
Heiko Schochera2cddad2011-09-14 19:44:02 +000039#ifdef CONFIG_HW_WATCHDOG
40void davinci_hw_watchdog_enable(void);
41void davinci_hw_watchdog_reset(void);
42#endif
Heiko Schocher420cd0a2011-09-14 19:44:00 +000043#endif /* _TIMER_DEFS_H_ */