From patchwork Mon May 20 12:14:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 164623 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp231437ili; Mon, 20 May 2019 05:34:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0PSQr/JOu2v9DRTMevgeeKVsK1tje8cPxckcYlVUEaYW5yu6RTSgTrA6J7L+exCNQ+PFS X-Received: by 2002:a65:5785:: with SMTP id b5mr39224160pgr.252.1558355691319; Mon, 20 May 2019 05:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558355691; cv=none; d=google.com; s=arc-20160816; b=hdTHlJ+cZ4lTstu1RzZjqJr75OrssTzVf4LuLEh20RSv3+k/NhT6caxaP2RmWMvIqu /JbAWb+nX0kb5idj10UELrJWwF4C7hqeAyBPozC2aoJnFemvIOhtjOQ5cgVdJo33vCTg mVm3JcbPXpa6PmgdSgdLeb8ZCJlC3Kc9ppOuMW6vidSBFJ79/rvBgNe9cAEb1FNzTAVE r2vF0/kcWBDYX3W7wPrI9P4nOBhzqiWFAwaF2H7jFZtgngZDmlq0P30vgxmvrS+OFxiO iJUTNEQKAvnRVmM2j/vUZDGEPzKtgRDn/BdKRAWoHECnp6bvulB0R9OzMNo99eQRTkAb Z3mQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7VDXYu1Vil/45PCSSpHKBrSUhZb+7wVJ3dTnv4Vglp8=; b=bv6UbHzhn1RX/oAQxhIqf/P7LeMc7uwSDCJz9sMeHAFYX9TjoXQezI1nY6oEv0Oq3w /DBUlu0MXKZr6HSpiml1UlglN0XFKfYcNt/Z5iHnAm8HjzbTqRuZtVE2Kd2A2f3KkmQT 8QOY4dobCymUWBVZKmQ1mWKHJY1bZdDcvkVg+H+mOSC9gGVmelnEIJnumGDEbcylaP2v Oc/Gy+KwP3UG7HUcOq/pPTmY9tG1pdoKmuq/T8shRgCjBlcNJou6+Ze6bW7Nr4logQP+ 1VG5cx9Hvlsem1WxHCSCo1D3gCPGt5rHjKW5Ez1EtIqaabZtVhr9zE8stys0msNtXC4q bIVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qb1Miz7D; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 e11si12396932pgv.569.2019.05.20.05.34.49; Mon, 20 May 2019 05:34:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@kernel.org header.s=default header.b=qb1Miz7D; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390801AbfETMdt (ORCPT + 14 others); Mon, 20 May 2019 08:33:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:50978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390464AbfETMdt (ORCPT ); Mon, 20 May 2019 08:33:49 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 858F3214DA; Mon, 20 May 2019 12:33:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558355629; bh=Uw0pF31YOHlAKBRVzNCneThPQgBmKK3R8VVsUrLP+AI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qb1Miz7DnCy45IpKju43H1zO9LCUOtBO4VY57sey63GJ0EHBEaq9pMBbkW/BLF/6p zjfvsC918oPLW3XEzq/742C/FAiawp5cv3hTfhejt940dY02z2PhKCYfgA06csK2gK W82Cn5xvEvXCRl5VfjlFc6gccl7ChYz7dd5Z6rYA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ofir Drang , Gilad Ben-Yossef , Herbert Xu Subject: [PATCH 5.1 065/128] crypto: ccree - pm resume first enable the source clk Date: Mon, 20 May 2019 14:14:12 +0200 Message-Id: <20190520115254.191615570@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520115249.449077487@linuxfoundation.org> References: <20190520115249.449077487@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Ofir Drang commit 7766dd774d80463cec7b81d90c8672af91de2da1 upstream. 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+ Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/ccree/cc_pm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- 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);