From: Michal Simek <michal.simek@amd.com>
To: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>,
<u-boot@lists.denx.de>
Cc: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>,
Michal Simek <michal.simek@xilinx.com>,
Jorge Ramirez-Ortiz <jorge@foundries.io>,
Ricardo Salveti <ricardo@foundries.io>,
Igor Opaniuk <igor.opaniuk@foundries.io>,
Aswath Govindraju <a-govindraju@ti.com>,
Heiko Schocher <hs@denx.de>, Nishanth Menon <nm@ti.com>,
Simon Glass <sjg@chromium.org>
Subject: Re: [PATCH v11 08/13] spl: fit: pass real compatible flags to fpga_load()
Date: Fri, 8 Jul 2022 14:40:38 +0200 [thread overview]
Message-ID: <653de22d-31b8-2eb8-ff99-3b733e82d586@amd.com> (raw)
In-Reply-To: <20220705192320.415861-9-oleksandr.suvorov@foundries.io>
On 7/5/22 21:23, Oleksandr Suvorov wrote:
> CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
>
>
> 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>
> ---
>
> (no changes since v10)
>
> Changes in v10:
> - made the message about ignoring legacy compatibe option as debug
>
> 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..1bf953b44a4 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"))
> + debug("Ignoring compatible = %s property\n",
> + compatible);
> + }
I have problem with this.
This really matters only when FPGA_LOAD_SECURE is enabled. If this option is not
enabled there is no reason to call fpga_compatible2flag() because all the time
it returns only 0 no matter what compatible string is used.
That also mean that in 4/13 and 5/13 you can enable str2flag and
fpga_compatible2flag only when secure bitstreams are enabled.
250 /* If flags is not set, the image treats as legacy */
251 flags = FPGA_LEGACY;
Thanks,
Michal
next prev parent reply other threads:[~2022-07-08 12:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-05 19:23 [PATCH v11 00/13] fpga: zynqmp: Adding support of loading authenticated images Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 01/13] fpga: add option for loading FPGA secure bitstreams Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 02/13] fpga: xilinx: add missed identifier names Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 03/13] fpga: xilinx: add bitstream flags to driver desc Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 04/13] fpga: zynqmp: add str2flags call Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 05/13] fpga: add fpga_compatible2flag Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 06/13] fpga: xilinx: pass compatible flags to xilinx_load() Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 07/13] fpga: pass compatible flags to fpga_load() Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 08/13] spl: fit: pass real " Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 09/13] fpga: xilinx: pass compatible flags to load() callback Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 10/13] fpga: zynqmp: optimize zynqmppl_load() code Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 11/13] fpga: zynqmp: add bitstream compatible checking Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 12/13] fpga: zynqmp: support loading authenticated images Oleksandr Suvorov
2022-07-05 19:23 ` [PATCH v11 13/13] fpga: zynqmp: support loading encrypted bitfiles Oleksandr Suvorov
2022-07-08 12:43 ` [PATCH v11 10/13] fpga: zynqmp: optimize zynqmppl_load() code Michal Simek
2022-07-08 13:15 ` Oleksandr Suvorov
2022-07-08 13:35 ` Michal Simek
2022-07-08 12:40 ` Michal Simek [this message]
2022-07-12 10:58 ` [PATCH v11 01/13] fpga: add option for loading FPGA secure bitstreams Simon Glass
2022-07-12 11:45 ` Michal Simek
2022-07-08 12:45 ` [PATCH v11 00/13] fpga: zynqmp: Adding support of loading authenticated images Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=653de22d-31b8-2eb8-ff99-3b733e82d586@amd.com \
--to=michal.simek@amd.com \
--cc=a-govindraju@ti.com \
--cc=adrian.fiergolski@fastree3d.com \
--cc=hs@denx.de \
--cc=igor.opaniuk@foundries.io \
--cc=jorge@foundries.io \
--cc=michal.simek@xilinx.com \
--cc=nm@ti.com \
--cc=oleksandr.suvorov@foundries.io \
--cc=ricardo@foundries.io \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox