MLK-16204-4: nvmem: imx-ocotp: add i.mx8mq support and fix read
authorPeng Fan <peng.fan@nxp.com>
Fri, 18 Aug 2017 03:19:08 +0000 (11:19 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:36:36 +0000 (15:36 -0500)
commitc0dee9d06be6b611a7c2c2a0a62bdfbbd2a390be
tree0b4737f486db4593d15105cc3c42e60bf374a4c0
parentd097abceb853998113d02dd9eece26d6601d0f11
MLK-16204-4: nvmem: imx-ocotp: add i.mx8mq support and fix read

Add i.MX8MQ support and Fix read.

When offset is not 4 bytes aligned, directly shift righty by 2 bits
will cause reading out wrong data. Since imx ocotp only supports
4 bytes reading once, we need handle offset is not 4 bytes aligned
and enlarge the bytes to 4 bytes aligned. After finished reading,
copy the needed data from buffer to caller and free buffer.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/nvmem/Kconfig
drivers/nvmem/imx-ocotp.c