aboutsummaryrefslogtreecommitdiff
path: root/module/scmi_apcore/include/internal/scmi_apcore.h
diff options
context:
space:
mode:
authorRonald Cron <ronald.cron@arm.com>2018-06-05 09:31:39 +0200
committerRonald Cron <ronald.cron@arm.com>2018-06-08 11:46:47 +0200
commitb151958dbb2f37383f4d9a1f7802c36008d9fef2 (patch)
treefe20ebfb8c10facbfd028edefe601462ae3ee64c /module/scmi_apcore/include/internal/scmi_apcore.h
parentfd3027b6fd17a4a33a685adb73f2acfcae9a2ced (diff)
Add support for SGM-775
Co-authored-by: Filipe Rinaldi <filipe.rinaldi@arm.com> Co-authored-by: Paul Beesley <paul.beesley@arm.com> Co-authored-by: Chris Kay <chris.kay@arm.com> Co-authored-by: Elieva Pignat <elieva.pignat@arm.com> Co-authored-by: Pedro Custodio <pedro.krewinkelcustodio@arm.com> Change-Id: Ic7524ad58a7c15d5b055e88a9719b2feee437f1d Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Diffstat (limited to 'module/scmi_apcore/include/internal/scmi_apcore.h')
-rw-r--r--module/scmi_apcore/include/internal/scmi_apcore.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/module/scmi_apcore/include/internal/scmi_apcore.h b/module/scmi_apcore/include/internal/scmi_apcore.h
new file mode 100644
index 00000000..d55e676b
--- /dev/null
+++ b/module/scmi_apcore/include/internal/scmi_apcore.h
@@ -0,0 +1,71 @@
+/*
+ * Arm SCP/MCP Software
+ * Copyright (c) 2018, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Description:
+ * SCMI Core Configuration Protocol Support
+ */
+
+#ifndef SCMI_APCORE_H
+#define SCMI_APCORE_H
+
+#include <stdint.h>
+
+#define SCMI_PROTOCOL_ID_APCORE UINT32_C(0x90)
+#define SCMI_PROTOCOL_VERSION_APCORE UINT32_C(0x10000)
+
+/*
+ * Identifiers of the SCMI Core Configuration Protocol commands
+ */
+enum scmi_apcore_command_id {
+ SCMI_APCORE_RESET_ADDRESS_SET = 0x3,
+ SCMI_APCORE_RESET_ADDRESS_GET = 0x4,
+};
+
+/*
+ * Protocol Attributes
+ */
+
+#define SCMI_APCORE_PROTOCOL_ATTRIBUTES_64BIT_POS 0
+
+#define SCMI_APCORE_PROTOCOL_ATTRIBUTES_64BIT_MASK \
+ (UINT32_C(0x1) << SCMI_APCORE_PROTOCOL_ATTRIBUTES_64BIT_POS)
+
+/*
+ * Reset Address Set
+ */
+
+#define SCMI_APCORE_RESET_ADDRESS_SET_LOCK_POS 0
+
+#define SCMI_APCORE_RESET_ADDRESS_SET_LOCK_MASK \
+ (UINT32_C(0x1) << SCMI_APCORE_RESET_ADDRESS_SET_LOCK_POS)
+
+struct __attribute((packed)) scmi_apcore_reset_address_set_a2p {
+ uint32_t reset_address_low;
+ uint32_t reset_address_high;
+ uint32_t attributes;
+};
+
+struct __attribute((packed)) scmi_apcore_reset_address_set_p2a {
+ int32_t status;
+};
+
+/*
+ * Reset Address Get
+ */
+
+#define SCMI_APCORE_RESET_ADDRESS_GET_LOCK_POS 0
+
+#define SCMI_APCORE_RESET_ADDRESS_GET_LOCK_MASK \
+ (UINT32_C(0x1) << SCMI_APCORE_RESET_ADDRESS_GET_LOCK_POS)
+
+struct __attribute((packed)) scmi_apcore_reset_address_get_p2a {
+ int32_t status;
+ uint32_t reset_address_low;
+ uint32_t reset_address_high;
+ uint32_t attributes;
+};
+
+#endif /* SCMI_APCORE_H */