[PATCH v9 08/13] spl: fit: pass real compatible flags to fpga_load()

Michal Simek michal.simek at xilinx.com
Tue Jun 7 14:14:01 CEST 2022



On 6/1/22 10:46, Oleksandr Suvorov wrote:
> 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>
> ---
> 
> (no changes since v1)
> 
>   common/spl/spl_fit.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
> index 3c5a91916cc..4769b6f29bd 100644
> --- a/common/spl/spl_fit.c
> +++ b/common/spl/spl_fit.c
> @@ -588,10 +588,14 @@ 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 {
> +		flags = fpga_compatible2flag(devnum, compatible);
> +		if (strcmp(compatible, "u-boot,fpga-legacy"))
> +			printf("Ignoring compatible = %s property\n",
> +			       compatible);

Please make this message as debug. It just consumes space and likely hit only 
when you develop things. And message itself is just informative anyway

M


More information about the U-Boot mailing list