From patchwork Fri Mar 23 13:04:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10304683 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 0711060385 for ; Fri, 23 Mar 2018 13:09:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDA3F28E65 for ; Fri, 23 Mar 2018 13:09:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E229528E6B; Fri, 23 Mar 2018 13:09:03 +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 7379428E65 for ; Fri, 23 Mar 2018 13:09:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752976AbeCWNIs (ORCPT ); Fri, 23 Mar 2018 09:08:48 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:52370 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752946AbeCWNFK (ORCPT ); Fri, 23 Mar 2018 09:05:10 -0400 Received: by mail-wm0-f66.google.com with SMTP id l9so3461536wmh.2 for ; Fri, 23 Mar 2018 06:05:09 -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=lD0uiD1oP9qCO11COxXFZ1np8A21XDb4J8F4N03TYiw=; b=QaIAkAWoh11OJEriXDy2Wb2R1wme3fRfbUUU/COZtd3LwoZ/kSAhDlPgGYQeWH1CJ2 lwIVBAsIxFxhP9O2Tq05xh9FpE9ndhL30xHN44Zk9w0A8ji9QySeXwwmVhlUvGL0LfNI pLUL99RiE/hFLLVOo5ac3Ac2KpZNPOqBSBkW6lmfHiWAD7ONM84hReY4pXntEyVf++BT BUT9sx6+eHFdiMNlHhW9Tjm7+amhCGkcivqDW1lSZO27YNcOOX4jrb0yjd1FqY8A3CUl ksHxb2+cJrlLIIR2WFcBWvuuuAOaPKVzn1t0WEgkodXtmsVbOgGWdKVKviU0jLfmFysz i0pw== 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=lD0uiD1oP9qCO11COxXFZ1np8A21XDb4J8F4N03TYiw=; b=c11cyGVU8diMBaNjnEoAgrbe/lwOml7TbHqUtsvBhGjDw4UNEz/lDw/EAGLHyjSF/E QH7oc3igx7qp2LDHiXNFESUx6Xu3iKly8UQiRRlkb5AqAXAhh6TK2SopwMWBXU89RT+r 7JVMGcoSfmoLzzC1SW4fMGKIk6qB/USoMJ0XlFAOmZC0vRTHk+jApBq9vjJP224IkvPz FzJWNKkIoJQrq4pMVI7NriHyRy7nlMngooCaofjTWiWPsBkEUsmfBdtn4CVUslAHZBet Y+qHIjPJCWF/mEgf3WlC5O65YxFfC/EhUtsiB4ugETtOjhtqg95+ugc81z78K1XA6Gjn 2Jog== X-Gm-Message-State: AElRT7H/7J6REa8npXJ/oVFqWIGzt6WUXrhwoCpEhFBJENlJNhSvBnz3 O2cg3GK4/d053bHlOhTnakh0SA== X-Google-Smtp-Source: AG47ELvKg19clVGF4S8MCmpINpCjmUs8b9O8nkmtycw8W9HMcfZGzVwThD6IfBB+uOuQj31tOfF3Qg== X-Received: by 10.28.111.200 with SMTP id c69mr8592125wmi.14.1521810308942; Fri, 23 Mar 2018 06:05:08 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-1-7086-217.w90-116.abo.wanadoo.fr. [90.116.254.217]) by smtp.gmail.com with ESMTPSA id x67sm7069964wma.5.2018.03.23.06.05.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 06:05:08 -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 v4 6/8] remoteproc: da8xx: prepare and unprepare the clock where needed Date: Fri, 23 Mar 2018 14:04:53 +0100 Message-Id: <20180323130455.11470-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180323130455.11470-1-brgl@bgdev.pl> References: <20180323130455.11470-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; }