[PATCH v14 4/6] firmware: imx: add driver for NXP EdgeLock Enclave

Pankaj Gupta pankaj.gupta at nxp.com
Wed Apr 2 22:02:08 PDT 2025


On Wed, Apr 02, 2025 at 06:15:12AM +0000, Pankaj Gupta wrote:
>> >> diff --git a/drivers/firmware/imx/se_ctrl.h 
>> >> b/drivers/firmware/imx/se_ctrl.h new file mode 100644 index 
>> >> 000000000000..177623f3890e
>> >> --- /dev/null
>> >> +++ b/drivers/firmware/imx/se_ctrl.h
>> >> @@ -0,0 +1,84 @@
>> >> +/* SPDX-License-Identifier: GPL-2.0+ */
>> >> +/*
>> >> + * Copyright 2025 NXP
>> >> + */
>> >> +
>> >> +#ifndef SE_MU_H
>> >> +#define SE_MU_H
>> >> +
>> >> +#include <linux/miscdevice.h>
>> >> +#include <linux/semaphore.h>
>> >> +#include <linux/mailbox_client.h>
>> >> +
>>
>> ....
>>
>> >> +};
>> >> +
>> >> +struct se_if_defines {
>> >> +	const u8 se_if_type;
>> >> +	const u8 se_instance_id;
>> Getting used at drivers/firmware/imx/se_ctrl.c:320

>	dev_info(dev, "i.MX secure-enclave: %s%d interface to firmware,
configured.",
>		 SE_TYPE_STR_HSM,
>		 priv->if_defs->se_instance_id);

> You only print value, don't actual use it. It should be safe remove it

> Frank

No, it is not just used for print.
This variable is used to construct the device name as well, in 5/6 patch.

Moreover, it is needed for other SoC like i.MX8DXL, i.MX95, i.MX94, there
are multiple instances of same secure-enclave type.
It will be used to identify the intended instance later.

>>
>> > This is not used actually, you can remove it
>> Getting used at drivers/firmware/imx/se_ctrl.c:347
>>
>> >> +	u8 cmd_tag;
>> >> +	u8 rsp_tag;
>> >> +	u8 success_tag;
>> >> +	u8 base_api_ver;
>> >> +	u8 fw_api_ver;
>> >> +};
>> >> +
>> >> +struct se_if_priv {
>> >> +	struct device *dev;
>> >> +


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 11094 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250403/5d0c1a33/attachment.p7s>


More information about the linux-arm-kernel mailing list