From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Subject: [PATCH 1/3] nvmem: ocotp: Elongate OCOTP_CTRL_ADDR field
Date: Tue, 11 Jun 2019 08:49:05 +0200 [thread overview]
Message-ID: <20190611064906.8938-1-r.czerwinski@pengutronix.de> (raw)
Port of patch from linux-arm-kernel:
| From: Bryan O'Donoghue <pure.logic@nexus-software.ie>
|
| nvmem: imx-ocotp: Elongate OCOTP_CTRL ADDR field to eight bits
|
| i.MX6 defines OCOTP_CTRLn:ADDR as seven bit address-field with a one bit
| RSVD0 field, i.MX7 defines OCOTP_CTRLn:ADDR as a four bit address-field
| with a four bit RSVD0 field.
|
| i.MX8 defines the OCOTP_CTRLn:ADDR bit-field as a full range eight bits.
|
| i.MX6 and i.MX7 should return zero for their respective RSVD0 bits and
| ignore a write-back of zero where i.MX8 will make use of the full range.
|
| This patch expands the bit-field definition for all users to eight bits,
| which is safe due to RSVD0 being a no-op for the i.MX6 and i.MX7.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
drivers/nvmem/ocotp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c
index 5b8b925cb4..ab543b475f 100644
--- a/drivers/nvmem/ocotp.c
+++ b/drivers/nvmem/ocotp.c
@@ -51,7 +51,7 @@
#define OCOTP_CTRL_WR_UNLOCK_KEY 0x3E77
#define OCOTP_CTRL_WR_UNLOCK_MASK 0xFFFF0000
#define OCOTP_CTRL_ADDR 0
-#define OCOTP_CTRL_ADDR_MASK 0x0000007F
+#define OCOTP_CTRL_ADDR_MASK 0x000000FF
#define OCOTP_CTRL_BUSY (1 << 8)
#define OCOTP_CTRL_ERROR (1 << 9)
#define OCOTP_CTRL_RELOAD_SHADOWS (1 << 10)
--
2.22.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2019-06-11 6:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-11 6:49 Rouven Czerwinski [this message]
2019-06-11 8:30 ` 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=20190611064906.8938-1-r.czerwinski@pengutronix.de \
--to=r.czerwinski@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