From patchwork Thu Apr 18 13:39:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 162499 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp763177jan; Thu, 18 Apr 2019 06:42:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtLEtsbgKIkY8qIa2JipU63eBiXBqsUDp1DQm2xz8AUmQJGnwseLWAuLGZOAZ72q1Khapv X-Received: by 2002:a17:902:31c3:: with SMTP id x61mr92286782plb.143.1555594954004; Thu, 18 Apr 2019 06:42:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555594953; cv=none; d=google.com; s=arc-20160816; b=B1rT6O+zXnrIEJc6cGZ3eLLGTvy4tCNt/XKywlr5KdyHRD6Sw1U3kvCaaSVTmVME9I 4WLmPzo5un2IlFJhAXL3s00UBVtIbcj+XxG62P61gVoongt1Us/QaNY+LMI5hxGi+CYD xluzT8C9FtZoWwjeHk9gR/ECjSxTnK9NEeGKmh3AEpNrtbJIHDhBmhDMIOpOdjq7WJyY yKEFNCZfZegu6iTklJEw0M32fiNqaJq2hUWdr1Z56KvElmSzGgK5906uKw3LD8164vA7 d9wVdZ6cLS8DT8mC6gWZIkkQswhysSbgfqnNa2UCctpU3zbcnZkhFblg6G0WpuO7uhrC 9EDg== 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 u71si1904001pgd.147.2019.04.18.06.42.33; Thu, 18 Apr 2019 06:42:33 -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 S2389511AbfDRNmc (ORCPT + 30 others); Thu, 18 Apr 2019 09:42:32 -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 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(-) -- 2.21.0 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; }