From b840662cb0b3cb8d8c29b49d4f77e1762152a2c4 Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Tue, 25 Sep 2018 14:54:23 +0100 Subject: [PATCH] ls1043: Migrate to new interfaces - Migrate to new GIC interfaces. - Remove references to removed build options. Change-Id: I6f90a33d5438a9d7b71be3f93e8d9da278c8c6e6 Signed-off-by: Antonio Nino Diaz --- plat/layerscape/board/ls1043/platform.mk | 1 - plat/layerscape/common/ls_bl31_setup.c | 13 ++++++++----- plat/layerscape/common/ls_common.mk | 13 ------------- plat/layerscape/common/tsp/ls_tsp_setup.c | 13 ++++++++----- 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/plat/layerscape/board/ls1043/platform.mk b/plat/layerscape/board/ls1043/platform.mk index 163d25e82..c554ac30d 100644 --- a/plat/layerscape/board/ls1043/platform.mk +++ b/plat/layerscape/board/ls1043/platform.mk @@ -63,7 +63,6 @@ BL31_SOURCES += plat/layerscape/board/ls1043/ls1043_bl31_setup.c \ ${LS1043_SECURITY_SOURCES} # Disable the PSCI platform compatibility layer -ENABLE_PLAT_COMPAT := 0 MULTI_CONSOLE_API := 1 # Enable workarounds for selected Cortex-A53 erratas. diff --git a/plat/layerscape/common/ls_bl31_setup.c b/plat/layerscape/common/ls_bl31_setup.c index 25fe407c5..1114a51e8 100644 --- a/plat/layerscape/common/ls_bl31_setup.c +++ b/plat/layerscape/common/ls_bl31_setup.c @@ -7,8 +7,10 @@ #include #include #include -#include #include +#include +#include + #include "ls_16550.h" #include "plat_ls.h" #include "soc.h" @@ -20,15 +22,16 @@ static entry_point_info_t bl32_image_ep_info; static entry_point_info_t bl33_image_ep_info; -const unsigned int g0_interrupt_array1[] = { - 9 +static const interrupt_prop_t g0_interrupt_props[] = { + INTR_PROP_DESC(9, GIC_HIGHEST_SEC_PRIORITY, + GICV2_INTR_GROUP0, GIC_INTR_CFG_LEVEL), }; gicv2_driver_data_t ls_gic_data = { .gicd_base = GICD_BASE, .gicc_base = GICC_BASE, - .g0_interrupt_num = ARRAY_SIZE(g0_interrupt_array1), - .g0_interrupt_array = g0_interrupt_array1, + .interrupt_props = g0_interrupt_props, + .interrupt_props_num = ARRAY_SIZE(g0_interrupt_props), }; diff --git a/plat/layerscape/common/ls_common.mk b/plat/layerscape/common/ls_common.mk index 1a80e9f24..5d96aed1c 100644 --- a/plat/layerscape/common/ls_common.mk +++ b/plat/layerscape/common/ls_common.mk @@ -13,13 +13,6 @@ LS1043_DISABLE_TRUSTED_WDOG := 1 # mapping the former as executable and the latter as execute-never. SEPARATE_CODE_AND_RODATA := 1 -# Enable new version of image loading on Layerscape platforms -LOAD_IMAGE_V2 := 1 - -# Use generic OID definition (tbbr_oid.h) -USE_TBBR_DEFS := 1 - - COLD_BOOT_SINGLE_CPU := 1 PLAT_INCLUDES += -Iinclude/common/tbbr @@ -54,9 +47,3 @@ BL31_SOURCES += plat/layerscape/common/ls_bl31_setup.c \ plat/layerscape/common/ls_topology.c \ plat/layerscape/common/ns_access.c \ plat/common/plat_psci_common.c -# Verify build config -# ------------------- - -ifneq (${LOAD_IMAGE_V2}, 1) - $(error Error: Layerscape needs LOAD_IMAGE_V2=1) -endif diff --git a/plat/layerscape/common/tsp/ls_tsp_setup.c b/plat/layerscape/common/tsp/ls_tsp_setup.c index 82ac965cb..a046e2f2d 100644 --- a/plat/layerscape/common/tsp/ls_tsp_setup.c +++ b/plat/layerscape/common/tsp/ls_tsp_setup.c @@ -4,23 +4,26 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#include #include +#include +#include + #include "ls_16550.h" #include "plat_ls.h" #include "soc.h" #define BL32_END (unsigned long)(&__BL32_END__) -const unsigned int g0_interrupt_array1[] = { - 9 +static const interrupt_prop_t g0_interrupt_props[] = { + INTR_PROP_DESC(9, GIC_HIGHEST_SEC_PRIORITY, + GICV2_INTR_GROUP0, GIC_INTR_CFG_LEVEL), }; gicv2_driver_data_t ls_gic_data = { .gicd_base = GICD_BASE, .gicc_base = GICC_BASE, - .g0_interrupt_num = ARRAY_SIZE(g0_interrupt_array1), - .g0_interrupt_array = g0_interrupt_array1, + .interrupt_props = g0_interrupt_props, + .interrupt_props_num = ARRAY_SIZE(g0_interrupt_props), }; /*******************************************************************************