From: Peng Fan <peng.fan@oss.nxp.com>
To: Frank Li <Frank.li@nxp.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Alexander Stein <alexander.stein@ew.tq-group.com>,
devicetree@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH v8 2/2] nvmem: imx-ocotp-ele: Support accessing controller for i.MX9
Date: Fri, 7 Feb 2025 20:12:37 +0800 [thread overview]
Message-ID: <20250207121237.GE14860@localhost.localdomain> (raw)
In-Reply-To: <Z6OWOfTKIi0EBdZy@lizhi-Precision-Tower-5810>
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@nxp.com>
>>
>> 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@nxp.com>
>
[...]
>In another thread
>https://lore.kernel.org/imx/173828013202.1872493.8212881147597194221.robh@kernel.org/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
>>
prev parent reply other threads:[~2025-02-07 11:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 12:41 [PATCH v8 0/2] Make i.MX9 OCOTP work as accessing controller Peng Fan (OSS)
2025-02-04 12:41 ` [PATCH v8 1/2] dt-bindings: nvmem: imx-ocotp: Introduce #access-controller-cells Peng Fan (OSS)
2025-02-04 12:41 ` [PATCH v8 2/2] nvmem: imx-ocotp-ele: Support accessing controller for i.MX9 Peng Fan (OSS)
2025-02-05 16:47 ` Frank Li
2025-02-07 12:12 ` Peng Fan [this message]
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=20250207121237.GE14860@localhost.localdomain \
--to=peng.fan@oss.nxp.com \
--cc=Frank.li@nxp.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=conor+dt@kernel.org \
--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-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=srinivas.kandagatla@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.