blob: f00bcbac2caf1c18bba0262f76ad4f75f0f8a4ae [file] [log] [blame]
Juan Castillo5f64eff2014-07-08 17:20:41 +01001/*
2 * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
3 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Juan Castillo5f64eff2014-07-08 17:20:41 +01005 */
6
7#ifndef __SP805_H__
8#define __SP805_H__
9
10/* SP805 register offset */
11#define SP805_WDOG_LOAD_OFF 0x000
12#define SP805_WDOG_CTR_OFF 0x008
13#define SP805_WDOG_LOCK_OFF 0xc00
14
15/* Magic word to unlock the wd registers */
16#define WDOG_UNLOCK_KEY 0x1ACCE551
17
18/* Register field definitions */
19#define SP805_CTR_RESEN (1 << 1)
20#define SP805_CTR_INTEN (1 << 0)
21
22#ifndef __ASSEMBLY__
23
24#include <stdint.h>
25
26/* Public high level API */
27
28void sp805_start(uintptr_t base, unsigned long ticks);
29void sp805_stop(uintptr_t base);
30void sp805_refresh(uintptr_t base, unsigned long ticks);
31
32#endif /* __ASSEMBLY__ */
33
34#endif /* __SP805_H__ */