summaryrefslogtreecommitdiff
path: root/drivers/nvmem/sprd-efuse.c
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang7@gmail.com>2020-03-23 15:00:05 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-23 20:05:23 +0100
commit4bd5a15d933c1703910c756d961dbbd2e6d52181 (patch)
tree2f4337bc971384f0bd129e22536455d4a6fc5d16 /drivers/nvmem/sprd-efuse.c
parent5af25388ba250ae9624a22587cc98685dc6d4e9e (diff)
nvmem: sprd: Determine double data programming from device data
We've saved the double data flag in the device data, so we should use it when programming a block. Signed-off-by: Baolin Wang <baolin.wang7@gmail.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20200323150007.7487-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem/sprd-efuse.c')
-rw-r--r--drivers/nvmem/sprd-efuse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvmem/sprd-efuse.c b/drivers/nvmem/sprd-efuse.c
index 43b3f6ef8c20..925feb21d5ad 100644
--- a/drivers/nvmem/sprd-efuse.c
+++ b/drivers/nvmem/sprd-efuse.c
@@ -324,6 +324,7 @@ unlock:
static int sprd_efuse_write(void *context, u32 offset, void *val, size_t bytes)
{
struct sprd_efuse *efuse = context;
+ bool blk_double = efuse->data->blk_double;
bool lock;
int ret;
@@ -348,7 +349,7 @@ static int sprd_efuse_write(void *context, u32 offset, void *val, size_t bytes)
else
lock = true;
- ret = sprd_efuse_raw_prog(efuse, offset, false, lock, val);
+ ret = sprd_efuse_raw_prog(efuse, offset, blk_double, lock, val);
clk_disable_unprepare(efuse->clk);