From patchwork Tue Apr 17 17:30:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10346141 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 0483A60216 for ; Tue, 17 Apr 2018 17:32:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC57D285C5 for ; Tue, 17 Apr 2018 17:31:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E143E285C7; Tue, 17 Apr 2018 17:31:59 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, 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 B3933285C3 for ; Tue, 17 Apr 2018 17:31:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751232AbeDQRbp (ORCPT ); Tue, 17 Apr 2018 13:31:45 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:38228 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751857AbeDQRaw (ORCPT ); Tue, 17 Apr 2018 13:30:52 -0400 Received: by mail-wr0-f194.google.com with SMTP id h3so25083347wrh.5 for ; Tue, 17 Apr 2018 10:30:52 -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=qbm96oIJmESVCAK7WPg9ORBvAhO26NTqQZ2ewj4xUuY=; b=yHliXMXy/+EPgcBV0izUH+pnGnE31p69jinfUdkQOU/pOjEf5ZEcYOUPabRf3Yj0MJ X2ZMoQmJ6XUvVUMtbp6kVA+5X+F3DQdqeiwdgM/kEpvx2WMRTvt+skorK1ufR42WBG62 QUCqgLFmS3600XyVURqd5tP4nYANUhty9KlPP6OR8WWE5cOYbyLUPvkLJBfu9p64BxX1 /YKvK7CVLBNJHkvmxCKNixjmFm+gJ8BF7jn/VmTetLs9UumXle9dDalyYm1l41KgYtWA wdHGIXND957rcLPUXNkVNxdNSg8SKnJT6gtZq/HhbVagG/mdEHUdLeqAgGCfpnV1SQdL 81rQ== 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=qbm96oIJmESVCAK7WPg9ORBvAhO26NTqQZ2ewj4xUuY=; b=D8kf/jxK4evgl7nJCmUgp9kMW427DUD5ZviyL6snaN4LiiBQWuBTLbwDDLBnnYU3U/ 7MxuUtO2ZpFY7MmIwJ76bLsSllVj0Q0/9MxiAfThWYA+utkvrZu7hp7eGDhkXL93CMvo dyorybVU6RO3K52RlV34AmcZOyNNnq62R6yDWVzNBBXO1gz2RjS5GdPN4P2AQHqPu1lk Zk15v4NYUhc8feemzcqMjYwz8ehRO+36V/MSloGtg0GLLFwI2/eRdmycFwV9cIUBtB/2 M+9I/Xeh0iVMxtOJ74fh+TX5naVvJXU/P8C50Fy2WDtMjlJ84lgokpL7LDjb1AKcpS29 Fz+A== X-Gm-Message-State: ALQs6tCssMk4N6ZwcxDrVerocPiPnJd1D1Ddh7lO7puX2UsAsSJ3Rqu1 iyDGyjCH24YY1K4O92X/lkXM8g== X-Google-Smtp-Source: AIpwx4+DPvt2whALYy7lFKfSWUwTb+Lk8n1HD/XZwyrrhFcZXEBdNrkZ0omiSnSUAsDvbdriwcWTSg== X-Received: by 10.28.118.8 with SMTP id r8mr1706903wmc.5.1523986251645; Tue, 17 Apr 2018 10:30:51 -0700 (PDT) Received: from brgl-bgdev.home ([2a01:cb1d:af:5b00:e837:b8d5:48c1:571b]) by smtp.gmail.com with ESMTPSA id b47sm14042341wrg.13.2018.04.17.10.30.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 10:30:50 -0700 (PDT) From: Bartosz Golaszewski To: Suman Anna , 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 v6 4/7] remoteproc/davinci: prepare and unprepare the clock where needed Date: Tue, 17 Apr 2018 19:30:35 +0200 Message-Id: <20180417173038.25510-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417173038.25510-1-brgl@bgdev.pl> References: <20180417173038.25510-1-brgl@bgdev.pl> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@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 Reviewed-by: David Lechner Reviewed-by: Sekhar Nori --- 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; }