Browse Source

plat/arm: Mark arm platform initialization functions

Mark the initialization functions found in the BL31 boot sequence
as __init so they can be reclaimed when no longer needed.

Change-Id: I687a89346419c7710ef5097feaa325d83c527697
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
pull/1603/head
Daniel Boulby 6 years ago
committed by Antonio Nino Diaz
parent
commit
4d010d0dc0
  1. 4
      plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.c
  2. 4
      plat/arm/board/fvp/fvp_bl31_setup.c
  3. 4
      plat/arm/board/fvp/fvp_common.c
  4. 8
      plat/arm/common/arm_bl31_setup.c
  5. 2
      plat/arm/common/arm_common.c
  6. 2
      plat/arm/common/arm_console.c
  7. 2
      plat/arm/common/arm_pm.c
  8. 4
      plat/arm/css/drivers/mhu/css_mhu.c
  9. 2
      plat/arm/css/drivers/scp/css_pm_scmi.c
  10. 2
      plat/arm/css/sgi/sgi_interconnect.c
  11. 4
      plat/arm/css/sgm/sgm_interconnect.c

4
plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.c

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -70,7 +70,7 @@ void fvp_pwrc_write_pcoffr(u_register_t mpidr)
}
/* Nothing else to do here apart from initializing the lock */
void plat_arm_pwrc_setup(void)
void __init plat_arm_pwrc_setup(void)
{
arm_lock_init();
}

4
plat/arm/board/fvp/fvp_bl31_setup.c

@ -10,8 +10,8 @@
#include <smmu_v3.h>
#include "fvp_private.h"
void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3)
void __init bl31_early_platform_setup2(u_register_t arg0,
u_register_t arg1, u_register_t arg2, u_register_t arg3)
{
arm_bl31_early_platform_setup((void *)arg0, arg1, arg2, (void *)arg3);

4
plat/arm/board/fvp/fvp_common.c

@ -241,7 +241,7 @@ const struct secure_partition_boot_info *plat_get_secure_partition_boot_info(
* these platforms. This information is stored in a per-BL array to allow the
* code to take the correct path.Per BL platform configuration.
******************************************************************************/
void fvp_config_setup(void)
void __init fvp_config_setup(void)
{
unsigned int rev, hbi, bld, arch, sys_id;
@ -331,7 +331,7 @@ void fvp_config_setup(void)
}
void fvp_interconnect_init(void)
void __init fvp_interconnect_init(void)
{
#if FVP_INTERCONNECT_DRIVER == FVP_CCN
if (ccn_get_part0_id(PLAT_ARM_CCN_BASE) != CCN_502_PART0_ID) {

8
plat/arm/common/arm_bl31_setup.c

@ -71,7 +71,7 @@ struct entry_point_info *bl31_plat_get_next_image_ep_info(uint32_t type)
* while creating page tables. BL2 has flushed this information to memory, so
* we are guaranteed to pick up good data.
******************************************************************************/
void arm_bl31_early_platform_setup(void *from_bl2, uintptr_t soc_fw_config,
void __init arm_bl31_early_platform_setup(void *from_bl2, uintptr_t soc_fw_config,
uintptr_t hw_config, void *plat_params_from_bl2)
{
/* Initialize the console to provide early debug support */
@ -235,7 +235,7 @@ void arm_bl31_plat_runtime_setup(void)
arm_console_runtime_init();
}
void bl31_platform_setup(void)
void __init bl31_platform_setup(void)
{
arm_bl31_platform_setup();
}
@ -251,7 +251,7 @@ void bl31_plat_runtime_setup(void)
* architectural setup (bl31_arch_setup()) does not do anything platform
* specific.
******************************************************************************/
void arm_bl31_plat_arch_setup(void)
void __init arm_bl31_plat_arch_setup(void)
{
const mmap_region_t bl_regions[] = {
MAP_BL31_TOTAL,
@ -273,7 +273,7 @@ void arm_bl31_plat_arch_setup(void)
arm_setup_romlib();
}
void bl31_plat_arch_setup(void)
void __init bl31_plat_arch_setup(void)
{
arm_bl31_plat_arch_setup();
}

2
plat/arm/common/arm_common.c

@ -41,7 +41,7 @@ void arm_setup_romlib(void)
* - Coherent memory region, if applicable.
*/
void arm_setup_page_tables(const mmap_region_t bl_regions[],
void __init arm_setup_page_tables(const mmap_region_t bl_regions[],
const mmap_region_t plat_regions[])
{
#if LOG_LEVEL >= LOG_LEVEL_VERBOSE

2
plat/arm/common/arm_console.c

@ -19,7 +19,7 @@ static console_pl011_t arm_runtime_console;
#endif
/* Initialize the console to provide early debug support */
void arm_console_boot_init(void)
void __init arm_console_boot_init(void)
{
#if MULTI_CONSOLE_API
int rc = console_pl011_register(PLAT_ARM_BOOT_UART_BASE,

2
plat/arm/common/arm_pm.c

@ -208,7 +208,7 @@ void plat_arm_program_trusted_mailbox(uintptr_t address)
* The ARM Standard platform definition of platform porting API
* `plat_setup_psci_ops`.
******************************************************************************/
int plat_setup_psci_ops(uintptr_t sec_entrypoint,
int __init plat_setup_psci_ops(uintptr_t sec_entrypoint,
const plat_psci_ops_t **psci_ops)
{
*psci_ops = plat_arm_psci_override_pm_ops(&plat_arm_psci_pm_ops);

4
plat/arm/css/drivers/mhu/css_mhu.c

@ -81,7 +81,7 @@ void mhu_secure_message_end(unsigned int slot_id)
arm_lock_release();
}
void mhu_secure_init(void)
void __init mhu_secure_init(void)
{
arm_lock_init();
@ -93,7 +93,7 @@ void mhu_secure_init(void)
assert(mmio_read_32(PLAT_CSS_MHU_BASE + CPU_INTR_S_STAT) == 0);
}
void plat_arm_pwrc_setup(void)
void __init plat_arm_pwrc_setup(void)
{
mhu_secure_init();
}

2
plat/arm/css/drivers/scp/css_pm_scmi.c

@ -328,7 +328,7 @@ static int scmi_ap_core_init(scmi_channel_t *ch)
return 0;
}
void plat_arm_pwrc_setup(void)
void __init plat_arm_pwrc_setup(void)
{
channel.info = &plat_css_scmi_plat_info;
channel.lock = ARM_LOCK_GET_INSTANCE;

2
plat/arm/css/sgi/sgi_interconnect.c

@ -17,7 +17,7 @@
/******************************************************************************
* Helper function to initialize ARM interconnect driver.
*****************************************************************************/
void plat_arm_interconnect_init(void)
void __init plat_arm_interconnect_init(void)
{
}

4
plat/arm/css/sgm/sgm_interconnect.c

@ -4,6 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <cdefs.h>
/*
* As the SGM platform supports FCM (with automatic interconnect
* enter/exit), we should not do anything in these interface functions.
@ -13,7 +15,7 @@
/******************************************************************************
* Helper function to initialize ARM interconnect driver.
*****************************************************************************/
void plat_arm_interconnect_init(void)
void __init plat_arm_interconnect_init(void)
{
}

Loading…
Cancel
Save