diff options
author | Manoj Kumar <manoj.kumar3@arm.com> | 2018-11-13 13:31:52 +0530 |
---|---|---|
committer | ronald-cron-arm <39518861+ronald-cron-arm@users.noreply.github.com> | 2018-11-28 18:02:20 +0100 |
commit | 3aeb7ca72969ae9d70505fe3b2b471bb2569d619 (patch) | |
tree | 3921e1a5b4d3add0f9dda332941b492b6d82a274 | |
parent | 2a4ecd2216e46529464bd81502638f2da0e9e27b (diff) |
n1sdp: add n1sdp_mhu/n1sdp_smt/agent config files for mcp ramfw
Change-Id: Id1e28c23e4c547b5e726bb8758ba4fb6ee048aa7
Signed-off-by: Manoj Kumar <manoj.kumar3@arm.com>
-rw-r--r-- | product/n1sdp/mcp_ramfw/config_mhu.c | 36 | ||||
-rw-r--r-- | product/n1sdp/mcp_ramfw/config_scmi_agent.c | 41 | ||||
-rw-r--r-- | product/n1sdp/mcp_ramfw/config_smt.c | 40 |
3 files changed, 117 insertions, 0 deletions
diff --git a/product/n1sdp/mcp_ramfw/config_mhu.c b/product/n1sdp/mcp_ramfw/config_mhu.c new file mode 100644 index 00000000..8466a478 --- /dev/null +++ b/product/n1sdp/mcp_ramfw/config_mhu.c @@ -0,0 +1,36 @@ +/* + * 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_module.h> +#include <mod_mhu.h> +#include <n1sdp_mcp_irq.h> +#include <n1sdp_mcp_mhu.h> +#include <n1sdp_mcp_mmap.h> + +static const struct fwk_element mhu_element_table[] = { + [N1SDP_MHU_DEVICE_IDX_S_SCP] = { + .name = "SCP_MCP_MHU_S", + .sub_element_count = 1, + .data = &((struct mod_mhu_device_config) { + .irq = MHU_SCP_SEC_IRQ, + .in = MHU_SCP_TO_MCP_S, + .out = MHU_MCP_TO_SCP_S, + }) + }, + [N1SDP_MHU_DEVICE_IDX_COUNT] = { 0 }, +}; + +static const struct fwk_element *mhu_get_element_table(fwk_id_t module_id) +{ + return mhu_element_table; +} + +struct fwk_module_config config_n1sdp_mhu = { + .get_element_table = mhu_get_element_table, +}; diff --git a/product/n1sdp/mcp_ramfw/config_scmi_agent.c b/product/n1sdp/mcp_ramfw/config_scmi_agent.c new file mode 100644 index 00000000..28a08bb6 --- /dev/null +++ b/product/n1sdp/mcp_ramfw/config_scmi_agent.c @@ -0,0 +1,41 @@ +/* + * Arm SCP/MCP Software + * Copyright (c) 2018, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <stdbool.h> +#include <fwk_element.h> +#include <fwk_id.h> +#include <fwk_macros.h> +#include <fwk_module.h> +#include <fwk_module_idx.h> +#include <mod_scmi_agent.h> +#include <mod_smt.h> +#include <n1sdp_mcp_scmi.h> + +static const struct fwk_element agent_table[] = { + [MCP_N1SDP_SCMI_AGENT_IDX_MANAGEMENT] = { + .name = "MCP-AGENT", + .data = &((struct mod_scmi_agent_config) { + .transport_id = FWK_ID_ELEMENT_INIT( + FWK_MODULE_IDX_N1SDP_SMT, + MCP_N1SDP_SCMI_AGENT_IDX_MANAGEMENT), + .transport_api_id = FWK_ID_API_INIT( + FWK_MODULE_IDX_N1SDP_SMT, + MOD_SMT_API_IDX_SCMI_AGENT_TRANSPORT), + }), + }, + [MCP_N1SDP_SCMI_AGENT_IDX_COUNT] = { 0 } +}; + +static const struct fwk_element *get_agent_table(fwk_id_t module_id) +{ + return agent_table; +} + +const struct fwk_module_config config_scmi_agent = { + .get_element_table = get_agent_table, + .data = NULL, +}; diff --git a/product/n1sdp/mcp_ramfw/config_smt.c b/product/n1sdp/mcp_ramfw/config_smt.c new file mode 100644 index 00000000..d3ae55ef --- /dev/null +++ b/product/n1sdp/mcp_ramfw/config_smt.c @@ -0,0 +1,40 @@ +/* + * Arm SCP/MCP Software + * Copyright (c) 2018, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <stdint.h> +#include <fwk_element.h> +#include <fwk_id.h> +#include <fwk_module.h> +#include <fwk_module_idx.h> +#include <mod_smt.h> +#include <n1sdp_mcp_mhu.h> +#include <n1sdp_mcp_software_mmap.h> + +static const struct fwk_element smt_element_table[] = { + [0] = { + .name = "MANAGEMENT-S", + .data = &((struct mod_smt_channel_config) { + .type = MOD_SMT_CHANNEL_TYPE_MASTER, + .policies = MOD_SMT_POLICY_INIT_MAILBOX | MOD_SMT_POLICY_SECURE, + .mailbox_address = (uintptr_t)SCMI_PAYLOAD_SCP_TO_MCP_S, + .mailbox_size = MCP_SCMI_PAYLOAD_SIZE, + .driver_id = FWK_ID_SUB_ELEMENT_INIT(FWK_MODULE_IDX_N1SDP_MHU, + N1SDP_MHU_DEVICE_IDX_S_SCP, 0), + .driver_api_id = FWK_ID_API_INIT(FWK_MODULE_IDX_N1SDP_MHU, 0), + }) + }, + [1] = { 0 }, +}; + +static const struct fwk_element *smt_get_element_table(fwk_id_t module_id) +{ + return smt_element_table; +} + +const struct fwk_module_config config_n1sdp_smt = { + .get_element_table = smt_get_element_table, +}; |