Skip to contentSkip to conversation

FPGA loading

U-Boot-Users Andre Schwarz 2 participants 3 messages Apr 21, 2006 – May 5, 2006

lore
Share & tools
lore
#0 lore raw

Hi all,

looks like there is a little bit of code missing in "common/cmd_fpga.c".

The code intends to load a FPGA with the command "fpga load <dev> <data> <datasize>". Variable argc is supported, so <dev> <data> <datasize> is optional. The 2 operands <dev> and <data> are obtained from the environment (->"fpga" and "fpgadata"). But <datasize> is not.

This results in an error as soon as you try to do a "fpga load" having "fpga=0" and "fpgadata=Address" set up correctly in the environment, since "fpgadata" is NULL. This patch gets rid of this problem.

201a202

Quoted 1 line
      char *sizestr = getenv ("fpgadatasize");

207a209,210

Quoted 2 lines
    if (sizestr)
        data_size = (size_t) simple_strtoul (sizestr, NULL, 16);

regards,
Andre

#1 lore raw
Quoted 4 lines · In message <[email protected]> you wrote:

This results in an error as soon as you try to do a "fpga load" having "fpga=0" and "fpgadata=Address" set up correctly in the environment, since "fpgadata" is NULL. This patch gets rid of this problem.

Can you please provide a *proper* patch, i. e. using unified diff, providing a CHANGELO entry and most of all sticking with the Coding Style requirements?

Thanks.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
He is truly wise who gains wisdom from another's mishap.
#2 lore raw

sorry for the late reply.

please find attached the patch (diff -purN).

Are there any violations with coding style requirements ? I've just coded the patch, not the entire file .....

regards,
Andr? Schwarz

Quoted 10 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:

This results in an error as soon as you try to do a "fpga load" having "fpga=0" and "fpgadata=Address" set up correctly in the environment, since "fpgadata" is NULL. This patch gets rid of this problem.

Can you please provide a *proper* patch, i. e. using unified diff, providing a CHANGELO entry and most of all sticking with the Coding Style requirements?

Quoted 5 lines

Thanks.

Best regards,

Wolfgang Denk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_cmd_fpga
Type: text/x-diff
Size: 653 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060505/28c3a852/attachment.diff