Commit c66ebde4 authored by Freeman Liu's avatar Freeman Liu Committed by Greg Kroah-Hartman

nvmem: sprd: Fix the block lock operation

According to the Spreadtrum eFuse specification, we should write 0 to
the block to trigger the lock operation.

Fixes: 096030e7 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarFreeman Liu <freeman.liu@unisoc.com>
Signed-off-by: default avatarBaolin Wang <baolin.wang7@gmail.com>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200323150007.7487-2-srinivas.kandagatla@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 33e12f6e
......@@ -239,7 +239,7 @@ static int sprd_efuse_raw_prog(struct sprd_efuse *efuse, u32 blk, bool doub,
ret = -EBUSY;
} else {
sprd_efuse_set_prog_lock(efuse, lock);
writel(*data, efuse->base + SPRD_EFUSE_MEM(blk));
writel(0, efuse->base + SPRD_EFUSE_MEM(blk));
sprd_efuse_set_prog_lock(efuse, false);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment