diff options
author | Rouven Czerwinski <r.czerwinski@pengutronix.de> | 2019-06-11 08:49:05 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-06-11 10:30:12 +0200 |
commit | 10c77cfca8ea25f2d2237ec383b03c69b75e712c (patch) | |
tree | 601a7b77c15851d3b70b8735b7072977f9ada804 /drivers/nvmem | |
parent | 11ae1228963bc144a7ef42152a36cfb04ad92f29 (diff) | |
download | barebox-10c77cfca8ea25f2d2237ec383b03c69b75e712c.tar.gz barebox-10c77cfca8ea25f2d2237ec383b03c69b75e712c.tar.xz |
nvmem: ocotp: Elongate OCOTP_CTRL_ADDR field
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>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r-- | drivers/nvmem/ocotp.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |