sp805.h 796 Bytes
Newer Older
1
/*
2
 * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
3
 *
dp-arm's avatar
dp-arm committed
4
 * SPDX-License-Identifier: BSD-3-Clause
5
6
 */

7
8
9
#ifndef SP805_H
#define SP805_H

10
#include <lib/utils_def.h>
11
12

/* SP805 register offset */
13
14
15
#define SP805_WDOG_LOAD_OFF		UL(0x000)
#define SP805_WDOG_CTR_OFF		UL(0x008)
#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
22
#define SP805_CTR_RESEN			(U(1) << 1)
#define SP805_CTR_INTEN			(U(1) << 0)
23
24
25
26
27
28
29

#ifndef __ASSEMBLY__

#include <stdint.h>

/* Public high level API */

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
35

#endif /* __ASSEMBLY__ */

36
#endif /* SP805_H */