mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-18 18:44:22 +00:00
feat(tc): add MHUv3 doorbell support on TC3
Enables the doorbell channels in MHUv3 for TC3. Change-Id: Ib4f47df3e54f9182939ea6c1d8bc1a66a3c03094 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Signed-off-by: Leo Yan <leo.yan@arm.com>
This commit is contained in:
parent
d2b1eb80af
commit
4f65c0beaa
2 changed files with 15 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2020, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2014-2024, Arm Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -22,6 +22,10 @@
|
|||
#define SENDER_REG_STAT(_channel) (0x20 * (_channel))
|
||||
#define SENDER_REG_SET(_channel) ((0x20 * (_channel)) + 0xC)
|
||||
|
||||
#define MHU_V3_PBX_PDBCW_PAGE_OFFSET UL(0x1000)
|
||||
#define MHU_V3_SENDER_REG_SET(_channel) (MHU_V3_PBX_PDBCW_PAGE_OFFSET + \
|
||||
SENDER_REG_SET(_channel))
|
||||
|
||||
/* Helper macro to ring doorbell */
|
||||
#define MHU_RING_DOORBELL(addr, modify_mask, preserve_mask) do { \
|
||||
uint32_t db = mmio_read_32(addr) & (preserve_mask); \
|
||||
|
|
|
@ -50,6 +50,7 @@ psa_status_t mbedtls_psa_external_get_random(
|
|||
}
|
||||
#endif /* PLATFORM_TEST_TFM_TESTSUITE */
|
||||
|
||||
#if TARGET_PLATFORM <= 2
|
||||
static scmi_channel_plat_info_t tc_scmi_plat_info = {
|
||||
.scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE,
|
||||
.db_reg_addr = PLAT_CSS_MHU_BASE + SENDER_REG_SET(0),
|
||||
|
@ -57,6 +58,15 @@ static scmi_channel_plat_info_t tc_scmi_plat_info = {
|
|||
.db_modify_mask = 0x1,
|
||||
.ring_doorbell = &mhuv2_ring_doorbell,
|
||||
};
|
||||
#elif TARGET_PLATFORM == 3
|
||||
static scmi_channel_plat_info_t tc_scmi_plat_info = {
|
||||
.scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE,
|
||||
.db_reg_addr = PLAT_CSS_MHU_BASE + MHU_V3_SENDER_REG_SET(0),
|
||||
.db_preserve_mask = 0xfffffffe,
|
||||
.db_modify_mask = 0x1,
|
||||
.ring_doorbell = &mhu_ring_doorbell,
|
||||
};
|
||||
#endif
|
||||
|
||||
void bl31_platform_setup(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue