Re: [U-Boot] [PATCH] dfu: dfu_sf: Fix read offset

2016-11-14 Thread Lukasz Majewski
Hi Phil,

> The offset was applied to write, but not read, now its applied to
> both.
> 
> Signed-off-by: Phil Edworthy 
> ---
>  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..b6d5fe2 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)

Acked-by: Lukasz Majewski 

-- 
Best regards,

Lukasz Majewski

Samsung R Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] dfu: dfu_sf: Fix read offset

2016-11-14 Thread Fabio Estevam
On Mon, Nov 14, 2016 at 1:19 PM, Phil Edworthy
 wrote:
> The offset was applied to write, but not read, now its applied to
> both.
>
> Signed-off-by: Phil Edworthy 

Reviewed-by: Fabio Estevam 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] dfu: dfu_sf: Fix read offset

2016-11-14 Thread Phil Edworthy
The offset was applied to write, but not read, now its applied to
both.

Signed-off-by: Phil Edworthy 
---
 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..b6d5fe2 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)
-- 
2.7.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot