From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 7 Jun 2018 22:55:51 +0200 Subject: [U-Boot] [PATCH] spl: spi: Support full fitImage handling In-Reply-To: References: <20180531155929.30953-1-marex@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/07/2018 10:28 PM, Simon Glass wrote: > Hi Marek, > On 31 May 2018 at 07:59, Marek Vasut wrote: >> Handle the case where the full fitImage support is enabled. In this >> case, the whole fitImage must be loaded up front as some parts of the >> fitImage code require memory-mapped access to the entire fitImage. >> >> Signed-off-by: Marek Vasut >> Cc: Pantelis Antoniou >> Cc: Simon Glass >> --- >> common/spl/spl_spi.c | 13 +++++++++++-- >> 1 file changed, 11 insertions(+), 2 deletions(-) >> >> diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c >> index df46046729..ba60a3a3c5 100644 >> --- a/common/spl/spl_spi.c >> +++ b/common/spl/spl_spi.c >> @@ -110,8 +110,17 @@ static int spl_spi_load_image(struct spl_image_info *spl_image, >> return err; >> } >> >> - if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) && >> - image_get_magic(header) == FDT_MAGIC) { >> + if (IS_ENABLED(CONFIG_SPL_LOAD_FIT_FULL) && >> + image_get_magic(header) == FDT_MAGIC) { >> + err = spi_flash_read(flash, payload_offs, >> + roundup(fdt_totalsize(header), 4), >> + (void *)CONFIG_SYS_LOAD_ADDR); > > map_sysmem(CONFIG_SYS_LOAD_ADDR, fdt_totalsize(header)) > > otherwise your sandbox test won't work Is this map_sysmem stuff explained anywhere ? -- Best regards, Marek Vasut