1
0
Fork 0

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.

    Exp:
    - 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: Fugang Duan <fugang.duan@nxp.com>
"

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Peng Fan 2019-12-04 09:48:03 +08:00
parent ee4c49f1e6
commit 51226f91ca
1 changed files with 2 additions and 2 deletions

View File

@ -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;