Re: [PATCH v8 2/2] nvmem: imx-ocotp-ele: Support accessing controller for i.MX9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 05, 2025 at 11:47:53AM -0500, Frank Li wrote:
>On Tue, Feb 04, 2025 at 08:41:14PM +0800, Peng Fan (OSS) wrote:
>> From: Peng Fan <peng.fan@xxxxxxx>
>>
>> i.MX9 OCOTP supports a specific peripheral or function being fused
>> which means disabled, so
>>  - Introduce ocotp_access_gates to be container of efuse gate info
>>  - Iterate all nodes to check accessing permission. If not
>>    allowed to be accessed, detach the node
>>
>> Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
>
[...]
>In another thread
>https://lore.kernel.org/imx/173828013202.1872493.8212881147597194221.robh@xxxxxxxxxx/T/#mce7b8226138d0523b602b69de679f3857fd86706
>
>Suggest #define IMX95_OCOTP_CANFD1_GATE 17 0x100000
>
>#access-controller-cells = <2>
>
>So we can remove these static data in driver. If want validate input data,
>we just define low..high region and a validate mask to check it.

Ah. fine. It would be better if this idea could be earlier.

I gave a look on the thread you mentioned, seems duplicated check
code.

I am thinking now to drop my patchset and provide a common framework saying
nvmem-access-controller.

Thanks,
Peng.

>
>Frank
>
>> +
>> +static const struct ocotp_access_gates imx95_access_gates_info = {
>> +	.num_words = 3,
>> +	.words = {17, 18, 19},
>> +	.num_gates = ARRAY_SIZE(imx95_access_gate),
>> +	.gates = imx95_access_gate,
>> +};
>> +
>>  static const struct ocotp_devtype_data imx95_ocotp_data = {
>> +	.access_gates = &imx95_access_gates_info,
>>  	.reg_off = 0x8000,
>>  	.reg_read = imx_ocotp_reg_read,
>>  	.size = 2048,
>>
>> --
>> 2.37.1
>>




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux