From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] nvmem: imx-ocotp-ele: fix MAC2 layout
Date: Wed, 8 May 2024 14:14:45 +0200 [thread overview]
Message-ID: <20240508121445.312551-1-s.hauer@pengutronix.de> (raw)
The MAC address layout for MAC address 2 implemented in the
imx-ocotp-ele driver matches the one described in the Security Reference
manual. This contradicts the description in the fusemap though.
According to the fusemap the layout for MAC2 is the same as for MAC1.
It's not clear which one is correct, but at least the TQMA93 board has
MAC2 programmed matching the fusemap, so change the layout accordingly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/nvmem/imx-ocotp-ele.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/nvmem/imx-ocotp-ele.c b/drivers/nvmem/imx-ocotp-ele.c
index e4e60ed6af..58d3e62abf 100644
--- a/drivers/nvmem/imx-ocotp-ele.c
+++ b/drivers/nvmem/imx-ocotp-ele.c
@@ -116,14 +116,10 @@ static int imx_ocotp_cell_pp(void *context, const char *id, unsigned int offset,
if (id && !strcmp(id, "mac-address")) {
u8 *buf = data;
- if (offset == 0x4ec) {
+ if (offset == 0x4ec || offset == 0x4f2) {
swap(buf[0], buf[5]);
swap(buf[1], buf[4]);
swap(buf[2], buf[3]);
- } else if (offset == 0x4f2) {
- swap(buf[0], buf[1]);
- swap(buf[2], buf[5]);
- swap(buf[3], buf[4]);
} else {
return -EINVAL;
}
--
2.39.2
next reply other threads:[~2024-05-08 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 12:14 Sascha Hauer [this message]
2024-05-13 9:25 ` Sascha Hauer
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=20240508121445.312551-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox