Commit 4d010d0d authored by Daniel Boulby's avatar Daniel Boulby Committed by Antonio Nino Diaz
Browse files

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: default avatarDaniel Boulby <daniel.boulby@arm.com>
parent 87c85134
/*
* 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();
}
......
......@@ -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);
......
......@@ -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) {
......
......@@ -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();
}
......@@ -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
......
......@@ -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,
......
......@@ -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);
......
......@@ -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();
}
......@@ -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;
......
......@@ -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,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)
{
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment