From patchwork Tue Mar 27 09:20:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10309639 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BF80760212 for ; Tue, 27 Mar 2018 09:22:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC1952991C for ; Tue, 27 Mar 2018 09:22:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A09D129922; Tue, 27 Mar 2018 09:22:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C6472991C for ; Tue, 27 Mar 2018 09:22:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752183AbeC0JWX (ORCPT ); Tue, 27 Mar 2018 05:22:23 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:41577 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752190AbeC0JUn (ORCPT ); Tue, 27 Mar 2018 05:20:43 -0400 Received: by mail-wr0-f196.google.com with SMTP id f14so21624757wre.8 for ; Tue, 27 Mar 2018 02:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EzB8jmhRWrbjbZxm5l+X++IDpt1wY/vEtYKiiuHu384=; b=QKiTl0wVM5QC0MtrpCVobXSn98wXTWp4n48Zx05DrfTsEx+yy7Y897fwRAW0G0178P HzRlMGQiom5qi+Hm1kgWokoGwjAHhczYDsT6jjXYQ0wTA1bwu4Bq8UATL3XEtMVPo8uR LDnBV/rbrw+5NWRm3iLXuvaPpKOErqwvRFlCpjeOMeU8Qbt53xaUOD4jl8S8XoluYGvT hnkXGr6KQWTW/vSBvCAtPUXyFfwYZP0sDo1jD5IA5Kc87EqnbKgC8hq03PbQgOdKbj8m RxmrWoWmpR9n1pxst8FoOOMxF0CHRsXVUC8YUjsEW8Y53ykjoWtWxcQyxz67qoRlS4lM zCyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EzB8jmhRWrbjbZxm5l+X++IDpt1wY/vEtYKiiuHu384=; b=cYuOLbRATqmqer78wvr1ARVEpPVMcD9TUFoqZOYMQdJaUZwVkqIW9CS2DY8uKtOimD gP+0nHxbeADbMdXhkZJ4nGSrwkPPPG81wQAyBuOWm3gtVmT/CbpjQrfYfjg1TuUIAJc0 cIsqn4ejFIDwIxMoLzrO6t3w88JgSTq69LYCaaC2ZM9zWQIRrlGGAng54eS7Zi2yfrsj hFwZNJSU+rrUeRw9tapDw4nGTMeeqy5EnYw6qsZJbPF6sGoC/2eEUCzMs/J/DyJmy1D0 i28n8QXgABXWl/CAP2n7oA9Z1oTrE0hb2Z21PAamCXD/rld9/Ze0VCUHqbVMdM3Nhz0C G7VA== X-Gm-Message-State: AElRT7G/MnYTmoPQbjzAgJSiGbKILMkZP1IAG6G8QXQ3+Yu88P+Hz8Ej whdg/dh84bispSJxwhN79Z7jnw== X-Google-Smtp-Source: AG47ELsOdJ4b1ovthtoFxw2pA3xfLXJ5oG0VNy7JoTSYuDAww1K0H/Aute+GU+d2AyH/NU58xnoPwQ== X-Received: by 10.223.184.147 with SMTP id i19mr31644176wrf.129.1522142442196; Tue, 27 Mar 2018 02:20:42 -0700 (PDT) Received: from brgl-bgdev.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id h190sm1288925wmd.22.2018.03.27.02.20.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 02:20:41 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Rob Herring , Mark Rutland , Russell King , David Lechner , Michael Turquette , Stephen Boyd , Ohad Ben-Cohen , Bjorn Andersson , Philipp Zabel Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-remoteproc@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v3 5/8] remoteproc/davinci: prepare and unprepare the clock where needed Date: Tue, 27 Mar 2018 11:20:28 +0200 Message-Id: <20180327092031.11251-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180327092031.11251-1-brgl@bgdev.pl> References: <20180327092031.11251-1-brgl@bgdev.pl> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski We're currently switching the platform to using the common clock framework. We need to explicitly prepare and unprepare the rproc clock. Signed-off-by: Bartosz Golaszewski Acked-by: Suman Anna --- drivers/remoteproc/da8xx_remoteproc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/remoteproc/da8xx_remoteproc.c b/drivers/remoteproc/da8xx_remoteproc.c index 2b24291337b7..f134192922e0 100644 --- a/drivers/remoteproc/da8xx_remoteproc.c +++ b/drivers/remoteproc/da8xx_remoteproc.c @@ -149,9 +149,9 @@ static int da8xx_rproc_start(struct rproc *rproc) writel(rproc->bootaddr, drproc->bootreg); - ret = clk_enable(dsp_clk); + ret = clk_prepare_enable(dsp_clk); if (ret) { - dev_err(dev, "clk_enable() failed: %d\n", ret); + dev_err(dev, "clk_prepare_enable() failed: %d\n", ret); return ret; } @@ -165,7 +165,7 @@ static int da8xx_rproc_stop(struct rproc *rproc) struct da8xx_rproc *drproc = rproc->priv; davinci_clk_reset_assert(drproc->dsp_clk); - clk_disable(drproc->dsp_clk); + clk_disable_unprepare(drproc->dsp_clk); return 0; }