Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1267985ybh; Thu, 12 Mar 2020 21:08:32 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtFpyezY0HEeXQK+hgEsO+/DLjwscAsiLd2yj8qlG5/4KH8+qGHgVD2W5BvdG9VDqTD6C85 X-Received: by 2002:a05:6830:1e09:: with SMTP id s9mr8852658otr.149.1584072512585; Thu, 12 Mar 2020 21:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584072512; cv=none; d=google.com; s=arc-20160816; b=yI1BHO1wILdsXFm5wa4C82aFfODxizuviw+BP942IOJVwuYRYenrHFe1Lh0OJrPN+R fD+lMHVOzZiEtDRK8i+OhfguE/WTCLZcxdK1SjwLQzeTxIPa7b4THs/Lm8D028Oht8IC nxOXlv8gmgkSnf0xxR4jYn8oPGmRy4FyO2s+BjxMuoezpZ4vXTLz8NF+LeZsK8dIF3BH erzSpKTCl2CNL11ScZGjoc2RWEA4rYQ6bg6dShWij/6zFMOURFUdCArB/9NhgqZLJstd 39WPG8SMRdQamJiS4H8EcpdxI4lukLqjS1Eu0gsnxdOYq+9ezwdIXH4DibErTlT9Jzqe gyIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=YEeFDXp3ZyN3NwzD7P+co9ETlP6ejU9qaOPFtmQDLg8=; b=MEr52LcRNy18KAnqlGYZoCBpP5zlkl+MyEb6gXWYbh5L3CNO4Qka9LFGuOEmWGIcbj qNyLllmb+knMarK7UIMfG3WsvHuqdJLyHkBP8QeomzTR6g3TXn6aZ3M4q1yyrwTBUGGL 6C3qdQ86JCYIgzGgb/Fv7NSQnAsHyQmqzkV0ouh8X1cnXfoUqhoHTiUoO3jJCKn6k1NM iJKCx0kPFFTaEAzlrrrM8YYi+0LGTPufg10q+zcCouJjSjkcBBCaUxWGyrrMLoNMHk1f zkb77Sl2mlxcrUbj6ZlNSjvZsWsmZl8aevsoULotA49XDmqKFLCWcCQW6/rbYvFMcYob kebw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fmSPqFK2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b20si1826723otq.263.2020.03.12.21.08.20; Thu, 12 Mar 2020 21:08:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fmSPqFK2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726254AbgCMEHZ (ORCPT + 99 others); Fri, 13 Mar 2020 00:07:25 -0400 Received: from mail-pj1-f67.google.com ([209.85.216.67]:52141 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgCMEHZ (ORCPT ); Fri, 13 Mar 2020 00:07:25 -0400 Received: by mail-pj1-f67.google.com with SMTP id y7so3476670pjn.1 for ; Thu, 12 Mar 2020 21:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=YEeFDXp3ZyN3NwzD7P+co9ETlP6ejU9qaOPFtmQDLg8=; b=fmSPqFK2FKqqNmxPJqtn9RtEOyg93NIBZtPv+SvPkees2/djyARD5wqAaJ8OZKVa0r tYXAOpFmQV5yA/VRxrcbUO5BhXi8zAueicKhaWvO5A4+85udddUc3nAXYk0t6PASYgl9 xhUGzKaHVMT97mEjeg7RwJka+a1OcxcHBiUd94TlrRXU5nsPX6tZ0mGDSaqJLtGOkqWJ BmXorpsxVmBVp3k6xJfWU3FPij7lb5dGiK+nLwbvmpWxbgSLOe9U0qqC4wiKprp5lUCe 5JkMthLQAYQuVqTy9i1YRioeHNAQZCmfCeKOVr4POtvZVyQi2GwsIQDoHEmdYvN6McMy OmdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=YEeFDXp3ZyN3NwzD7P+co9ETlP6ejU9qaOPFtmQDLg8=; b=iioS/2TOwWHnbIzu0hyYih6TAb37PQMw/KG3bMxdiwpNnnQsEVAT+5maEwe43uSrgV q1kp0zpBekNuBA69AChe1QYDZ1/USPSniABhb1c+moowuO71icgoBtjoSrmHsNKIRGcY 80F7nCYaP3IhGWw/UDa6uVKLEbfCyUJ0qRVR15ct9pnHXuzRULazeMl0QC61JdkAt0os AkXBFwp3PSagiaP7QlLSY6j5/SxX682+4bT3RG3eVehXGJD26HaRIuIgLCOjJpjPvuCB NsLpLwcejxOv1m75JkGLhP8zFsdbA4BJ9xXi/SSUl+8ic1ziySFCuzhRfAtTMiexTk4L s1pg== X-Gm-Message-State: ANhLgQ16gRJScVaQ99NOOvd9J6hcSL4RNHOBLT9C20dYLCP96kvdIYnb njU+Ncg8HeoI5OU20YQt2ic= X-Received: by 2002:a17:90a:5d18:: with SMTP id s24mr7445153pji.141.1584072444059; Thu, 12 Mar 2020 21:07:24 -0700 (PDT) Received: from sh03840pcu.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id 6sm15576661pfx.69.2020.03.12.21.07.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Mar 2020 21:07:23 -0700 (PDT) From: Baolin Wang 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 1/3] nvmem: sprd: Fix the block lock operation Date: Fri, 13 Mar 2020 12:07:07 +0800 Message-Id: <03c391fc1bbc3575ed47d5d249106de9e0b7d508.1584072223.git.baolin.wang7@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Freeman Liu According to the Spreadtrum eFuse specification, we should write 0 to the block to trigger the lock operation. Fixes: 096030e7f449 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support") Signed-off-by: Freeman Liu Signed-off-by: Baolin Wang --- drivers/nvmem/sprd-efuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvmem/sprd-efuse.c b/drivers/nvmem/sprd-efuse.c index 2f1e0fb..7a189ef 100644 --- a/drivers/nvmem/sprd-efuse.c +++ b/drivers/nvmem/sprd-efuse.c @@ -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); } -- 1.9.1