From patchwork Thu Apr 18 13:39:06 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: 162497 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp762995jan; Thu, 18 Apr 2019 06:42:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1QsF1mkABfH3N73wdMQNa/gPPENoiwaDnukUMeL7nh9aN8bjesqLEFC0gk/7+z7RSt9S1 X-Received: by 2002:a17:902:820c:: with SMTP id x12mr96173430pln.199.1555594942993; Thu, 18 Apr 2019 06:42:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555594942; cv=none; d=google.com; s=arc-20160816; b=KBRUq+gM+BDrbESdf3sW/Sdnfar6E87TwtyamqqqCQOmj9ZczO2Tm6zS8iAAnn1g+c bRUoeOzbUVLTHIt0YIGr8bT3Dq7QEoOjY/VaNB03gMJEMC7yjwS0XXcy+L06jenswS0T d2k3lVcq4JbdQznbBS6LqN0CBVoJ7hGBq6X9H13SDBiFYctkQ3f/VJ5gkkj8u38k6c1M RHq3S3OSrplC/538zYimC4zRrdgoIyHcCavKDHhHCGudUzYfjm/jeDqs5pGjm3a3iWbr ClmU79rjlVXyltAonkEWvNYYbXV+7Hfq/D5z5rTeGlDQK+T6ZjlrF9OtzXzMCABHdX5X BAIA== 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=LQy7tTRC/Ncr/uOFZDGvt3eRYJwBnOZegLIMDY2uA9U=; b=VSfW1CG6lGfpaIHgN+eFzbMR4VZmXxQSQpO8gWH158rcgQZdiY5JNzUunHr7N6xRoC wMwBkQMpY4o1b20gKQDqlhFWovgy5bJepMWljIg/2muC5S9v7L0jnamzC5upjO9Es1UP o2sXbscCsyugDnH51rwsat41YfwnTdFR58TvEdM33rCt7lMkk36E4FIf4xGoCABtLHPX ik9eYSvct+f7KMEHehC/6M/OvogM54wrPJBqGHRu+SP82aySfomWBJFxL5dbH53WyBO2 QjrvnJOqHRsf3mYTDx/IbJkjqFth2kQBdAQPQW5LeupjXYRmc+uekEh0ycoor0hXc/+1 psIQ== 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 b4si1957362pgg.581.2019.04.18.06.42.22; Thu, 18 Apr 2019 06:42:22 -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 S2389248AbfDRNmV (ORCPT + 30 others); Thu, 18 Apr 2019 09:42:21 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33770 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389270AbfDRNmS (ORCPT ); Thu, 18 Apr 2019 09:42:18 -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 53EF580D; Thu, 18 Apr 2019 06:42:18 -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 A78F03F5AF; Thu, 18 Apr 2019 06:42:16 -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 31/35] crypto: ccree: pm resume first enable the source clk Date: Thu, 18 Apr 2019 16:39:06 +0300 Message-Id: <20190418133913.9122-32-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 On power management resume function first enable the device clk source to allow access to the device registers. Signed-off-by: Ofir Drang Signed-off-by: Gilad Ben-Yossef Cc: stable@vger.kernel.org # v4.19+ --- drivers/crypto/ccree/cc_pm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.21.0 diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c index 6f278a0d8ee6..9a5abe406996 100644 --- a/drivers/crypto/ccree/cc_pm.c +++ b/drivers/crypto/ccree/cc_pm.c @@ -42,14 +42,15 @@ int cc_pm_resume(struct device *dev) struct cc_drvdata *drvdata = dev_get_drvdata(dev); dev_dbg(dev, "unset HOST_POWER_DOWN_EN\n"); - cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_DISABLE); - + /* Enables the device source clk */ rc = cc_clk_on(drvdata); if (rc) { dev_err(dev, "failed getting clock back on. We're toast.\n"); return rc; } + cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_DISABLE); + rc = init_cc_regs(drvdata, false); if (rc) { dev_err(dev, "init_cc_regs (%x)\n", rc);