blob: 29c32e7cf7e4df59b38a5b6eae8d05ad9c127f95 [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
7#include <bl_common.h>
8#include <debug.h>
9#include <plat_arm.h>
10#include <sgm_plat_config.h>
Chandni Cherukuri61f3a7c2018-10-11 14:08:08 +053011#include "../../css/drivers/scmi/scmi.h"
12#include "../../css/drivers/mhu/css_mhu_doorbell.h"
13
14static scmi_channel_plat_info_t sgm775_scmi_plat_info = {
15 .scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE,
16 .db_reg_addr = PLAT_CSS_MHU_BASE + CSS_SCMI_MHU_DB_REG_OFF,
17 .db_preserve_mask = 0xfffffffe,
18 .db_modify_mask = 0x1,
19 .ring_doorbell = &mhu_ring_doorbell,
20};
21
22scmi_channel_plat_info_t *plat_css_get_scmi_info()
23{
24 return &sgm775_scmi_plat_info;
25}
Nariman Poushinc703f902018-03-07 10:29:57 +000026
27void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
28 u_register_t arg2, u_register_t arg3)
29{
30 uint32_t plat_version;
31 bl_params_node_t *bl_params;
32
33 bl_params = ((bl_params_t *)arg0)->head;
34
35 /* Initialize the platform configuration structure */
36 plat_config_init();
37
38 while (bl_params) {
39 if (bl_params->image_id == BL33_IMAGE_ID) {
40 plat_version = mmio_read_32(SSC_VERSION);
41 bl_params->ep_info->args.arg2 = plat_version;
42 break;
43 }
44
45 bl_params = bl_params->next_params_info;
46 }
47
48 arm_bl31_early_platform_setup((void *)arg0, arg1, arg2, (void *)arg3);
49}