summaryrefslogtreecommitdiff
path: root/drivers/dfu
diff options
context:
space:
mode:
authorPhil Edworthy <phil.edworthy@renesas.com>2017-05-24 14:09:49 (GMT)
committerLukasz Majewski <lukma@denx.de>2017-06-03 17:08:31 (GMT)
commite5f00f0180994b7ab218e904b3426f1c66eb6da7 (patch)
treecd35d2b26f1f64fc160f9b8eebcc6e13d83a95e2 /drivers/dfu
parent46bac66b20da6d50e757bdca74703153f233090b (diff)
downloadu-boot-fsl-qoriq-e5f00f0180994b7ab218e904b3426f1c66eb6da7.tar.xz
dfu: dfu_sf: Fix read offset
The offset was applied to write, but not read, now its applied to both. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Diffstat (limited to 'drivers/dfu')
-rw-r--r--drivers/dfu/dfu_sf.c3
1 files changed, 2 insertions, 1 deletions
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)