diff options
author | Michal Simek <michal.simek@xilinx.com> | 2014-05-02 14:09:30 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2014-05-20 15:23:46 +0200 |
commit | 7a78bd2679ce3287cfc44f69fd7bc554d0261cf6 (patch) | |
tree | 34a48a2e9594920abe2d4c68386869a7f9506744 /drivers/fpga/xilinx.c | |
parent | 64e809afeaf1572c3246a5bca198a77d0498fd89 (diff) | |
download | u-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 'drivers/fpga/xilinx.c')
-rw-r--r-- | drivers/fpga/xilinx.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c index 8837f5c..ab9f517 100644 --- a/drivers/fpga/xilinx.c +++ b/drivers/fpga/xilinx.c @@ -24,7 +24,8 @@ static int xilinx_validate(xilinx_desc *desc, char *fn); /* ------------------------------------------------------------------------- */ -int fpga_loadbitstream(int devnum, char *fpgadata, size_t size) +int fpga_loadbitstream(int devnum, char *fpgadata, size_t size, + bitstream_type bstype) { unsigned int length; unsigned int swapsize; @@ -127,17 +128,18 @@ int fpga_loadbitstream(int devnum, char *fpgadata, size_t size) dataptr += 4; printf(" bytes in bitstream = %d\n", swapsize); - return fpga_load(devnum, dataptr, swapsize); + return fpga_load(devnum, dataptr, swapsize, bstype); } -int xilinx_load(xilinx_desc *desc, const void *buf, size_t bsize) +int xilinx_load(xilinx_desc *desc, const void *buf, size_t bsize, + bitstream_type bstype) { if (!xilinx_validate (desc, (char *)__FUNCTION__)) { printf ("%s: Invalid device descriptor\n", __FUNCTION__); return FPGA_FAIL; } - return desc->operations->load(desc, buf, bsize); + return desc->operations->load(desc, buf, bsize, bstype); } int xilinx_dump(xilinx_desc *desc, const void *buf, size_t bsize) |