diff options
| author | Oleksandr Suvorov <[email protected]> | 2022-07-22 17:16:09 +0300 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2022-07-26 09:34:21 +0200 |
| commit | 71f1a5392aadb5b6a43523b46040dea2ffbdd2ba (patch) | |
| tree | 3f05e78a4997f24a9e18f14863da4ba1e65e1472 | |
| parent | 2c60514d9aecf7fbbbe3c4cb3a4a4acc421e5239 (diff) | |
spl: fit: pass real compatible flags to fpga_load()
Convert taken FPGA image "compatible" string to a binary compatible
flag and pass it to an FPGA driver.
Signed-off-by: Oleksandr Suvorov <[email protected]>
Tested-by: Ricardo Salveti <[email protected]>
Tested-by: Adrian Fiergolski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
| -rw-r--r-- | common/spl/spl_fit.c | 11 |
1 files 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); |
