2014-07-08 17:20:41 +01:00
|
|
|
/*
|
2018-07-24 11:27:52 +01:00
|
|
|
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
|
2014-07-08 17:20:41 +01:00
|
|
|
*
|
2017-05-03 09:38:09 +01:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2014-07-08 17:20:41 +01:00
|
|
|
*/
|
|
|
|
|
2018-07-24 11:27:52 +01:00
|
|
|
#ifndef SP805_H
|
|
|
|
#define SP805_H
|
|
|
|
|
2018-12-14 00:18:21 +00:00
|
|
|
#include <lib/utils_def.h>
|
2014-07-08 17:20:41 +01:00
|
|
|
|
|
|
|
/* SP805 register offset */
|
2018-07-24 11:27:52 +01:00
|
|
|
#define SP805_WDOG_LOAD_OFF UL(0x000)
|
|
|
|
#define SP805_WDOG_CTR_OFF UL(0x008)
|
|
|
|
#define SP805_WDOG_LOCK_OFF UL(0xc00)
|
2014-07-08 17:20:41 +01:00
|
|
|
|
|
|
|
/* Magic word to unlock the wd registers */
|
2018-07-24 11:27:52 +01:00
|
|
|
#define WDOG_UNLOCK_KEY U(0x1ACCE551)
|
2014-07-08 17:20:41 +01:00
|
|
|
|
|
|
|
/* Register field definitions */
|
2018-07-24 11:27:52 +01:00
|
|
|
#define SP805_CTR_RESEN (U(1) << 1)
|
|
|
|
#define SP805_CTR_INTEN (U(1) << 0)
|
2014-07-08 17:20:41 +01:00
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
/* Public high level API */
|
|
|
|
|
2018-07-24 11:27:52 +01:00
|
|
|
void sp805_start(uintptr_t base, unsigned int ticks);
|
2014-07-08 17:20:41 +01:00
|
|
|
void sp805_stop(uintptr_t base);
|
2018-07-24 11:27:52 +01:00
|
|
|
void sp805_refresh(uintptr_t base, unsigned int ticks);
|
2014-07-08 17:20:41 +01:00
|
|
|
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
|
2018-07-24 11:27:52 +01:00
|
|
|
#endif /* SP805_H */
|