Trusted Firmware-A Tests, version 2.0
This is the first public version of the tests for the Trusted
Firmware-A project. Please see the documentation provided in the
source tree for more details.
Change-Id: I6f3452046a1351ac94a71b3525c30a4ca8db7867
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Co-authored-by: amobal01 <amol.balasokamble@arm.com>
Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Co-authored-by: Asha R <asha.r@arm.com>
Co-authored-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
Co-authored-by: David Cunado <david.cunado@arm.com>
Co-authored-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
Co-authored-by: Douglas Raillard <douglas.raillard@arm.com>
Co-authored-by: dp-arm <dimitris.papastamos@arm.com>
Co-authored-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Co-authored-by: Jonathan Wright <jonathan.wright@arm.com>
Co-authored-by: Kévin Petit <kevin.petit@arm.com>
Co-authored-by: Roberto Vargas <roberto.vargas@arm.com>
Co-authored-by: Sathees Balya <sathees.balya@arm.com>
Co-authored-by: Shawon Roy <Shawon.Roy@arm.com>
Co-authored-by: Soby Mathew <soby.mathew@arm.com>
Co-authored-by: Thomas Abraham <thomas.abraham@arm.com>
Co-authored-by: Vikram Kanigiri <vikram.kanigiri@arm.com>
Co-authored-by: Yatharth Kochar <yatharth.kochar@arm.com>
diff --git a/include/drivers/arm/sp805.h b/include/drivers/arm/sp805.h
new file mode 100644
index 0000000..c033ccf
--- /dev/null
+++ b/include/drivers/arm/sp805.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2018, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef __SP805_H__
+#define __SP805_H__
+
+/* SP805 register offset */
+#define SP805_WDOG_LOAD_OFF 0x000
+#define SP805_WDOG_VALUE_0FF 0x004
+#define SP805_WDOG_CTRL_OFF 0x008
+#define SP805_WDOG_INT_CLR_OFF 0x00c
+#define SP805_WDOG_RIS_OFF 0x010
+#define SP805_WDOG_MIS_OFF 0x014
+#define SP805_WDOG_LOCK_OFF 0xc00
+#define SP805_WDOG_ITCR_OFF 0xf00
+#define SP805_WDOG_ITOP_OFF 0xf04
+#define SP805_WDOG_PERIPH_ID_OFF 0xfe0
+#define SP805_WDOG_PCELL_ID_OFF 0xff0
+
+/*
+ * Magic word to unlock access to all other watchdog registers, Writing any other
+ * value locks them.
+ */
+#define SP805_WDOG_UNLOCK_ACCESS 0x1ACCE551
+
+/* Register field definitions */
+#define SP805_WDOG_CTRL_MASK 0x03
+#define SP805_WDOG_CTRL_RESEN (1 << 1)
+#define SP805_WDOG_CTRL_INTEN (1 << 0)
+#define SP805_WDOG_RIS_WDOGRIS (1 << 0)
+#define SP805_WDOG_RIS_MASK 0x1
+#define SP805_WDOG_MIS_WDOGMIS (1 << 0)
+#define SP805_WDOG_MIS_MASK 0x1
+#define SP805_WDOG_ITCR_MASK 0x1
+#define SP805_WDOG_ITOP_MASK 0x3
+#define SP805_WDOG_PART_NUM_SHIFT 0
+#define SP805_WDOG_PART_NUM_MASK 0xfff
+#define SP805_WDOG_DESIGNER_ID_SHIFT 12
+#define SP805_WDOG_DESIGNER_ID_MASK 0xff
+#define SP805_WDOG_REV_SHIFT 20
+#define SP805_WDOG_REV_MASK 0xf
+#define SP805_WDOG_CFG_SHIFT 24
+#define SP805_WDOG_CFG_MASK 0xff
+#define SP805_WDOG_PCELL_ID_SHIFT 0
+#define SP805_WDOG_PCELL_ID_MASK 0xff
+
+void sp805_wdog_start(unsigned int wdog_cycles);
+void sp805_wdog_stop(void);
+void sp805_wdog_refresh(void);
+
+#endif /* __SP805_H__ */
+