Skip to content
Snippets Groups Projects
Commit 0d38effc authored by Grant Likely's avatar Grant Likely Committed by Wolfgang Denk
Browse files

Fpga: fix incorrect test of CFG_FPGA_XILINX macro


CFG_FPGA_XILINX is a bit value used to test against the value in
CONFIG_FPGA.  Testing for a value will always return TRUE.  I don't
think that is the intention in this code.

Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 66dcad3a
Branches
Tags
No related merge requests found
...@@ -60,6 +60,7 @@ static int fpga_get_op (char *opstr); ...@@ -60,6 +60,7 @@ static int fpga_get_op (char *opstr);
/* Convert bitstream data and load into the fpga */ /* Convert bitstream data and load into the fpga */
int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size)
{ {
#if (CONFIG_FPGA & CFG_FPGA_XILINX)
unsigned int length; unsigned int length;
unsigned char* swapdata; unsigned char* swapdata;
unsigned int swapsize; unsigned int swapsize;
...@@ -72,7 +73,6 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) ...@@ -72,7 +73,6 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size)
dataptr = (unsigned char *)fpgadata; dataptr = (unsigned char *)fpgadata;
#if CFG_FPGA_XILINX
/* skip the first bytes of the bitsteam, their meaning is unknown */ /* skip the first bytes of the bitsteam, their meaning is unknown */
length = (*dataptr << 8) + *(dataptr+1); length = (*dataptr << 8) + *(dataptr+1);
dataptr+=2; dataptr+=2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment