diff options
author | Peng Fan <peng.fan@nxp.com> | 2020-08-21 16:35:16 +0800 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2020-08-21 17:03:21 +0800 |
commit | 9e259c937528ce98f910d256c2f2fddea258a694 (patch) | |
tree | d8ad7d97abe3ce0e0693949c7d47b26283a39cfd /drivers/nvmem | |
parent | 72d77299fcb257f818721f769229f123965c06d2 (diff) |
MLK-24529 nvmem: ocotp: use high bus when programming/reloading fuse
There might be chance that after we calculate timing based on the ipg_clk,
but ipg_clk was changed by busfreq which cause fuse prog and shadow
reload not work stable. So let request high bus to let the ipg clk fixed
during the stage programming and reloading.
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r-- | drivers/nvmem/imx-ocotp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index e6b9ace7bb73..62be4d67ac38 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -14,6 +14,7 @@ * Copyright (C) 2010-2013 Freescale Semiconductor, Inc */ +#include <linux/busfreq-imx.h> #include <linux/clk.h> #include <linux/device.h> #include <linux/io.h> @@ -319,6 +320,8 @@ static int imx_ocotp_write(void *context, unsigned int offset, void *val, return ret; } + request_bus_freq(BUS_FREQ_HIGH); + /* Setup the write timing values */ priv->params->set_timing(priv); @@ -458,6 +461,8 @@ static int imx_ocotp_write(void *context, unsigned int offset, void *val, } write_end: + release_bus_freq(BUS_FREQ_HIGH); + clk_disable_unprepare(priv->clk); mutex_unlock(&ocotp_mutex); if (ret < 0) |