spl: atf: move storage for bl31_params into function
authorMichael Walle <michael@walle.cc>
Wed, 18 Nov 2020 16:45:55 +0000 (17:45 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 4 Dec 2020 21:09:05 +0000 (16:09 -0500)
There is no need to have the storage available globally. This is also a
preparation for LOAD_IMAGE_V2 support. That will introduce a similar
generator function which also has its own storage.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Michal Simek <michal.simek@xilinx.com>
common/spl/spl_atf.c

index 9bd25f6..df0a198 100644 (file)
 #include <spl.h>
 #include <asm/cache.h>
 
-static struct bl2_to_bl31_params_mem bl31_params_mem;
-static struct bl31_params *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)
 {
+       static struct bl2_to_bl31_params_mem bl31_params_mem;
+       struct bl31_params *bl2_to_bl31_params;
        struct entry_point_info *bl32_ep_info;
        struct entry_point_info *bl33_ep_info;