mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang7@gmail.com>
To: srinivas.kandagatla@linaro.org
Cc: orsonzhai@gmail.com, zhang.lyra@gmail.com,
	freeman.liu@unisoc.com, baolin.wang7@gmail.com,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] nvmem: sprd: Determine double data programming from device data
Date: Fri, 13 Mar 2020 12:07:09 +0800	[thread overview]
Message-ID: <51e9c7fbefae0f616e309ba9d20be2eb3e3e2e7d.1584072223.git.baolin.wang7@gmail.com> (raw)
In-Reply-To: <cover.1584072223.git.baolin.wang7@gmail.com>
In-Reply-To: <cover.1584072223.git.baolin.wang7@gmail.com>

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>
---
 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 43b3f6e..925feb2 100644
--- a/drivers/nvmem/sprd-efuse.c
+++ b/drivers/nvmem/sprd-efuse.c
@@ -324,6 +324,7 @@ static int sprd_efuse_read(void *context, u32 offset, void *val, size_t bytes)
 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);
 
-- 
1.9.1


      parent reply	other threads:[~2020-03-13  4:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13  4:07 [PATCH 0/3] Optimize the Spreadtrum eFuse controller Baolin Wang
2020-03-13  4:07 ` [PATCH 1/3] nvmem: sprd: Fix the block lock operation Baolin Wang
2020-03-18 13:40   ` Srinivas Kandagatla
2020-03-13  4:07 ` [PATCH 2/3] nvmem: sprd: Optimize " Baolin Wang
2020-03-13  4:07 ` Baolin Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51e9c7fbefae0f616e309ba9d20be2eb3e3e2e7d.1584072223.git.baolin.wang7@gmail.com \
    --to=baolin.wang7@gmail.com \
    --cc=freeman.liu@unisoc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=zhang.lyra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®