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: 10304701 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 EE5C060386 for ; Fri, 23 Mar 2018 13:10:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE99728E79 for ; Fri, 23 Mar 2018 13:10:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D35C028E7C; Fri, 23 Mar 2018 13:10:23 +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 67A2A28E7A for ; Fri, 23 Mar 2018 13:10:23 +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=Jas2Om8Q2Oa7i/8ZToyDLtgo6J WgHRuOXIolDbvscHsA48UEyvDX+DPlTypWCOqUQCUijglL+xT/p/wrL3owQlVYYG30I0SyNbNPUl1 KxUGwMiVQaBa/CqPYxY6IdNOSyyotWqTB1vse7eMzDHZi0ilYfSgAk2TpUaigz2mFYDEg9IGuaVZF 5Y5bAu259wrU49w4X5hmqMCoUANAkSUqrdqPOUEkCG5mv0pU7ldLlQr0N9e4abeoHXIBLc/YZKtaI j8N8w6bQQHJp77HeZcWwdTTGcc7T8JHeM+gcnmQZ0J1QdtDDb2dt4tXAroUNKshSu/nP+WupN1LUG ipmVxATg==; 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 1ezMSU-0004Ld-H9; Fri, 23 Mar 2018 13:10:14 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ezMNk-0000uI-R4 for linux-arm-kernel@lists.infradead.org; Fri, 23 Mar 2018 13:05:25 +0000 Received: by mail-wm0-x241.google.com with SMTP id v21so3467686wmc.1 for ; Fri, 23 Mar 2018 06:05:10 -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=Yn0RLHnHUsdbnL0ddu+F4HkSBCta+EOdJyBJPSIF4YcgRZi6ywnZlWfQxlhaQgYNMT hAyte50a6f36YxIvSGjdgxRhHhZTfYton+m9MvqeBGdkV+D6JLFWBAu6a2CgX5Jiyh6j t1+gqt1cydSLnGiKBAMzTbqjfXplxG5sX7h/CORzY0h5DjACup2vbX4/3CFABaWhRVc1 LRIa06Vtm5vJVq+m1V5ZCs5czrBoNZpQRwLiu5AhZcQs6UOuKnJnyvqoL3n2lJWDWpHj wkZzthyurubfosmEtubOW1LT7cgT6T3M3Qi8QS14rmc/kZduMW69/Yv1yiMOw+oupYXf JsYA== X-Gm-Message-State: AElRT7FD5AlKgL7G+pv+envlrxP9y4jBFkc8iljK7zMaGNhKVDo8Cucf cbmlsrCbnHkWX4J1rlYJ9mo1Og== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180323_060521_405579_41F8C97F X-CRM114-Status: GOOD ( 16.87 ) 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 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; }