[U-Boot] [PATCH v2] usb: dfu: make nand upload working
Lukasz Majewski
l.majewski at majess.pl
Fri Nov 8 16:41:49 CET 2013
Hi Bo,
> Nowhere pass a value to len, which always 0, make no transfer which
> cause uploading failed.
>
> This patch make nand upload working. However it needs enough malloc
> buffer to store read data, that means the buffer at least equal to
> the upload partition size, or else it doesn't work.
>
> Signed-off-by: Bo Shen <voice.shen at atmel.com>
I would kindly ask some users of NAND part of the DFU (Tom, Heiko) to
test if this change doesn't break anything.
> ---
> Changes in v2:
> - Move code to nand part, or else it will break mmc
>
> drivers/dfu/dfu_nand.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/dfu/dfu_nand.c b/drivers/dfu/dfu_nand.c
> index 1c2e03b..cf082e2 100644
> --- a/drivers/dfu/dfu_nand.c
> +++ b/drivers/dfu/dfu_nand.c
> @@ -121,6 +121,7 @@ static int dfu_read_medium_nand(struct dfu_entity
> *dfu, u64 offset, void *buf,
> switch (dfu->layout) {
> case DFU_RAW_ADDR:
> + *len = dfu->data.nand.size;
> ret = nand_block_read(dfu, offset, buf, len);
> break;
> default:
Best regards,
Lukasz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131108/2c056ace/attachment.pgp>
More information about the U-Boot
mailing list