aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga
diff options
context:
space:
mode:
authorOleksandr Suvorov2022-07-22 17:16:07 +0300
committerMichal Simek2022-07-26 09:34:21 +0200
commit282eed50ecb73c20dd35bf3ea7a579e79b20cd54 (patch)
tree9becfb54fb29f43d7b98a8402cf795ffaae10bc2 /drivers/fpga
parent7a9a0df89bf1cb9f7e78378f946f1d9c9b002d72 (diff)
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>
Diffstat (limited to 'drivers/fpga')
-rw-r--r--drivers/fpga/fpga.c5
-rw-r--r--drivers/fpga/xilinx.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c
index efbac9f0c47..185bd547cb5 100644
--- a/drivers/fpga/fpga.c
+++ b/drivers/fpga/fpga.c
@@ -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
diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c
index 5dd721575ec..d9951ca3ecf 100644
--- a/drivers/fpga/xilinx.c
+++ b/drivers/fpga/xilinx.c
@@ -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,