[U-Boot] [PATCH] drivers:dfu:dfu_sf: Fix upload - add partition/altsetting start address
Lukasz Majewski
l.majewski at samsung.com
Wed Nov 16 15:59:44 CET 2016
Hi michael.hennerich at analog.com,
> From: Michael Hennerich <michael.hennerich at analog.com>
>
> This fixes a bug seen with DFU Serial Flash upload/medium-read in case
> dfu->data.sf.start > 0.
>
>
> Signed-off-by: Michael Hennerich <michael.hennerich at analog.com>
> ---
> drivers/dfu/dfu_sf.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c
> index 9702eee..51c9b7f 100644
> --- a/drivers/dfu/dfu_sf.c
> +++ b/drivers/dfu/dfu_sf.c
> @@ -20,7 +20,8 @@ static long dfu_get_medium_size_sf(struct
> dfu_entity *dfu) static int dfu_read_medium_sf(struct dfu_entity
> *dfu, u64 offset, void *buf, long *len)
> {
> - return spi_flash_read(dfu->data.sf.dev, offset, *len, buf);
> + return spi_flash_read(dfu->data.sf.dev, dfu->data.sf.start +
> offset,
> + *len, buf);
> }
>
> static u64 find_sector(struct dfu_entity *dfu, u64 start, u64 offset)
Thanks for the patch.
Acked-by: Lukasz Majewski <l.majewski at samsung.com>
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
More information about the U-Boot
mailing list