aboutsummaryrefslogtreecommitdiff
path: root/product/tc0/scp_ramfw/config_scmi_clock.c
blob: 792d2ec05013e79e5469a0a8680b609a3b005e28 (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
42
43
44
45
46
47
48
49
50
51
/*
 * Arm SCP/MCP Software
 * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include "clock_soc.h"
#include "tc0_scmi.h"

#include <mod_scmi_clock.h>

#include <fwk_id.h>
#include <fwk_macros.h>
#include <fwk_module.h>
#include <fwk_module_idx.h>

static const struct mod_scmi_clock_device agent_device_table_ospm[] = {
    {
        /* DPU */
        .element_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_CLOCK, CLOCK_IDX_DPU),
    },
    {
        /* PIXEL_0 */
        .element_id =
            FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_CLOCK, CLOCK_IDX_PIXEL_0),
    },
    {
        /* PIXEL_1 */
        .element_id =
            FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_CLOCK, CLOCK_IDX_PIXEL_1),
    },
};

static const struct mod_scmi_clock_agent agent_table[SCP_SCMI_AGENT_ID_COUNT] =
    {
        [SCP_SCMI_AGENT_ID_PSCI] = { 0 /* No access */ },
        [SCP_SCMI_AGENT_ID_OSPM] =
            {
                .device_table = agent_device_table_ospm,
                .device_count = FWK_ARRAY_SIZE(agent_device_table_ospm),
            },
    };

const struct fwk_module_config config_scmi_clock = {
    .data = &((struct mod_scmi_clock_config){
        .max_pending_transactions = 0,
        .agent_table = agent_table,
        .agent_count = FWK_ARRAY_SIZE(agent_table),
    }),
};