fpga: pass compatible flags to fpga_load()
These flags may be used to check whether an FPGA driver is able to load a particular FPGA bitstream image. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Tested-by: Ricardo Salveti <ricardo@foundries.io> Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com> Link: https://lore.kernel.org/r/20220722141614.297383-7-oleksandr.suvorov@foundries.io Signed-off-by: Michal Simek <michal.simek@amd.com>
This commit is contained in:

committed by
Michal Simek

parent
7a9a0df89b
commit
282eed50ec
@@ -252,7 +252,8 @@ int fpga_loads(int devnum, const void *buf, size_t size,
|
||||
/*
|
||||
* Generic multiplexing code
|
||||
*/
|
||||
int fpga_load(int devnum, const void *buf, size_t bsize, bitstream_type bstype)
|
||||
int fpga_load(int devnum, const void *buf, size_t bsize, bitstream_type bstype,
|
||||
int flags)
|
||||
{
|
||||
int ret_val = FPGA_FAIL; /* assume failure */
|
||||
const fpga_desc *desc = fpga_validate(devnum, buf, bsize,
|
||||
@@ -263,7 +264,7 @@ int fpga_load(int devnum, const void *buf, size_t bsize, bitstream_type bstype)
|
||||
case fpga_xilinx:
|
||||
#if defined(CONFIG_FPGA_XILINX)
|
||||
ret_val = xilinx_load(desc->devdesc, buf, bsize,
|
||||
bstype, 0);
|
||||
bstype, flags);
|
||||
#else
|
||||
fpga_no_sup((char *)__func__, "Xilinx devices");
|
||||
#endif
|
||||
|
@@ -135,7 +135,7 @@ 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, bstype);
|
||||
return fpga_load(devnum, dataptr, swapsize, bstype, 0);
|
||||
}
|
||||
|
||||
int xilinx_load(xilinx_desc *desc, const void *buf, size_t bsize,
|
||||
|
Reference in New Issue
Block a user