spl: fit: use ddr for mmc read buffer in SPL

SPL need read data to IRAM for bl31(m0&data), but the SDHCI does
not support this path, we need to use DDR space as buffer.
The SDHCI driver do not have any error/warning if we set the
destination address to IRAM, and complete seems normally, but
the data is not transfer.

Change-Id: Ied9eed835961470bc87fda99a1565992c4103d9c
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
Kever Yang 2018-11-12 16:18:01 +08:00
parent f766982448
commit 90d1164a04
1 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@
#include <image.h>
#include <libfdt.h>
#include <spl.h>
#include <malloc.h>
#ifndef CONFIG_SYS_BOOTM_LEN
#define CONFIG_SYS_BOOTM_LEN (64 << 20)
@ -196,6 +197,10 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
return -ENOENT;
load_ptr = (load_addr + align_len) & ~align_len;
#ifdef CONFIG_ROCKCHIP_RK3399
if ((load_ptr & 0xffff0000) == CONFIG_ROCKCHIP_IRAM_START_ADDR)
load_ptr = (ulong)memalign(ARCH_DMA_MINALIGN, len);
#endif
length = len;
overhead = get_aligned_image_overhead(info, offset);