aboutsummaryrefslogtreecommitdiff
path: root/product/sgi575
diff options
context:
space:
mode:
authorAmit Daniel Kachhap <amit.kachhap@arm.com>2018-07-20 15:30:36 +0530
committerronald-cron-arm <39518861+ronald-cron-arm@users.noreply.github.com>2018-10-18 17:22:34 +0000
commit30628a5952f68e7de7c0207055d9cc0fb965f27f (patch)
treec981074d91b1324fd43f597b0dcee874ad1b6895 /product/sgi575
parent125bab78711f1cf2c7ae0a454dbd03d3d63b51d4 (diff)
sgi575/scp_ramfw: Add SCMI config
Change-Id: If3b89979e75005d3946d651a2d758dc8b7e1fa6a Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Diffstat (limited to 'product/sgi575')
-rw-r--r--product/sgi575/scp_ramfw/config_scmi.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/product/sgi575/scp_ramfw/config_scmi.c b/product/sgi575/scp_ramfw/config_scmi.c
new file mode 100644
index 00000000..642a2956
--- /dev/null
+++ b/product/sgi575/scp_ramfw/config_scmi.c
@@ -0,0 +1,71 @@
+/*
+ * Arm SCP/MCP Software
+ * Copyright (c) 2018, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <fwk_element.h>
+#include <fwk_id.h>
+#include <fwk_macros.h>
+#include <fwk_module.h>
+#include <fwk_module_idx.h>
+#include <internal/scmi.h>
+#include <mod_scmi.h>
+#include <mod_smt.h>
+#include <scp_sgi575_scmi.h>
+
+static const struct fwk_element service_table[] = {
+ [SCP_SGI575_SCMI_SERVICE_IDX_PSCI] = {
+ .name = "SERVICE0",
+ .data = &((struct mod_scmi_service_config) {
+ .transport_id = FWK_ID_ELEMENT_INIT(
+ FWK_MODULE_IDX_SMT,
+ SCP_SGI575_SCMI_SERVICE_IDX_PSCI),
+ .transport_api_id = FWK_ID_API_INIT(
+ FWK_MODULE_IDX_SMT,
+ MOD_SMT_API_IDX_SCMI_TRANSPORT),
+ .scmi_agent_id = SCP_SCMI_AGENT_ID_PSCI,
+ }),
+ },
+ [SCP_SGI575_SCMI_SERVICE_IDX_OSPM] = {
+ .name = "SERVICE1",
+ .data = &((struct mod_scmi_service_config) {
+ .transport_id = FWK_ID_ELEMENT_INIT(
+ FWK_MODULE_IDX_SMT,
+ SCP_SGI575_SCMI_SERVICE_IDX_OSPM),
+ .transport_api_id = FWK_ID_API_INIT(
+ FWK_MODULE_IDX_SMT,
+ MOD_SMT_API_IDX_SCMI_TRANSPORT),
+ .scmi_agent_id = SCP_SCMI_AGENT_ID_OSPM,
+ }),
+ },
+ [SCP_SGI575_SCMI_SERVICE_IDX_COUNT] = { 0 }
+};
+
+static const struct fwk_element *get_service_table(fwk_id_t module_id)
+{
+ return service_table;
+}
+
+static struct mod_scmi_agent agent_table[] = {
+ [SCP_SCMI_AGENT_ID_OSPM] = {
+ .type = SCMI_AGENT_TYPE_OSPM,
+ .name = "OSPM",
+ },
+ [SCP_SCMI_AGENT_ID_PSCI] = {
+ .type = SCMI_AGENT_TYPE_PSCI,
+ .name = "PSCI",
+ },
+};
+
+const struct fwk_module_config config_scmi = {
+ .get_element_table = get_service_table,
+ .data = &((struct mod_scmi_config) {
+ .protocol_count_max = 8,
+ .agent_count = FWK_ARRAY_SIZE(agent_table) - 1,
+ .agent_table = agent_table,
+ .vendor_identifier = "arm",
+ .sub_vendor_identifier = "arm",
+ }),
+};