From a9f9b608bba907f20693f4dce2cdb070012f0f87 Mon Sep 17 00:00:00 2001 From: Soby Mathew Date: Wed, 15 Nov 2017 12:05:28 +0000 Subject: [PATCH] Juno AArch32: Remove duplicate definition of bl2 platform API The bl2_early_platform_setup() and bl2_platform_setup() were redefined for Juno AArch32 eventhough CSS platform layer had same definition for them. The CSS definitions definitions were previously restricted to EL3_PAYLOAD_BASE builds and this is now modified to include the Juno AArch32 builds as well thus allowing us to remove the duplicate definitions in Juno platform layer. Change-Id: Ibd1d8c1428cc1d51ac0ba90f19f5208ff3278ab5 Signed-off-by: Soby Mathew --- plat/arm/board/juno/juno_bl2_setup.c | 29 ---------------------------- plat/arm/css/common/css_bl2_setup.c | 8 ++++---- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/plat/arm/board/juno/juno_bl2_setup.c b/plat/arm/board/juno/juno_bl2_setup.c index 2771e0f379..cedef66c9a 100644 --- a/plat/arm/board/juno/juno_bl2_setup.c +++ b/plat/arm/board/juno/juno_bl2_setup.c @@ -29,33 +29,4 @@ int bl2_plat_handle_post_image_load(unsigned int image_id) return err; } - -#if !CSS_USE_SCMI_SDS_DRIVER -/* - * We need to override some of the platform functions when booting SP_MIN - * on Juno AArch32. These needs to be done only for SCPI/BOM SCP systems as - * in case of SDS, the structures remain in memory and doesn't need to be - * overwritten. - */ - -static unsigned int scp_boot_config; - -void bl2_early_platform_setup(meminfo_t *mem_layout) -{ - arm_bl2_early_platform_setup(mem_layout); - - /* Save SCP Boot config before it gets overwritten by SCP_BL2 loading */ - VERBOSE("BL2: Saving SCP Boot config = 0x%x\n", scp_boot_config); - scp_boot_config = mmio_read_32(SCP_BOOT_CFG_ADDR); -} - -void bl2_platform_setup(void) -{ - arm_bl2_platform_setup(); - - mmio_write_32(SCP_BOOT_CFG_ADDR, scp_boot_config); - VERBOSE("BL2: Restored SCP Boot config = 0x%x\n", scp_boot_config); -} -#endif - #endif /* JUNO_AARCH32_EL3_RUNTIME */ diff --git a/plat/arm/css/common/css_bl2_setup.c b/plat/arm/css/common/css_bl2_setup.c index 9b4800e340..b4aafd464a 100644 --- a/plat/arm/css/common/css_bl2_setup.c +++ b/plat/arm/css/common/css_bl2_setup.c @@ -49,13 +49,13 @@ int bl2_plat_handle_scp_bl2(image_info_t *scp_bl2_image_info) } #if !CSS_USE_SCMI_SDS_DRIVER -# ifdef EL3_PAYLOAD_BASE +# if defined(EL3_PAYLOAD_BASE) || JUNO_AARCH32_EL3_RUNTIME /* * We need to override some of the platform functions when booting an EL3 - * payload. These needs to be done only for SCPI/BOM SCP systems as - * in case of SDS, the structures remain in memory and doesn't need to be - * overwritten. + * payload or SP_MIN on Juno AArch32. This needs to be done only for + * SCPI/BOM SCP systems as in case of SDS, the structures remain in memory and + * don't need to be overwritten. */ static unsigned int scp_boot_config;