From patchwork Fri Mar 23 11:47:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10304245 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 C50D5600F6 for ; Fri, 23 Mar 2018 11:47:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6F7C28A24 for ; Fri, 23 Mar 2018 11:47:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABCC028ACF; Fri, 23 Mar 2018 11:47:32 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4673E28A24 for ; Fri, 23 Mar 2018 11:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=DULgm9FggHeF+bkn/mKdR101ZZ5NWud0n0JglJf2oV8=; b=jVh8KWsAuvigMMduwM8ZqYuHMr z1PqBkiUw5cn18c4mCUrqQngRAWJaMxgLTcAAl+aJg2GPzf/dJT/FlqsXfZjf2qB01Q+R9v/AMUI9 nIF4EX2LyE7v84Avl+ZHjj3mMSqawy4/sH/FeIWDXR//vkPjAcF85BoLMScK59RDg1YB2BMtFKkjf xdNDTYU4aXHs3xtefBrvP1br2YAocCZNLPkECVtTxD7TdTfB+5xcGrjHX3590/BcbkyeO7+nqS1D6 qPg365zNb+SIZTM4daeYpaRicGNXgpKRqPO06jUq1sZ74hpf0Kb/x+HHoPr7kiMhISJFOnRw75NgX 9l1xTNSw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ezLAO-00063d-Ig; Fri, 23 Mar 2018 11:47:28 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ezLAK-000615-4k for linux-arm-kernel@lists.infradead.org; Fri, 23 Mar 2018 11:47:26 +0000 Received: by mail-wm0-x242.google.com with SMTP id v21so3045761wmc.1 for ; Fri, 23 Mar 2018 04:47:22 -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=tFi/vH1gKsFL2Jl/OTbUVGXkafcR78ZS4QnondELY/WHeNcNHoAA80D3LqU0TOeKYu ZMqvTtD94fX6BWRDuViAM4x9v9IprOiNYGJlyEy/GAT22SkM8wD2J1mrddsVkhnEkxT5 mVWTy6j6KUXzDONLj2sDIT6KiLhBbZPW2yAfgP+HkUnFz5TqQqP22H4coapICvCzE9zp gREGXAzxXqkYajKyZlSOND0Aqu3QzQJQFvPHfgNrWQAgPiMLQMrBCRN/ZfnAg5U7oImU wwL2wz7d2c8bmURniPbtfCr6zvwVf5Iqgo9kC7a3EZXwlFMEhXdmGtABwwkXWvYfMeYO mBrQ== 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=XCBp/2ibJK7NdBKB4MZVt4dTPO38tiXgGOudsCI8UhUfe971VXg4vN/MJknLxoiyix cDndwTF5hBfGgxuQPtWPCEPdP0g8qpM3o1alVHWiVZ30CIxoRYhQqMnyiwFiHlcXK/e1 5ROR62HeY9u/ZwParBrKgat56+dRFCCQZka1ZlaFFEdkSmCLbykn4kIBl32grO84tcM3 uab2aD/BK04V4LME23iRchR2kcjIN+q/pN9w/GE7dsnk2nLZTlmYqtJfYsYkJxUvaxF1 n/MsDKLHZs1Xf6j3K+HZSePgfvyccrAtdn6qI8Nlnrp0/MNESy7zg/X6HKVS9X2cusfs d/cw== X-Gm-Message-State: AElRT7EArjrDrGsTN6DzRXO/DynY7FkfsCwrYklLOrFYMivf9G0wLPyj wUCYtNQBb5UqZqzHVJ4KJmmUTg== X-Google-Smtp-Source: AG47ELvxhiCJkKYu3TIRLwpm3kuafkc5zM1GGyp6E+3q5vXqoMY/JDfvog+JL1MVjrm6kSA+2JPIrw== X-Received: by 10.28.25.199 with SMTP id 190mr8055820wmz.19.1521805641611; Fri, 23 Mar 2018 04:47:21 -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 m71sm9394843wmd.6.2018.03.23.04.47.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 04:47:21 -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 Subject: [PATCH v3 6/8] remoteproc: da8xx: prepare and unprepare the clock where needed Date: Fri, 23 Mar 2018 12:47:07 +0100 Message-Id: <20180323114709.20330-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180323114709.20330-1-brgl@bgdev.pl> References: <20180323114709.20330-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180323_044724_375612_117DCB5A X-CRM114-Status: GOOD ( 16.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 --- 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; }