[PATCH v12 08/13] spl: fit: pass real compatible flags to fpga_load()
Oleksandr Suvorov
oleksandr.suvorov at foundries.io
Fri Jul 22 16:16:09 CEST 2022
Convert taken FPGA image "compatible" string to a binary compatible
flag and pass it to an FPGA driver.
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>
---
Changes in v12:
- convert "compatible" to flags only if FPGA_LOAD_SECURE enabled;
Changes in v10:
- made the message about ignoring legacy compatibe option as debug;
common/spl/spl_fit.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 3c5a91916cc..a35be529656 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -588,10 +588,15 @@ static int spl_fit_upload_fpga(struct spl_fit_info *ctx, int node,
(u32)fpga_image->load_addr, fpga_image->size);
compatible = fdt_getprop(ctx->fit, node, "compatible", NULL);
- if (!compatible)
+ if (!compatible) {
warn_deprecated("'fpga' image without 'compatible' property");
- else if (strcmp(compatible, "u-boot,fpga-legacy"))
- printf("Ignoring compatible = %s property\n", compatible);
+ } else {
+ if (CONFIG_IS_ENABLED(FPGA_LOAD_SECURE))
+ flags = fpga_compatible2flag(devnum, compatible);
+ if (strcmp(compatible, "u-boot,fpga-legacy"))
+ debug("Ignoring compatible = %s property\n",
+ compatible);
+ }
ret = fpga_load(devnum, (void *)fpga_image->load_addr,
fpga_image->size, BIT_FULL, flags);
--
2.36.1
More information about the U-Boot
mailing list