From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Goldschmidt Date: Sat, 6 Oct 2018 17:29:00 +0200 Subject: [U-Boot] [PATCH] spl: ram: Fix u_boot_pos calculation In-Reply-To: <7ba869c0f7d2292c597041109b21d5a7e8224e61.1538638158.git.michal.simek@xilinx.com> References: <7ba869c0f7d2292c597041109b21d5a7e8224e61.1538638158.git.michal.simek@xilinx.com> Message-ID: <7ac0ad6c-147c-fe28-cb17-480a0fac5c5e@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04.10.2018 09:29, Michal Simek wrote: > The patch: > "spl: Weed out CONFIG_SYS_TEXT_BASE usage" > (sha1: 04ce5427bd3914cab8be78513275a20ab878520a) > introduced bug where assigning to u_boot_pos variable wasn't done > which end up in situation where SPL wasn't able to find out > image on the selected address. > > Signed-off-by: Michal Simek I needed to apply this to boot my socfpga cyclone5 from FPGA (both SPL and U-Boot in FPGA onchip RAM). Tested-by: Simon Goldschmidt > --- > > Lines are unfortunatelly longer then 80 char limits but > there is no nice way how to fix it. > > --- > common/spl/spl_ram.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c > index 619b39a53748..5fcc3b1504bb 100644 > --- a/common/spl/spl_ram.c > +++ b/common/spl/spl_ram.c > @@ -63,9 +63,8 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, > * No binman support or no information. For now, fix it > * to the address pointed to by U-Boot. > */ > - header = spl_get_load_buffer(-sizeof(*header), > - sizeof(*header)); > - > + u_boot_pos = (ulong)spl_get_load_buffer(-sizeof(*header), > + sizeof(*header)); > } > header = (struct image_header *)map_sysmem(u_boot_pos, 0); >