1 /*
2  * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef SP805_H
8 #define SP805_H
9 
10 #include <lib/utils_def.h>
11 
12 /* SP805 register offset */
13 #define SP805_WDOG_LOAD_OFF		UL(0x000)
14 #define SP805_WDOG_CTR_OFF		UL(0x008)
15 #define SP805_WDOG_LOCK_OFF		UL(0xc00)
16 
17 /* Magic word to unlock the wd registers */
18 #define WDOG_UNLOCK_KEY			U(0x1ACCE551)
19 
20 /* Register field definitions */
21 #define SP805_CTR_RESEN			(U(1) << 1)
22 #define SP805_CTR_INTEN			(U(1) << 0)
23 
24 #ifndef __ASSEMBLER__
25 
26 #include <stdint.h>
27 
28 /* Public high level API */
29 
30 void sp805_start(uintptr_t base, unsigned int ticks);
31 void sp805_stop(uintptr_t base);
32 void sp805_refresh(uintptr_t base, unsigned int ticks);
33 
34 #endif /* __ASSEMBLER__ */
35 
36 #endif /* SP805_H */
37