From a5e7a2d487fc6b3a5e710571ceee4f5f3703ce9c Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Tue, 13 Aug 2019 20:43:50 +0800 Subject: [PATCH] spl_fit: update available case for mmc dma mmc dma can only access dram area, use DRAM base and max size to make it work for all socs. Change-Id: I7badfc11ccf4072d3c37b147485ca4708c6be906 Signed-off-by: Kever Yang --- common/spl/spl_fit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 7203d30d78..d22f75af9a 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -198,7 +198,8 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector, load_ptr = (load_addr + align_len) & ~align_len; #if defined(CONFIG_ARCH_ROCKCHIP) - if ((load_ptr & 0xffff0000) == CONFIG_ROCKCHIP_IRAM_START_ADDR) + if ((load_ptr < CONFIG_SYS_SDRAM_BASE) || + (load_ptr >= CONFIG_SYS_SDRAM_BASE + SDRAM_MAX_SIZE)) load_ptr = (ulong)memalign(ARCH_DMA_MINALIGN, len); #endif length = len;