diff options
Diffstat (limited to 'drivers/fpga/xilinx.c')
-rw-r--r-- | drivers/fpga/xilinx.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c index 941f30010a..3c05760969 100644 --- a/drivers/fpga/xilinx.c +++ b/drivers/fpga/xilinx.c @@ -24,6 +24,19 @@ static int xilinx_validate(xilinx_desc *desc, char *fn); /* ------------------------------------------------------------------------- */ +int fpga_is_partial_data(int devnum, size_t img_len) +{ + const fpga_desc * const desc = fpga_get_desc(devnum); + xilinx_desc *desc_xilinx = desc->devdesc; + + /* Check datasize against FPGA size */ + if (img_len >= desc_xilinx->size) + return 0; + + /* datasize is smaller, must be partial data */ + return 1; +} + int fpga_loadbitstream(int devnum, char *fpgadata, size_t size, bitstream_type bstype) { |