]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nvmem: imx-ocotp: Ensure WAIT bits are preserved when setting timing
authorBryan O'Donoghue <pure.logic@nexus-software.ie>
Wed, 26 Jun 2019 10:27:29 +0000 (11:27 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commitf23a1f22f7212507f96c8d98b0f625b6ad9c1842
treed53ca584432fe44f6ee31bd9893fa5c481e4b0d3
parent8eb19c42c649ef09590e0e930df5a9557c6ae854
nvmem: imx-ocotp: Ensure WAIT bits are preserved when setting timing

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit 0493c4792b4eb260441e57f52cc11a9ded48b5a7 ]

The i.MX6 and i.MX8 both have a bit-field spanning bits 27:22 called the
WAIT field.

The WAIT field according to the documentation for both parts "specifies
time interval between auto read and write access in one time program. It is
given in number of ipg_clk periods."

This patch ensures that the relevant field is read and written back to the
timing register.

Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support")
Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/nvmem/imx-ocotp.c