* [U-Boot] [PATCH v2] usb: dfu: make nand upload working
@ 2013-11-07 6:29 Bo Shen
2013-11-08 12:14 ` Heiko Schocher
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Bo Shen @ 2013-11-07 6:29 UTC (permalink / raw)
To: u-boot
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@atmel.com>
---
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:
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH v2] usb: dfu: make nand upload working
2013-11-07 6:29 [U-Boot] [PATCH v2] usb: dfu: make nand upload working Bo Shen
@ 2013-11-08 12:14 ` Heiko Schocher
2013-11-08 15:41 ` Lukasz Majewski
2013-11-08 19:45 ` Marek Vasut
2 siblings, 0 replies; 7+ messages in thread
From: Heiko Schocher @ 2013-11-08 12:14 UTC (permalink / raw)
To: u-boot
Hello Bo,
Am 07.11.2013 07:29, schrieb Bo Shen:
> 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@atmel.com>
> ---
> 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(+)
Thanks! Tested on the rut board.
Tested-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH v2] usb: dfu: make nand upload working
2013-11-07 6:29 [U-Boot] [PATCH v2] usb: dfu: make nand upload working Bo Shen
2013-11-08 12:14 ` Heiko Schocher
@ 2013-11-08 15:41 ` Lukasz Majewski
2013-11-11 6:46 ` Heiko Schocher
2013-11-08 19:45 ` Marek Vasut
2 siblings, 1 reply; 7+ messages in thread
From: Lukasz Majewski @ 2013-11-08 15:41 UTC (permalink / raw)
To: u-boot
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@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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH v2] usb: dfu: make nand upload working
2013-11-07 6:29 [U-Boot] [PATCH v2] usb: dfu: make nand upload working Bo Shen
2013-11-08 12:14 ` Heiko Schocher
2013-11-08 15:41 ` Lukasz Majewski
@ 2013-11-08 19:45 ` Marek Vasut
2 siblings, 0 replies; 7+ messages in thread
From: Marek Vasut @ 2013-11-08 19:45 UTC (permalink / raw)
To: u-boot
Dear Bo Shen,
> 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@atmel.com>
> ---
> 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(+)
Applied, thanks.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH v2] usb: dfu: make nand upload working
2013-11-08 15:41 ` Lukasz Majewski
@ 2013-11-11 6:46 ` Heiko Schocher
2013-11-11 8:17 ` Bo Shen
0 siblings, 1 reply; 7+ messages in thread
From: Heiko Schocher @ 2013-11-11 6:46 UTC (permalink / raw)
To: u-boot
Hello Lukasz,
Am 08.11.2013 16:41, schrieb Lukasz Majewski:
> 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@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.
I sent a tested-by for this patch, see:
http://lists.denx.de/pipermail/u-boot/2013-November/166552.html
without this patch nand upload didn;t worked on the rut board, with
this patch it worked :-)
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH v2] usb: dfu: make nand upload working
2013-11-11 6:46 ` Heiko Schocher
@ 2013-11-11 8:17 ` Bo Shen
2013-11-11 13:29 ` Marek Vasut
0 siblings, 1 reply; 7+ messages in thread
From: Bo Shen @ 2013-11-11 8:17 UTC (permalink / raw)
To: u-boot
Hi Heiko,
On 11/11/2013 02:46 PM, Heiko Schocher wrote:
> Hello Lukasz,
>
> Am 08.11.2013 16:41, schrieb Lukasz Majewski:
>> 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@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.
>
> I sent a tested-by for this patch, see:
>
> http://lists.denx.de/pipermail/u-boot/2013-November/166552.html
>
> without this patch nand upload didn;t worked on the rut board, with
> this patch it worked :-)
Thanks for testing it.
> bye,
> Heiko
Best Regards,
Bo Shen
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH v2] usb: dfu: make nand upload working
2013-11-11 8:17 ` Bo Shen
@ 2013-11-11 13:29 ` Marek Vasut
0 siblings, 0 replies; 7+ messages in thread
From: Marek Vasut @ 2013-11-11 13:29 UTC (permalink / raw)
To: u-boot
Dear Bo Shen,
> Hi Heiko,
>
> On 11/11/2013 02:46 PM, Heiko Schocher wrote:
> > Hello Lukasz,
> >
> > Am 08.11.2013 16:41, schrieb Lukasz Majewski:
> >> 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@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.
> >
> > I sent a tested-by for this patch, see:
> >
> > http://lists.denx.de/pipermail/u-boot/2013-November/166552.html
> >
> > without this patch nand upload didn;t worked on the rut board, with
> > this patch it worked :-)
>
> Thanks for testing it.
Thanks guys, PR is already on it's way to mainline.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-11-11 13:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07 6:29 [U-Boot] [PATCH v2] usb: dfu: make nand upload working Bo Shen
2013-11-08 12:14 ` Heiko Schocher
2013-11-08 15:41 ` Lukasz Majewski
2013-11-11 6:46 ` Heiko Schocher
2013-11-11 8:17 ` Bo Shen
2013-11-11 13:29 ` Marek Vasut
2013-11-08 19:45 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox