Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp105695yba; Mon, 20 May 2019 05:48:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuyYPvz4IeyzVNNdPZfUE3XC1dzQCUFfkPtb9vS3FiUnk13TTWPVb4DQKKmJG8iyjb0eMg X-Received: by 2002:a63:7552:: with SMTP id f18mr72378163pgn.234.1558356535282; Mon, 20 May 2019 05:48:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558356535; cv=none; d=google.com; s=arc-20160816; b=xcklKhGnN+deOCW+yR+DSu8G5I5Q0/tgJSYVeDjfhX2R+APKErQJ32eZfm7bJknumJ pqh3/bqv3bXRiN4jYVqVl+2Op89X6xWWBp0jijNFyK1RluDSR1xJ0jdNxmUT1h6eY2mj i/9lleR+ZpTh8hfsOYvZNkkecGyW+Ih7S4RR7CbYY3YmSOIl/h+edw+ZVzOvDEYHuFLJ fACHz7pkvo5netDl1HFzWE1YKmiDQiMqe94j6j3EIWmdx4CO9Q6FY+saNSJStbTbWGDp mFazx9Fh9Ro5s4eAAtXvn01m7IrDbn9B+YMZd5N85HuujIYE4QHkVknPqeyXCd9HCcke UESg== 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=CzgdiEO2RsFjgmL5XXgIsagYd1SOGWdQ6IxohCBdLeUc1kXLq2lNHAq2JxgUd7kt7C 0K4t5StJNqSm+rFjANiMhLOjLewxb8QYN8wIQoYL5fyX/AvFzndHYkoe235lC6dD/1c0 1PUDXhjf49fXOFxTBRbds7bPfM15R6kO704Po/QKa5kV+JazEC2eP1YxZqRDxRqz4o5d +nXmL0vgjcRpDQyV9/7eZhFKpole8O0fxWpp0FPtCNknT0oqGXJtdc6Iakef45cV+mlB TkIs7t3IAwxHTrjCk2h4eF476pEwYnX8ULQUP4AiK+S30QortUx58whIshcvqmC4CDHO fyWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fHXknbxc; 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 k7si17649220pgm.302.2019.05.20.05.48.40; Mon, 20 May 2019 05:48:55 -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=@kernel.org header.s=default header.b=fHXknbxc; 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 S2389499AbfETMrB (ORCPT + 99 others); Mon, 20 May 2019 08:47:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:39634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388895AbfETMYm (ORCPT ); Mon, 20 May 2019 08:24:42 -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 6909D216C4; Mon, 20 May 2019 12:24:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558355081; bh=Uw0pF31YOHlAKBRVzNCneThPQgBmKK3R8VVsUrLP+AI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fHXknbxcp5YuhxEXK4Em1yXF48PFoRnubZ9VZfxZ8NSWLy1wS/iY1p6RYqeUdhawo zzATjQYDqgQ/a4maLa2YxlpLhVnK9A7hTSeWHF54zMiKZYqA95FsDtKRduznkiAFnA 4sXjcBewaxzjuhhb6PDjQTj0rtBWmO9NwUSaTwAU= 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 4.19 049/105] crypto: ccree - pm resume first enable the source clk Date: Mon, 20 May 2019 14:13:55 +0200 Message-Id: <20190520115250.419216080@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520115247.060821231@linuxfoundation.org> References: <20190520115247.060821231@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 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);