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/fpga.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/fpga.c')
-rw-r--r-- | drivers/fpga/fpga.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c index b940d9b..e770950 100644 --- a/drivers/fpga/fpga.c +++ b/drivers/fpga/fpga.c @@ -173,7 +173,8 @@ int fpga_add(fpga_type devtype, void *desc) /* * Convert bitstream data and load into the fpga */ -int __weak fpga_loadbitstream(int devnum, char *fpgadata, size_t size) +int __weak fpga_loadbitstream(int devnum, char *fpgadata, size_t size, + bitstream_type bstype) { printf("Bitstream support not implemented for this FPGA device\n"); return FPGA_FAIL; @@ -182,7 +183,7 @@ int __weak fpga_loadbitstream(int devnum, char *fpgadata, size_t size) /* * Generic multiplexing code */ -int fpga_load(int devnum, const void *buf, size_t bsize) +int fpga_load(int devnum, const void *buf, size_t bsize, bitstream_type bstype) { int ret_val = FPGA_FAIL; /* assume failure */ const fpga_desc *desc = fpga_validate(devnum, buf, bsize, @@ -192,7 +193,8 @@ int fpga_load(int devnum, const void *buf, size_t bsize) switch (desc->devtype) { case fpga_xilinx: #if defined(CONFIG_FPGA_XILINX) - ret_val = xilinx_load(desc->devdesc, buf, bsize); + ret_val = xilinx_load(desc->devdesc, buf, bsize, + bstype); #else fpga_no_sup((char *)__func__, "Xilinx devices"); #endif |