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>
This commit is contained in:
parent
ee4c49f1e6
commit
51226f91ca
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue