blob: 7967cb59c4de29bccdb1b65495b72ed1d6b1a306 [file] [log] [blame]
Nariman Poushinc703f902018-03-07 10:29:57 +00001/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00007#include <common/bl_common.h>
8#include <common/debug.h>
9
Nariman Poushinc703f902018-03-07 10:29:57 +000010#include <plat_arm.h>
11#include <sgm_plat_config.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000012
Chandni Cherukuri61f3a7c2018-10-11 14:08:08 +053013#include "../../css/drivers/scmi/scmi.h"
14#include "../../css/drivers/mhu/css_mhu_doorbell.h"
15
16static scmi_channel_plat_info_t sgm775_scmi_plat_info = {
17 .scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE,
18 .db_reg_addr = PLAT_CSS_MHU_BASE + CSS_SCMI_MHU_DB_REG_OFF,
19 .db_preserve_mask = 0xfffffffe,
20 .db_modify_mask = 0x1,
21 .ring_doorbell = &mhu_ring_doorbell,
22};
23
24scmi_channel_plat_info_t *plat_css_get_scmi_info()
25{
26 return &sgm775_scmi_plat_info;
27}
Nariman Poushinc703f902018-03-07 10:29:57 +000028
29void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
30 u_register_t arg2, u_register_t arg3)
31{
32 uint32_t plat_version;
33 bl_params_node_t *bl_params;
34
35 bl_params = ((bl_params_t *)arg0)->head;
36
37 /* Initialize the platform configuration structure */
38 plat_config_init();
39
40 while (bl_params) {
41 if (bl_params->image_id == BL33_IMAGE_ID) {
42 plat_version = mmio_read_32(SSC_VERSION);
43 bl_params->ep_info->args.arg2 = plat_version;
44 break;
45 }
46
47 bl_params = bl_params->next_params_info;
48 }
49
50 arm_bl31_early_platform_setup((void *)arg0, arg1, arg2, (void *)arg3);
51}
Chandni Cherukurie4bf6a02018-11-14 13:43:59 +053052
53const plat_psci_ops_t *plat_arm_psci_override_pm_ops(plat_psci_ops_t *ops)
54{
55 return css_scmi_override_pm_ops(ops);
56}