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.
Tested-by: Michal Simek <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Signed-off-by: Lokesh Vutla <[email protected]>
*/
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",