[U-Boot-Users] FPGA loading

Andre Schwarz andre.schwarz at matrix-vision.de
Fri Apr 21 13:29:57 CEST 2006


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




More information about the U-Boot mailing list