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: 10346139 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 4D2D260542 for ; Tue, 17 Apr 2018 17:31:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4007F285C4 for ; Tue, 17 Apr 2018 17:31:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34D8B285C9; 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 D453A285C4 for ; Tue, 17 Apr 2018 17:31:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751980AbeDQRbp (ORCPT ); Tue, 17 Apr 2018 13:31:45 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:39941 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751232AbeDQRaw (ORCPT ); Tue, 17 Apr 2018 13:30:52 -0400 Received: by mail-wr0-f193.google.com with SMTP id v60so33834639wrc.7 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=e20o0XFUL2m6UA0l2jay1yyX0BBHwrKnecryxjmOkYU3782evEeX34Nb+QZc3UmDg5 tt3YGGQzb3Vm2dNKjyghRZKbeJmwLYZuPMY/OO+wl384weH7Tlt5VUYaZ08rx7nqODSq hpLlB2bzTjP8J+eme0w8yGNdEj24J3QE+z/Azo03AqdMyBSZQf/qyXHp1AvOQDDssMlx ErC8RyMSP6wUNnpbtxDNsaxFnYUgKEkGQXdIEz20BOBVohZNednl2e7TcaD1gMSXUunI r2f0Gc4BDezKAGLiiaAhcufPQngdLw8muAAHnnovYSeZ1LRG9aNS6lCYCzrVSFDjTILz nbFA== X-Gm-Message-State: ALQs6tBw74CjcZJ0WQbmnolKqqUp3bymqv79t5Tqkg4K/IXw+NzPHOS6 CEZFB9qgfOBDjm19hynkcQkhhQ== 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-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 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; }