linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org,
	Baolin Wang <baolin.wang7@gmail.com>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: [PATCH 3/5] nvmem: sprd: Determine double data programming from device data
Date: Mon, 23 Mar 2020 15:00:05 +0000	[thread overview]
Message-ID: <20200323150007.7487-4-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <20200323150007.7487-1-srinivas.kandagatla@linaro.org>

From: Baolin Wang <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>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 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 @@ 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);
 
-- 
2.21.0


  parent reply	other threads:[~2020-03-23 15:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23 15:00 [PATCH 0/5] nvmem: patches (set 2) for 5.7 Srinivas Kandagatla
2020-03-23 15:00 ` [PATCH 1/5] nvmem: sprd: Fix the block lock operation Srinivas Kandagatla
2020-03-23 19:02   ` Greg KH
2020-03-23 15:00 ` [PATCH 2/5] nvmem: sprd: Optimize " Srinivas Kandagatla
2020-03-23 15:00 ` Srinivas Kandagatla [this message]
2020-03-23 15:00 ` [PATCH 4/5] nvmem: mxs-ocotp: Use devm_add_action_or_reset() for cleanup Srinivas Kandagatla
2020-03-23 15:00 ` [PATCH 5/5] nvmem: Add support for write-only instances Srinivas Kandagatla
2020-03-23 19:05   ` Greg KH
2020-03-24  3:25     ` Nicholas Johnson
2020-03-24 12:24     ` Srinivas Kandagatla
2020-03-24 12:29       ` Greg KH
2020-03-24 13:25         ` Srinivas Kandagatla
2020-03-24 13:33           ` Greg KH
2020-03-24 14:24           ` Nicholas Johnson
2020-03-24 15:18             ` Greg KH
2020-03-24 15:59               ` Nicholas Johnson
2020-03-24 16:58             ` Srinivas Kandagatla
2020-03-23 19:06 ` [PATCH 0/5] nvmem: patches (set 2) for 5.7 Greg KH
2020-03-24 12:11   ` Srinivas Kandagatla

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=20200323150007.7487-4-srinivas.kandagatla@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=baolin.wang7@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).