[PATCH v11 06/13] fpga: xilinx: pass compatible flags to xilinx_load()

Oleksandr Suvorov oleksandr.suvorov at foundries.io
Tue Jul 5 21:23:13 CEST 2022


This flag is used to check whether a Xilinx FPGA driver is able to
load a particular FPGA bitstream image.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov at foundries.io>
Tested-by: Ricardo Salveti <ricardo at foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski at fastree3d.com>
---

(no changes since v1)

 drivers/fpga/fpga.c   | 2 +-
 drivers/fpga/xilinx.c | 2 +-
 include/xilinx.h      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c
index a63bff1df94..a0d39912a05 100644
--- a/drivers/fpga/fpga.c
+++ b/drivers/fpga/fpga.c
@@ -263,7 +263,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);
+					      bstype, 0);
 #else
 			fpga_no_sup((char *)__func__, "Xilinx devices");
 #endif
diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c
index 6bc1bc491fb..5dd721575ec 100644
--- a/drivers/fpga/xilinx.c
+++ b/drivers/fpga/xilinx.c
@@ -139,7 +139,7 @@ int fpga_loadbitstream(int devnum, char *fpgadata, size_t size,
 }
 
 int xilinx_load(xilinx_desc *desc, const void *buf, size_t bsize,
-		bitstream_type bstype)
+		bitstream_type bstype, int flags)
 {
 	if (!xilinx_validate (desc, (char *)__FUNCTION__)) {
 		printf ("%s: Invalid device descriptor\n", __FUNCTION__);
diff --git a/include/xilinx.h b/include/xilinx.h
index 91179abe31f..a9e68138169 100644
--- a/include/xilinx.h
+++ b/include/xilinx.h
@@ -66,7 +66,7 @@ struct xilinx_fpga_op {
 /* Generic Xilinx Functions
  *********************************************************************/
 int xilinx_load(xilinx_desc *desc, const void *image, size_t size,
-		bitstream_type bstype);
+		bitstream_type bstype, int flags);
 int xilinx_dump(xilinx_desc *desc, const void *buf, size_t bsize);
 int xilinx_info(xilinx_desc *desc);
 int xilinx_loadfs(xilinx_desc *desc, const void *buf, size_t bsize,
-- 
2.36.1



More information about the U-Boot mailing list