diff options
author | Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> | 2014-03-14 16:35:38 +0530 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2014-05-20 15:23:46 +0200 |
commit | 64e809afeaf1572c3246a5bca198a77d0498fd89 (patch) | |
tree | 8cc8d126baa31191005cb704809faa219fac4323 /common/cmd_fpga.c | |
parent | d0db28f94034ef02c1d6737895766fb3c19de47f (diff) | |
download | u-boot-imx-64e809afeaf1572c3246a5bca198a77d0498fd89.zip u-boot-imx-64e809afeaf1572c3246a5bca198a77d0498fd89.tar.gz u-boot-imx-64e809afeaf1572c3246a5bca198a77d0498fd89.tar.bz2 |
fpga: Guard the LOADMK functionality with CMD_FPGA_LOADMK
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>
Diffstat (limited to 'common/cmd_fpga.c')
-rw-r--r-- | common/cmd_fpga.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c index 010cd24..68b5427 100644 --- a/common/cmd_fpga.c +++ b/common/cmd_fpga.c @@ -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 ); |