sgm_bl31_setup.c 1.36 KB
Newer Older
1
2
3
4
5
6
/*
 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

7
8
#include <common/bl_common.h>
#include <common/debug.h>
9
#include <drivers/arm/css/scmi.h>
10
#include <plat/arm/common/plat_arm.h>
11

12
#include <sgm_plat_config.h>
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "../../css/drivers/mhu/css_mhu_doorbell.h"

static scmi_channel_plat_info_t sgm775_scmi_plat_info = {
		.scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE,
		.db_reg_addr = PLAT_CSS_MHU_BASE + CSS_SCMI_MHU_DB_REG_OFF,
		.db_preserve_mask = 0xfffffffe,
		.db_modify_mask = 0x1,
		.ring_doorbell = &mhu_ring_doorbell,
};

scmi_channel_plat_info_t *plat_css_get_scmi_info()
{
	return &sgm775_scmi_plat_info;
}
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
				u_register_t arg2, u_register_t arg3)
{
	uint32_t plat_version;
	bl_params_node_t *bl_params;

	bl_params = ((bl_params_t *)arg0)->head;

	/* Initialize the platform configuration structure */
	plat_config_init();

	while (bl_params) {
		if (bl_params->image_id == BL33_IMAGE_ID) {
			plat_version = mmio_read_32(SSC_VERSION);
			bl_params->ep_info->args.arg2 = plat_version;
			break;
		}

		bl_params = bl_params->next_params_info;
	}

	arm_bl31_early_platform_setup((void *)arg0, arg1, arg2, (void *)arg3);
}
51
52
53
54
55

const plat_psci_ops_t *plat_arm_psci_override_pm_ops(plat_psci_ops_t *ops)
{
	return css_scmi_override_pm_ops(ops);
}