X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=common%2Fcmd_fpga.c;h=d50cede3b513d5692215008995792975f5e2e812;hp=7c762bab924aee0fa6a56d58d610f69251b42f2f;hb=a562e1bd9d8e10ea2e51d08e66d35a6e1795153b;hpb=30ce5ab043db0b34838ad2d294561992bdb5236a diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c index 7c762bab92..d50cede3b5 100644 --- a/common/cmd_fpga.c +++ b/common/cmd_fpga.c @@ -80,11 +80,11 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) return FPGA_FAIL; } - length = (*dataptr << 8) + *(dataptr+1); + length = (*dataptr << 8) + *(dataptr+1); dataptr+=2; for(i=0;i= size) { printf(__FUNCTION__ ": Could not find right length of data in bitstream.\n"); return FPGA_FAIL; } - + /* allocate memory */ swapdata = (char *)malloc(swapsize); if (swapdata == NULL) { printf(__FUNCTION__ ": Could not allocate %d bytes memory !\n",swapsize); return FPGA_FAIL; } - + /* read data into memory and swap bits */ ptr = swapdata; for (i = 0; i < swapsize; i++) {