mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
fix(el3-runtime): leverage generic interrupt controller helpers
Rather than validating the type of interrupts supported by the platform interrupt controller, the interrupt management framework can directly use helper utilities implemented by the generic interrupt controller driver. Change-Id: I735f8d2742a2c7974d11c0a5ddc771ad807c635c Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
This commit is contained in:
parent
632e5ffeb8
commit
07f867b122
3 changed files with 11 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2020, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2014-2023, Arm Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -47,9 +47,9 @@ static intr_type_desc_t intr_type_descs[MAX_INTR_TYPES];
|
|||
******************************************************************************/
|
||||
static int32_t validate_interrupt_type(uint32_t type)
|
||||
{
|
||||
if ((type == INTR_TYPE_S_EL1) || (type == INTR_TYPE_NS) ||
|
||||
(type == INTR_TYPE_EL3))
|
||||
if (plat_ic_has_interrupt_type(type) != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -237,9 +237,12 @@ void plat_ic_set_interrupt_priority(unsigned int id, unsigned int priority)
|
|||
|
||||
int plat_ic_has_interrupt_type(unsigned int type)
|
||||
{
|
||||
assert((type == INTR_TYPE_EL3) || (type == INTR_TYPE_S_EL1) ||
|
||||
(type == INTR_TYPE_NS));
|
||||
return 1;
|
||||
if ((type == INTR_TYPE_EL3) || (type == INTR_TYPE_S_EL1) ||
|
||||
(type == INTR_TYPE_NS)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void plat_ic_set_interrupt_type(unsigned int id, unsigned int type)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved.
|
||||
# Copyright (c) 2013-2023, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -44,6 +44,7 @@ BL2_SOURCES += common/desc_image_load.c \
|
|||
plat/rpi/common/rpi3_io_storage.c
|
||||
|
||||
BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \
|
||||
plat/common/plat_gicv2.c \
|
||||
plat/common/plat_psci_common.c \
|
||||
plat/rpi/rpi3/rpi3_bl31_setup.c \
|
||||
plat/rpi/common/rpi3_pm.c \
|
||||
|
|
Loading…
Add table
Reference in a new issue