fpga: Guard the LOADMK functionality with CMD_FPGA_LOADMK
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Fri, 14 Mar 2014 11:05:38 +0000 (16:35 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 20 May 2014 13:23:46 +0000 (15:23 +0200)
Guard the LOADMK functionality with config to provide
an option to enable or disable it.
Enable it for all platforms in mainline which enable CONFIG_CMD_FPGA.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
17 files changed:
README
common/cmd_fpga.c
include/configs/GEN860T.h
include/configs/MVBC_P.h
include/configs/MVBLM7.h
include/configs/MVSMR.h
include/configs/alpr.h
include/configs/astro_mcf5373l.h
include/configs/balloon3.h
include/configs/coreboot.h
include/configs/grsim.h
include/configs/grsim_leon2.h
include/configs/iocon.h
include/configs/mt_ventoux.h
include/configs/omap3_mvblx.h
include/configs/x600.h
include/configs/zynq-common.h

diff --git a/README b/README
index 5f895520e828abc2ecfd0199372fa4187a9da0bf..d362880c7254847ba123f0f55aa6a761206cf430 100644 (file)
--- a/README
+++ b/README
@@ -2550,6 +2550,10 @@ CBFS (Coreboot Filesystem) support
 
                Specify the number of FPGA devices to support.
 
+               CONFIG_CMD_FPGA_LOADMK
+
+               Enable support for fpga loadmk command
+
                CONFIG_SYS_FPGA_PROG_FEEDBACK
 
                Enable printing of hash marks during FPGA configuration.
index 010cd24e63dc21f86f0ae1910a4c4fac9d0e20e4..68b54277ad2344e5f5ec5479a7a5cd626e7f3067 100644 (file)
@@ -126,10 +126,12 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
                if (!fpga_data || !data_size)
                        wrong_parms = 1;
                break;
+#if defined(CONFIG_CMD_FPGA_LOADMK)
        case FPGA_LOADMK:
                if (!fpga_data)
                        wrong_parms = 1;
                break;
+#endif
        }
 
        if (wrong_parms) {
@@ -153,6 +155,7 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
                rc = fpga_loadbitstream(dev, fpga_data, data_size);
                break;
 
+#if defined(CONFIG_CMD_FPGA_LOADMK)
        case FPGA_LOADMK:
                switch (genimg_get_format(fpga_data)) {
                case IMAGE_FORMAT_LEGACY:
@@ -231,6 +234,7 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
                        break;
                }
                break;
+#endif
 
        case FPGA_DUMP:
                rc = fpga_dump(dev, fpga_data, data_size);
@@ -257,8 +261,10 @@ static int fpga_get_op(char *opstr)
                op = FPGA_LOADB;
        else if (!strcmp("load", opstr))
                op = FPGA_LOAD;
+#if defined(CONFIG_CMD_FPGA_LOADMK)
        else if (!strcmp("loadmk", opstr))
                op = FPGA_LOADMK;
+#endif
        else if (!strcmp("dump", opstr))
                op = FPGA_DUMP;
 
@@ -277,10 +283,12 @@ U_BOOT_CMD(fpga, 6, 1, do_fpga,
           "  load\t[dev] [address] [size]\tLoad device from memory buffer\n"
           "  loadb\t[dev] [address] [size]\t"
           "Load device from bitstream buffer (Xilinx only)\n"
+#if defined(CONFIG_CMD_FPGA_LOADMK)
           "  loadmk [dev] [address]\tLoad device generated with mkimage"
 #if defined(CONFIG_FIT)
           "\n"
           "\tFor loadmk operating on FIT format uImage address must include\n"
           "\tsubimage unit name in the form of addr:<subimg_uname>"
 #endif
+#endif
 );
index 2822a08c0aeffecab5a1801435e99dd64629bb83..fd6c9763d8bcc60a58f06dac6732d1032104f2a7 100644 (file)
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_DATE
 #define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FPGA_LOADMK
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_BEDBUG
 
index 036396c7814d490857e90c3825360567da587bef..1ab2b3d51a2caa60bb0e811865b94190c73e0ebf 100644 (file)
@@ -89,6 +89,7 @@
 #define CONFIG_CMD_SDRAM
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FPGA_LOADMK
 #define CONFIG_CMD_I2C
 
 #undef CONFIG_WATCHDOG
index 27c2fa011dc3945b7b6e316fd1cb10ff5e33237e..1ee4d7cc3378f18d7f7c324607d6d1aaf0b69f3e 100644 (file)
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_I2C
 #define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FPGA_LOADMK
 #define CONFIG_CMD_USB
 #define CONFIG_DOS_PARTITION
 
index ad15506fadaec3830c93f364d7f64ed942eee0bb..27f730d84b50345f216d90d33cf6ea1d6cbb9142 100644 (file)
@@ -74,6 +74,7 @@
 #define CONFIG_CMD_CACHE
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FPGA_LOADMK
 #define CONFIG_CMD_I2C
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_NET
index 7849b222b0d040a898151d549839bf3c83f25dcb..2782e559f5fabd6228e90ed15075ab473be71244 100644 (file)
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FPGA_LOADMK
 #define CONFIG_CMD_I2C
 #undef CONFIG_CMD_LOADB
 #undef CONFIG_CMD_LOADS
index d875753a6609a66bcae6b49b9e213db5b4b918d1..fa64a688a44af63ee7e20e6c8f29d8be090fa478 100644 (file)
@@ -88,6 +88,7 @@
 #define CONFIG_CMD_LOADS
 #define CONFIG_CMD_LOADB
 #define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FPGA_LOADMK
 #define CONFIG_CMDLINE_EDITING
 
 #define CONFIG_SYS_HUSH_PARSER
index 5228ba6ef708a073b4e43f2ca2ce15d2e00a2d31..2f5a6609b8e84ae73a3d0aa9568d73121815f5bb 100644 (file)
@@ -54,6 +54,7 @@
 #undef CONFIG_CMD_IMLS
 #define        CONFIG_CMD_USB
 #define        CONFIG_CMD_FPGA
+#define        CONFIG_CMD_FPGA_LOADMK
 #undef CONFIG_LCD
 
 /*
index d1d732f211f18704fd96ea106e2df88cb2f52d6e..a1a63a018decc9cdae59e6d1f13a660a5685034e 100644 (file)
 #define CONFIG_CMD_ECHO
 #undef CONFIG_CMD_FLASH
 #define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FPGA_LOADMK
 #define CONFIG_CMD_GPIO
 #define CONFIG_CMD_IMI
 #undef CONFIG_CMD_IMLS
index 556c749f92060c1c44c2bf674c8e7f91b039c4f8..1e089a9bf7545530ed43c38ed51e79d4ed090db0 100644 (file)
@@ -53,6 +53,7 @@
 #define CONFIG_CMD_DIAG
 #define CONFIG_CMD_ECHO                /* echo arguments               */
 #define CONFIG_CMD_FPGA                /* FPGA configuration Support   */
+#define CONFIG_CMD_FPGA_LOADMK
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_ITEST       /* Integer (and string) test    */
 #define CONFIG_CMD_LOADB       /* loadb                        */
index 8be98983c9f6a6667b58d1c18fedbeee273fbcfc..66194a8ff0e173e2a9e64caae7abeda42f6a996d 100644 (file)
@@ -51,6 +51,7 @@
 #define CONFIG_CMD_DIAG
 #define CONFIG_CMD_ECHO                /* echo arguments               */
 #define CONFIG_CMD_FPGA                /* FPGA configuration Support   */
+#define CONFIG_CMD_FPGA_LOADMK
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_ITEST       /* Integer (and string) test    */
 #define CONFIG_CMD_LOADB       /* loadb                        */
index b32095cea4e25ed36bec7fdf46e112effdafd1eb..79c4736bc5df949fc39cb9f667eddd11ccd59744 100644 (file)
@@ -63,6 +63,7 @@
  */
 #define CONFIG_CMD_CACHE
 #define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FPGA_LOADMK
 #undef CONFIG_CMD_EEPROM
 
 /*
index e7afd07b94124c7b87eea8ccf4cff0f94d4171e7..01e395a49d6eb2096b18067973d1eddf3b41b778 100644 (file)
@@ -49,6 +49,7 @@
  * FPGA
  */
 #define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FPGA_LOADMK
 #define CONFIG_FPGA
 #define CONFIG_FPGA_XILINX
 #define CONFIG_FPGA_SPARTAN3
index 8d11010f84596e66e05e4b36ee29442747b7ac37..a3dcb152d3a82fd32481abe4ab47963b8d13789b 100644 (file)
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FPGA_LOADMK
 
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_OMAP24_I2C_SPEED    100000
index 7405419f0e270a9ad6295cc8d9b6df6c6d40e327..eae85d62c9a491195c948bf742357edd7173de54 100644 (file)
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FPGA_LOADMK
 #define CONFIG_CMD_GPIO
 #define CONFIG_CMD_I2C
 #define CONFIG_CMD_MEMORY
index 731e69b5fd89dcb2aa275f38f04d7e87dcfa1def..8eea24aedef02516c983907625347aee5fe7aca8 100644 (file)
 #define CONFIG_FPGA_XILINX
 #define CONFIG_FPGA_ZYNQPL
 #define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FPGA_LOADMK
 
 /* Open Firmware flat tree */
 #define CONFIG_OF_LIBFDT