From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 1/3] spl: fit: Fix the number of bytes read when reading fdt from fit
Date: Wed, 4 May 2016 15:56:02 +0200 [thread overview]
Message-ID: <5729FF72.40200@xilinx.com> (raw)
In-Reply-To: <1462363477-20445-2-git-send-email-lokeshvutla@ti.com>
On 4.5.2016 14:04, Lokesh Vutla wrote:
> sectors field is not being updated when reading fdt from fit image. Because of
> this size_of(u-boot.bin) is being read when reading fdt. Fixing it by updating
> the sectors field properly.
>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
> common/spl/spl_fit.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
> index 1a5c027..b1cfa97 100644
> --- a/common/spl/spl_fit.c
> +++ b/common/spl/spl_fit.c
> @@ -176,6 +176,7 @@ int spl_load_simple_fit(struct spl_load_info *info, ulong sector, void *fit)
> */
> dst = load_ptr + data_size;
> fdt_offset += base_offset;
> + sectors = (fdt_len + info->bl_len - 1) / info->bl_len;
> count = info->read(info, sector + fdt_offset / info->bl_len, sectors,
> dst);
> debug("fit read %x sectors to %x, dst %p, data_offset %x\n",
>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Thanks,
Michal
next prev parent reply other threads:[~2016-05-04 13:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 12:04 [U-Boot] [PATCH v5 0/3] spl: Add support to load FIT from Filesystem Lokesh Vutla
2016-05-04 12:04 ` [U-Boot] [PATCH v5 1/3] spl: fit: Fix the number of bytes read when reading fdt from fit Lokesh Vutla
2016-05-04 13:56 ` Michal Simek [this message]
2016-05-06 17:47 ` Tom Rini
2016-05-19 3:59 ` Simon Glass
2016-05-04 12:04 ` [U-Boot] [PATCH v5 2/3] spl: Allow to load a FIT containing U-Boot from FS Lokesh Vutla
2016-05-04 14:56 ` Michal Simek
2016-05-06 17:47 ` Tom Rini
2016-05-19 3:59 ` Simon Glass
2016-05-04 12:04 ` [U-Boot] [PATCH v5 3/3] spl: Support loading a FIT from FAT FS Lokesh Vutla
2016-05-04 14:56 ` Michal Simek
2016-05-06 17:47 ` Tom Rini
2016-05-19 3:59 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5729FF72.40200@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox