Commit 51226f91 authored by Peng Fan's avatar Peng Fan

LF-334-2 nvmem: imx-ocotp-scu: align offset with fusemap

The previous offset / 4 maps to fuse map row index, which is
not friendly for user. So align with the following patch, update
the write to align with fuse row index exactly

    nvmem: imx: correct the fuse word index

    iMX8 fuse word index represent as one 4-bytes word,
    it should not be divided by 4.

    - MAC0 address layout in fuse:
    offset 708: MAC[3] MAC[2] MAC[1] MAC[0]
    offset 709: XX     xx     MAC[5] MAC[4]
Signed-off-by: default avatarFugang Duan <>
Reviewed-by: default avatarYe Li <>
Signed-off-by: default avatarPeng Fan <>
parent ee4c49f1
......@@ -188,10 +188,10 @@ static int imx_scu_ocotp_write(void *context, unsigned int offset,
int ret;
/* allow only writing one complete OTP word at a time */
if ((bytes != 4) || (offset % 4))
if (bytes != 4)
return -EINVAL;
index = offset >> 2;
index = offset;
if (in_hole(context, index))
return -EINVAL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment