From patchwork Wed May 2 09:56:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10375313 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 ACB1060384 for ; Wed, 2 May 2018 09:57:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E72D2852A for ; Wed, 2 May 2018 09:57:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 930282870E; Wed, 2 May 2018 09:57:20 +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 25DDC2852A for ; Wed, 2 May 2018 09:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751538AbeEBJ5S (ORCPT ); Wed, 2 May 2018 05:57:18 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:43856 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751504AbeEBJ5M (ORCPT ); Wed, 2 May 2018 05:57:12 -0400 Received: by mail-wr0-f193.google.com with SMTP id v15-v6so13320092wrm.10 for ; Wed, 02 May 2018 02:57:11 -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=UeMeRYnOjespDdGqh/9CBl8k2Lwv7N6N+zlQl+FqPLM=; b=KkAoyQGcISsHw0CIWauJmG7ZPFXPT68saW9RKuRo6Q3BaMpMHYCKrm91OoU3s9zPRP cIHnuPnitltU0Fsqu6NIoBkt5XHFBJttzBImno0ROmSLcRbbRuIV9lv0dqj/U/cabL1H 7Cn0jOo4r6g0bnVhC41FfnWDhxXfdR1cLFyTZzlqyABUDjO0ynr7Z5LblTgJlw+FHBlP x10BRKXg2Dk406Q7wwLsadnldl36K0/xGVFktqCEoGh7vV4LxUWo/7ZYp8okgB17d9yr nrKwtta0o39LBlQyoTxyx6QHCJ05LfeiuuiQk+z11Sa2gHkt+Jy1h3EZh7ILmCQEFqC9 8ZuQ== 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=UeMeRYnOjespDdGqh/9CBl8k2Lwv7N6N+zlQl+FqPLM=; b=Jci15INBZ/LtCnpCNXf29HEVF011OFJe3i2f+aXW9yIFc227EeLflA5trprE8lJBH3 a1vsabS8/eu0z4+S/YER52bNWk77CiDfC3ieIY69oX/pbVj8rLewgGPcBELXdokUR9RL AqRbrKWZzrZYlc7Qxr3JczY0stpID8UR3ZFB8ZG42ez0xo270HCcTnN7c0eHknKvMK8u nJ85RkMedbei+ZRu3uox4jFANyCSrCtSRwbE2BYDgm5vX2VJkwiKHD8MqyGvcoLwjEyV 41b8zUNLy+Pkey5VLtm+HHi446kli3XW0T8mEGnlZrt8CTtSxoFsDvmAd73hX83Rj8/d Ge0w== X-Gm-Message-State: ALQs6tC+JzEv4q93PtOOmOeXQPeXRso/aCMaVDmeZU+TgNDOTkk3yqU0 41ZuYqKIEQjU04h+ZcY+vXxeKw== X-Google-Smtp-Source: AB8JxZohMalXFBpZYEi52m8cVBsDjmb+3pA+kwt+pvamn6FCV7Lyx2NDKg+ILJX1/KEjdkLjsNz7QA== X-Received: by 2002:adf:c4c4:: with SMTP id o4-v6mr14281512wrf.173.1525255031118; Wed, 02 May 2018 02:57:11 -0700 (PDT) Received: from brgl-bgdev.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id 2-v6sm13722861wrb.22.2018.05.02.02.57.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 May 2018 02:57:10 -0700 (PDT) From: Bartosz Golaszewski To: Ohad Ben-Cohen , Bjorn Andersson , Sekhar Nori , David Lechner , Suman Anna , Aparna Balasubramanian , Kevin Hilman Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 2/3] remoteproc/davinci: prepare and unprepare the clock where needed Date: Wed, 2 May 2018 11:56:58 +0200 Message-Id: <20180502095659.3626-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180502095659.3626-1-brgl@bgdev.pl> References: <20180502095659.3626-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; }