Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp607212yba; Thu, 18 Apr 2019 06:45:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQEGklJSncI4Cx1Ao3j7QpN+DEsK8xEX5F33XywUjrh2fnpMyYfRH5GZ80GB7AONHmtpNQ X-Received: by 2002:a65:648f:: with SMTP id e15mr5703627pgv.414.1555595128234; Thu, 18 Apr 2019 06:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555595128; cv=none; d=google.com; s=arc-20160816; b=N04O5QYowr4huXy5BHb1masSWDa+SAAM0f3YolrogYpjpzQ85eGRzD3/GkerVWc1nA lZ+E6LJz9bygxmhCyOO2j1QH4ehWMY5GJao5K7DhiIfz1sXplbjKcTMkDeJL98Cmn82U 1Qf9VYFgh2UwwdljjxREanJHWjnM65nCG6acc92UDmIXhB3kNQZVxe3FODEbW2bxuOpI j5c3YtYEIuFeoGVmjUZwhx0D8HvDyHl9TV/6pdfHvojqbCDhtA65TqSzhhvYoXwv7Q48 ed5hZ1y8+4Eu+hmqTcMZKcYs79rsn0ah93kfUZp0es5t8huGFLhjQQiy7XgC/Zvw90pr JiGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=BH0wAU6zTQHL7NmOm2VAabxvSDeyiMzqoDHlHW9yskE=; b=Nof5B7qGM3PpDu9i2OnXohlUNMQQrLGYpM12BMaZhE+s+1ogURRRK9OpWhU0sKSfaX TuLfsSa8wk5/J+JvSYsm/k13boDcmo/BiPkHaCFfgoUDupGjE+Al6gquPUA9jajAyh3a r8rxg8M/I+iecup5BZtRmHdvJFCe6oRd567zgSntGxz+jOLvuml3540q+ZH5S64YabLD UtfO5KsRjRlnNhumkU3qWRv6Y4TVU5ySrfelpLROeSg1m84J4NH/eH0kbji4AkE29xh6 85/r0ET7oFSe/7Q01Z3ZAtLDTZRmFG6xfvQAmQP8MlV40da9CUsKAlp1/BohkZNxaObH pH3g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si1858372pgp.29.2019.04.18.06.45.13; Thu, 18 Apr 2019 06:45:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389270AbfDRNmb (ORCPT + 99 others); Thu, 18 Apr 2019 09:42:31 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33788 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389054AbfDRNm3 (ORCPT ); Thu, 18 Apr 2019 09:42:29 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7C68180D; Thu, 18 Apr 2019 06:42:29 -0700 (PDT) Received: from e110176-lin.kfn.arm.com (e110176-lin.kfn.arm.com [10.50.4.178]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D41233F5AF; Thu, 18 Apr 2019 06:42:27 -0700 (PDT) From: Gilad Ben-Yossef To: Herbert Xu , "David S. Miller" Cc: Ofir Drang , stable@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 33/35] crypto: ccree: HOST_POWER_DOWN_EN should be the last CC access during suspend Date: Thu, 18 Apr 2019 16:39:08 +0300 Message-Id: <20190418133913.9122-34-gilad@benyossef.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418133913.9122-1-gilad@benyossef.com> References: <20190418133913.9122-1-gilad@benyossef.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ofir Drang During power management suspend the driver need to prepare the device for the power down operation and as a last indication write to the HOST_POWER_DOWN_EN register which signals to the hardware that The ccree is ready for power down. Signed-off-by: Ofir Drang Signed-off-by: Gilad Ben-Yossef Cc: stable@vger.kernel.org # v4.19+ --- drivers/crypto/ccree/cc_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c index 9a5abe406996..77025da2dcb6 100644 --- a/drivers/crypto/ccree/cc_pm.c +++ b/drivers/crypto/ccree/cc_pm.c @@ -25,13 +25,13 @@ int cc_pm_suspend(struct device *dev) int rc; dev_dbg(dev, "set HOST_POWER_DOWN_EN\n"); - cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_ENABLE); rc = cc_suspend_req_queue(drvdata); if (rc) { dev_err(dev, "cc_suspend_req_queue (%x)\n", rc); return rc; } fini_cc_regs(drvdata); + cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_ENABLE); cc_clk_off(drvdata); return 0; } -- 2.21.0