blob: ecec26c05e56f2d9bb50f48173a15c89e1459097 [file] [log] [blame]
Usama Arifbec5afd2020-04-17 16:13:39 +01001/*
2 * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <assert.h>
8
9#include <libfdt.h>
Usama Ariff1513622021-04-09 17:07:41 +010010#include <tc_plat.h>
Usama Arifbec5afd2020-04-17 16:13:39 +010011
12#include <common/bl_common.h>
13#include <common/debug.h>
14#include <drivers/arm/css/css_mhu_doorbell.h>
15#include <drivers/arm/css/scmi.h>
16#include <plat/arm/common/plat_arm.h>
17#include <plat/common/platform.h>
18
Usama Ariff1513622021-04-09 17:07:41 +010019static scmi_channel_plat_info_t tc_scmi_plat_info[] = {
Usama Arifbec5afd2020-04-17 16:13:39 +010020 {
21 .scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE,
22 .db_reg_addr = PLAT_CSS_MHU_BASE + SENDER_REG_SET(0),
23 .db_preserve_mask = 0xfffffffe,
24 .db_modify_mask = 0x1,
25 .ring_doorbell = &mhuv2_ring_doorbell,
26 }
27};
28
29void bl31_platform_setup(void)
30{
Usama Ariff1513622021-04-09 17:07:41 +010031 tc_bl31_common_platform_setup();
Usama Arifbec5afd2020-04-17 16:13:39 +010032}
33
34scmi_channel_plat_info_t *plat_css_get_scmi_info(int channel_id)
35{
36
Usama Ariff1513622021-04-09 17:07:41 +010037 return &tc_scmi_plat_info[channel_id];
Usama Arifbec5afd2020-04-17 16:13:39 +010038
39}
40
41void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
42 u_register_t arg2, u_register_t arg3)
43{
44 arm_bl31_early_platform_setup((void *)arg0, arg1, arg2, (void *)arg3);
45}
46
Usama Ariff1513622021-04-09 17:07:41 +010047void tc_bl31_common_platform_setup(void)
Usama Arifbec5afd2020-04-17 16:13:39 +010048{
49 arm_bl31_platform_setup();
50}
51
52const plat_psci_ops_t *plat_arm_psci_override_pm_ops(plat_psci_ops_t *ops)
53{
54 return css_scmi_override_pm_ops(ops);
55}