mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 01:24:27 +00:00
Merge changes from topic "ADD_DELAY_IN_POLLING_SCMI" into integration
* changes: fix(scmi): induce a delay in monitoring SCMI channel status feat(css): initialise generic timer early in the boot
This commit is contained in:
commit
771a07156f
4 changed files with 16 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -9,6 +9,7 @@
|
|||
#include <arch_helpers.h>
|
||||
#include <common/debug.h>
|
||||
#include <drivers/arm/css/scmi.h>
|
||||
#include <drivers/delay_timer.h>
|
||||
|
||||
#include "scmi_private.h"
|
||||
|
||||
|
@ -60,8 +61,10 @@ void scmi_send_sync_command(scmi_channel_t *ch)
|
|||
dmbsy();
|
||||
|
||||
/* Wait for channel to be free */
|
||||
while (!SCMI_IS_CHANNEL_FREE(mbx_mem->status))
|
||||
;
|
||||
while (!SCMI_IS_CHANNEL_FREE(mbx_mem->status)) {
|
||||
if (ch->info->delay != 0)
|
||||
udelay(ch->info->delay);
|
||||
}
|
||||
|
||||
/*
|
||||
* Ensure that any read to the SCMI payload area is done after reading
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2021, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -123,6 +123,8 @@ typedef struct scmi_channel_plat_info {
|
|||
void (*ring_doorbell)(struct scmi_channel_plat_info *plat_info);
|
||||
/* cookie is unused now. But added for future enhancements. */
|
||||
void *cookie;
|
||||
/* Delay in micro-seconds while polling the channel status. */
|
||||
uint32_t delay;
|
||||
} scmi_channel_plat_info_t;
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2018-2022, Arm Limited and Contributors. All rights reserved.
|
||||
# Copyright (c) 2018-2024, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -50,7 +50,8 @@ BL2_SOURCES += ${CSS_ENT_BASE}/sgi_image_load.c \
|
|||
BL31_SOURCES += ${INTERCONNECT_SOURCES} \
|
||||
${ENT_GIC_SOURCES} \
|
||||
${CSS_ENT_BASE}/sgi_bl31_setup.c \
|
||||
${CSS_ENT_BASE}/sgi_topology.c
|
||||
${CSS_ENT_BASE}/sgi_topology.c \
|
||||
drivers/delay_timer/generic_delay_timer.c
|
||||
|
||||
ifneq (${RESET_TO_BL31},0)
|
||||
$(error "Using BL31 as the reset vector is not supported on ${PLAT} platform. \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2023, Arm Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2018-2024, Arm Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -12,6 +12,7 @@
|
|||
#include <common/debug.h>
|
||||
#include <drivers/arm/css/css_mhu_doorbell.h>
|
||||
#include <drivers/arm/css/scmi.h>
|
||||
#include <drivers/generic_delay_timer.h>
|
||||
#include <plat/arm/common/plat_arm.h>
|
||||
|
||||
#include <plat/common/platform.h>
|
||||
|
@ -104,6 +105,8 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
|||
|
||||
void sgi_bl31_common_platform_setup(void)
|
||||
{
|
||||
generic_delay_timer_init();
|
||||
|
||||
arm_bl31_platform_setup();
|
||||
|
||||
/* Configure the warm reboot SGI for primary core */
|
||||
|
|
Loading…
Add table
Reference in a new issue