linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Pankaj Gupta <pankaj.gupta@nxp.com>
Cc: Jonathan Corbet <corbet@lwn.net>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [EXT] Re: [PATCH v7 4/5] firmware: imx: add driver for NXP EdgeLock Enclave
Date: Fri, 20 Sep 2024 14:02:24 +0200	[thread overview]
Message-ID: <Zu1kUDb5dfB5dRbe@pengutronix.de> (raw)
In-Reply-To: <AS8PR04MB85932B4E47EFC519B0EF6D9A95632@AS8PR04MB8593.eurprd04.prod.outlook.com>

Hi Pankaj,

On Thu, Sep 19, 2024 at 06:43:45AM +0000, Pankaj Gupta wrote:
> > +static void se_load_firmware(const struct firmware *fw, void 
> > +*context) {
> > +     struct se_if_priv *priv = context;
> > +     const struct se_if_node_info *info = priv->info;
> > +     phys_addr_t se_fw_phyaddr;
> > +     u8 *se_fw_buf;
> > +     int ret;
> > +
> > +     if (!fw) {
> > +             if (priv->fw_fail > MAX_FW_LOAD_RETRIES)
> > +                     dev_dbg(priv->dev,
> > +                              "External FW not found, using ROM FW.\n");
> > +             else {
> > +                     /*add a bit delay to wait for firmware priv released
> */
> > +                     msleep(20);
> > +
> > +                     /* Load firmware one more time if timeout */
> > +                     request_firmware_nowait(THIS_MODULE,
> > +                                     FW_ACTION_UEVENT,
> priv->se_img_file_to_load,
> > +                                     priv->dev, GFP_KERNEL, priv,
> > +                                     se_load_firmware);
> > +                     priv->fw_fail++;
> > +                     dev_dbg(priv->dev, "Value of retries = 0x%x.\n",
> > +                             priv->fw_fail);
> > +             }
> > +
> > +             return;
> > +     }
> 
> > Are you continuously trying to load the firmware here in the hope that the
> rootfs is mounted before your retry counter exceeds?
> 
> Yes.
> 
> > Don't do this.
> 
> Shall the retry counter to be removed, to make it predictable?
> Or am I missing something.

Either compile the firmware into the kernel or the ELE driver as module.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2024-09-20 12:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 10:51 [PATCH v7 0/5] Changes in v7: Pankaj Gupta
2024-09-04 10:51 ` [PATCH v7 1/5] Documentation/firmware: add imx/se to other_interfaces Pankaj Gupta
2024-09-04 10:51 ` [PATCH v7 2/5] dt-bindings: arm: fsl: add imx-se-fw binding doc Pankaj Gupta
2024-09-09 14:18   ` Rob Herring (Arm)
2024-09-04 10:51 ` [PATCH v7 3/5] arm64: dts: imx8ulp-evk: add nxp secure enclave firmware Pankaj Gupta
2024-09-04 10:51 ` [PATCH v7 4/5] firmware: imx: add driver for NXP EdgeLock Enclave Pankaj Gupta
2024-09-04 15:43   ` Frank Li
2024-09-04 16:14     ` Pankaj Gupta
2024-09-09 12:19   ` Sascha Hauer
2024-09-19  6:43     ` [EXT] " Pankaj Gupta
2024-09-20 12:02       ` Sascha Hauer [this message]
2024-09-25 12:00         ` Pankaj Gupta
2024-09-26  9:51           ` Sascha Hauer
2024-10-01  7:49             ` Pankaj Gupta
2024-10-01 10:32               ` Sascha Hauer
2024-10-09  5:15                 ` Pankaj Gupta
2024-09-04 10:51 ` [PATCH v7 5/5] firmware: imx: adds miscdev Pankaj Gupta
2024-09-09 12:22   ` Sascha Hauer
2024-09-20 12:04     ` [EXT] " Pankaj Gupta
2024-09-04 15:22 ` [PATCH v7 0/5] Changes in v7: Frank Li
2024-09-04 16:09   ` Pankaj Gupta
2024-09-04 18:31     ` Fabio Estevam

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=Zu1kUDb5dfB5dRbe@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.gupta@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=shawnguo@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).