From: Tien Fong Chee <tien.fong.c...@intel.com> Allocate buffers from OCRAM heap for the image headers in SPL on Arria10, since DRAM is not available at that point. This allows U-Boot to load the fitImage header, parse it, extract the FPGA bitstream section from it, program the FPGA and make DRAM available.
Signed-off-by: Marek Vasut <ma...@denx.de> --- arch/arm/mach-socfpga/spl_a10.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c index 2baeba6..7fe9790 100644 --- a/arch/arm/mach-socfpga/spl_a10.c +++ b/arch/arm/mach-socfpga/spl_a10.c @@ -9,6 +9,7 @@ #include <asm/u-boot.h> #include <asm/utils.h> #include <image.h> +#include <malloc.h> #include <asm/arch/reset_manager.h> #include <spl.h> #include <asm/arch/system_manager.h> @@ -157,4 +158,14 @@ int board_fit_config_name_match(const char *name) return 0; } + +struct image_header *spl_get_load_buffer(int offset, size_t size) +{ + struct image_header *mem = memalign(4, size); + + if (!mem) + hang(); + + return mem; +} #endif -- 1.7.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot