aboutsummaryrefslogtreecommitdiff
path: root/common/spl/spl_atf.c
diff options
context:
space:
mode:
authorMichael Walle2020-11-18 17:45:56 +0100
committerTom Rini2020-12-04 16:09:05 -0500
commitd2cb0c8f759ddc9cbc063816454d5f0d18d7fcb1 (patch)
tree4a3f7f013595eee10cc1a4f1ce6e57c12d630e5a /common/spl/spl_atf.c
parent37c218a06e50727ee5b13640f0cfeee396dc1c10 (diff)
spl: atf: provide a bl2_plat_get_bl31_params_default()
Move the actual implementation of the bl2_plat_get_bl31_params() to its own function. The weak function will just call the default implementation. This has the advantage that board code can still call the original implementation if it just want to modify minor things. Signed-off-by: Michael Walle <michael@walle.cc>
Diffstat (limited to 'common/spl/spl_atf.c')
-rw-r--r--common/spl/spl_atf.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index df0a198d550..63af6a62072 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -18,9 +18,9 @@
#include <spl.h>
#include <asm/cache.h>
-__weak struct bl31_params *bl2_plat_get_bl31_params(uintptr_t bl32_entry,
- uintptr_t bl33_entry,
- uintptr_t fdt_addr)
+struct bl31_params *bl2_plat_get_bl31_params_default(uintptr_t bl32_entry,
+ uintptr_t bl33_entry,
+ uintptr_t fdt_addr)
{
static struct bl2_to_bl31_params_mem bl31_params_mem;
struct bl31_params *bl2_to_bl31_params;
@@ -77,6 +77,14 @@ __weak struct bl31_params *bl2_plat_get_bl31_params(uintptr_t bl32_entry,
return bl2_to_bl31_params;
}
+__weak struct bl31_params *bl2_plat_get_bl31_params(uintptr_t bl32_entry,
+ uintptr_t bl33_entry,
+ uintptr_t fdt_addr)
+{
+ return bl2_plat_get_bl31_params_default(bl32_entry, bl33_entry,
+ fdt_addr);
+}
+
static inline void raw_write_daif(unsigned int daif)
{
__asm__ __volatile__("msr DAIF, %0\n\t" : : "r" (daif) : "memory");