aboutsummaryrefslogtreecommitdiff
path: root/product/n1sdp/mcp_ramfw/config_scmi_agent.c
blob: 28a08bb64fe49a93c91321606d1746d9fe4681a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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,
};