Merge commit 'u-boot/master' into for-1.3.1
[platform/kernel/u-boot.git] / common / cmd_fpga.c
index 3444091..377a692 100644 (file)
@@ -27,7 +27,7 @@
  */
 #include <common.h>
 #include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
 #include <net.h>
 #endif
 #include <fpga.h>
@@ -43,8 +43,6 @@
 #define PRINTF(fmt,args...)
 #endif
 
-#if defined (CONFIG_FPGA) && ( CONFIG_COMMANDS & CFG_CMD_FPGA )
-
 /* Local functions */
 static void fpga_usage (cmd_tbl_t * cmdtp);
 static int fpga_get_op (char *opstr);
@@ -60,6 +58,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 +71,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;
@@ -321,4 +319,3 @@ U_BOOT_CMD (fpga, 6, 1, do_fpga,
            "\tloadb\tLoad device from bitstream buffer (Xilinx devices only)\n"
            "\tloadmk\tLoad device generated with mkimage\n"
            "\tdump\tLoad device to memory buffer\n");
-#endif /* CONFIG_FPGA && CONFIG_COMMANDS & CFG_CMD_FPGA */