Re: [PATCH] caam: imx: fix the built-in caam driver cannot match soc_id

From: Herbert Xu
Date: Fri May 19 2023 - 04:50:09 EST


On Fri, May 12, 2023 at 08:40:33PM +0530, Pankaj Gupta wrote:
> Since, CAAM driver is probed before soc_device_attribute done as part of:
> - drivers/soc/imx/soc-imx8m.c (for i.MX8M)
> - drivers/firmware/imx/ele_mu.c (EdgeLock Enclave kernel driver, for i.MX8ULP)
>
> It is needed to return -EPROBE_DEFER, after calling soc_device_match() in
> drivers/crypto/caam/ctrl.c.
>
> soc_device_match returns NULL for:
> - i.MX8M
> - i.MX8ULP,
> can be considered that the SoC device has not been probed yet.
> Hence, it returns -EPROBE_DEFER directly.
>
> caam: imx: change to use of_match_node in run_descriptor_deco0
>
> Providing imx8m_machine_match to match:
> - i.MX8M{Q,M,N,P},
> - i.MX8ULP,
> so as to start using of_match_node, to simplify the code.
>
> Signed-off-by: Alice Guo <alice.guo@xxxxxxx>
> Signed-off-by: Pankaj Gupta <pankaj.gupta@xxxxxxx>
> Reviewed-by: Dong Aisheng <aisheng.dong@xxxxxxx>
> Reviewed-by: Horia Geanta <horia.geanta@xxxxxxx>
> Acked-by: Peng Fan <peng.fan@xxxxxxx>
> ---
> drivers/crypto/caam/ctrl.c | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt