mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-23 04:04:44 +08:00
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 <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-9-oleksandr.suvorov@foundries.io Signed-off-by: Michal Simek <michal.simek@amd.com>
This commit is contained in:
parent
2c60514d9a
commit
71f1a5392a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user