summaryrefslogtreecommitdiff
path: root/common/cmd_fpga.c
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2014-05-02 14:09:30 +0200
committerMichal Simek <michal.simek@xilinx.com>2014-05-20 15:23:46 +0200
commit7a78bd2679ce3287cfc44f69fd7bc554d0261cf6 (patch)
tree34a48a2e9594920abe2d4c68386869a7f9506744 /common/cmd_fpga.c
parent64e809afeaf1572c3246a5bca198a77d0498fd89 (diff)
downloadu-boot-imx-7a78bd2679ce3287cfc44f69fd7bc554d0261cf6.zip
u-boot-imx-7a78bd2679ce3287cfc44f69fd7bc554d0261cf6.tar.gz
u-boot-imx-7a78bd2679ce3287cfc44f69fd7bc554d0261cf6.tar.bz2
fpga: Define bitstream type based on command selection
Clean up partial, full and compressed bitstream handling. U-Boot supports full bitstream loading and partial based on detection which is not 100% correct. Extending fpga_load/fpga_loadbitstream() with one more argument which stores bitstream type. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'common/cmd_fpga.c')
-rw-r--r--common/cmd_fpga.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c
index 68b5427..4fafed9 100644
--- a/common/cmd_fpga.c
+++ b/common/cmd_fpga.c
@@ -148,11 +148,11 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
break;
case FPGA_LOAD:
- rc = fpga_load(dev, fpga_data, data_size);
+ rc = fpga_load(dev, fpga_data, data_size, BIT_FULL);
break;
case FPGA_LOADB:
- rc = fpga_loadbitstream(dev, fpga_data, data_size);
+ rc = fpga_loadbitstream(dev, fpga_data, data_size, BIT_FULL);
break;
#if defined(CONFIG_CMD_FPGA_LOADMK)
@@ -182,7 +182,8 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
data = (ulong)image_get_data(hdr);
data_size = image_get_data_size(hdr);
}
- rc = fpga_load(dev, (void *)data, data_size);
+ rc = fpga_load(dev, (void *)data, data_size,
+ BIT_FULL);
}
break;
#if defined(CONFIG_FIT)
@@ -224,7 +225,8 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 1;
}
- rc = fpga_load(dev, fit_data, data_size);
+ rc = fpga_load(dev, fit_data, data_size,
+ BIT_FULL);
}
break;
#endif