[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZvvPzfUHUK9gbYMi@pengutronix.de>
Date: Tue, 1 Oct 2024 12:32:45 +0200
From: Sascha Hauer <s.hauer@...gutronix.de>
To: Pankaj Gupta <pankaj.gupta@....com>
Cc: Jonathan Corbet <corbet@....net>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Rob Herring <robh+dt@...nel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"imx@...ts.linux.dev" <imx@...ts.linux.dev>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [EXT] Re: [PATCH v7 4/5] firmware: imx: add driver for NXP
EdgeLock Enclave
On Tue, Oct 01, 2024 at 07:49:39AM +0000, Pankaj Gupta wrote:
> >> >Either compile the firmware into the kernel or the ELE driver as module.
> >>
> >> Cannot compile as part of Firmware.
> >> There are OTA scenarios where the latest FW, that is downloaded to
> >> replace the image in RFS, and FW needs to be re-init with this new
> >> image, by putting the Linux to power-down state.
> >
> >> ELE driver is compiled as module only, by default. But if someone like
> >> to make it as in-line to kernel image, still it should work.
>
> > I am also not very happy with the situation that we can't compile drivers
> into the kernel and just get the firmware later once it is available.
>
> Driver is enabling the ROM API supports at probe time.
> And, once the rootfs is available, and the Firmware image is loaded, then it
> will enable the complete set of FW API(s), along with ROM API(s).
>
> Hence, Driver can be compiled into the kernel to enable ELE-ROM API(s).
I see what the code does, I just don't think that it's safe to assume
that the rootfs will be mounted after the 50*20ms timeout you use.
I also think that it's a valid usecase for builtin code to retry
firmware loading after the rootfs has been mounted. This should be
integrated into the firmware loading code though and not be done as a
driver specific hack.
Anyway, it won't be me who merges this code and I am just telling you
that you'll likely have a problem getting this upstream as is.
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 |
Powered by blists - more mailing lists