[U-Boot-Users] FPGA loading

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
char *sizestr = getenv ("fpgadatasize");
207a209,210
if (sizestr) data_size = (size_t) simple_strtoul (sizestr, NULL, 16);
regards, Andre

In message 200604211329.58054.andre.schwarz@matrix-vision.de 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

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
On Friday 21 April 2006 17:54, Wolfgang Denk wrote:
In message 200604211329.58054.andre.schwarz@matrix-vision.de 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
participants (2)
-
Andre Schwarz
-
Wolfgang Denk