From 88f0b4dcb5d0ef244c16e70ca9ae8c78f5ef9bbc Mon Sep 17 00:00:00 2001 From: Baolin Wang Date: Mon, 23 Mar 2020 15:00:05 +0000 Subject: [PATCH] UPSTREAM: 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. bug: 153500755 Change-Id: I2d37f5ffcdc2a22c7cefa2d49d0c32001fb489e8 Signed-off-by: Baolin Wang Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200323150007.7487-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 4bd5a15d933c1703910c756d961dbbd2e6d52181) --- drivers/nvmem/sprd-efuse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);