]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
Fpga: fix incorrect test of CFG_FPGA_XILINX macro
authorGrant Likely <grant.likely@secretlab.ca>
Tue, 25 Sep 2007 21:48:05 +0000 (15:48 -0600)
committerWolfgang Denk <wd@denx.de>
Tue, 25 Sep 2007 22:10:26 +0000 (00:10 +0200)
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: Grant Likely <grant.likely@secretlab.ca>
common/cmd_fpga.c

index 3fc4fca9ae2991540f7d410b16fc6a31258a4306..cce23ad70d78ce4e316583d71f40d23c41bbc8dd 100644 (file)
@@ -60,6 +60,7 @@ static int fpga_get_op (char *opstr);
 /* Convert bitstream data and load into the fpga */
 int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size)
 {
+#if (CONFIG_FPGA & CFG_FPGA_XILINX)
        unsigned int length;
        unsigned char* swapdata;
        unsigned int swapsize;
@@ -72,7 +73,6 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size)
 
        dataptr = (unsigned char *)fpgadata;
 
-#if CFG_FPGA_XILINX
        /* skip the first bytes of the bitsteam, their meaning is unknown */
        length = (*dataptr << 8) + *(dataptr+1);
        dataptr+=2;