From patchwork Fri Mar 23 09:36: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: 10303139 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 31F5960385 for ; Fri, 23 Mar 2018 09:39:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F92728B6A for ; Fri, 23 Mar 2018 09:39:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12BCD28C4A; Fri, 23 Mar 2018 09:39:58 +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 A531D28B6A for ; Fri, 23 Mar 2018 09:39:57 +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=ZEoeA1XJ7NPjbSk9ypm23w1GLM 6WIH21iOGFCHuFfVSDA7Cnx5Fe14qxP03JkpPayPYD7wn0G7JNDCZSVBJyypOW5OI2TaV+/LeU1uL 88Sw2R8C73tjei4EGHANvFk7kNcUoL01od5NQPMCND1ZhSN+i5naSjyNBjaD/CSs765Yj3R4FCdPN t7F1IK0kf9HSiP6xk8Q3C20xBgkkNJRGDtyBX8yULGvQpVAk1juzEFUwlNLKZcI9WXOebo8Fmj+xU Cgi4PacPJVt+u+Vja2s4kh++G0SYlKww7i8p7qvqKaWW3A1cLWxagiG0UelIL2mGS3OwWjEX+aaZ2 PfCp3QEg==; 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 1ezJAv-0006GG-4h; Fri, 23 Mar 2018 09:39:53 +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 1ezJ7b-0004dh-GV for linux-arm-kernel@lists.infradead.org; Fri, 23 Mar 2018 09:36:30 +0000 Received: by mail-wm0-x242.google.com with SMTP id e194so2323021wmd.3 for ; Fri, 23 Mar 2018 02:36:26 -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=vLeHNc69DdDf3RoiCu+IJ9elfPyX/dJeYA2esFh6OFISaY+mKYkctmdmrbWu6H8hvF b2fzlG/jgSIKEtg7x82O2GiG4wBirJdN6pYIJPAaquZbmixJBpGk9LDS2ktSQZ34yMY+ /X8LdYynlyxW0O4p9Y/SRIV0D/Su2mdnU6NzEf4+r0HJMw02Bl6n6apXSG9eHBkvXedq BROw/LCTawPCKAtPUtGmqoIiNnN6SDqSBivndtLGul0NPsXBYIDlMLZ496Q897jeGZel Q7+vlkQQtDH8SVLPB8qoIuI8O1USSSu8/bZJIKKbtW8uoSO9si4I8TeuilqYuLSresVF Uq/g== 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=ZP8UvyBwk+RTZlJjea/WE+hJ9DzLBQCtyoEbhsQd/9bfmvZFWqTbgEaR4wM731xo/N TE5f3koLEJ68k8Bvsb9k112Eqcb0yungU5S0mxqWcnAVEv6BihSSvd5QnioqY/ef0/xS A62qQlULQwoVhGyJQDHFVAUOWGxA2wrgPFMQEnTb1wjYbEjjJjAuWd1tvgjo1UdDlGVm i0mAOFRpYM00vHocehugPvVJ2krzCC/WwDUrpkCyW7MiWTZ4mnBGIL2oGXxaSKwahEu7 /1P8vCe7C6lL4Qs/2W5pd1hry7pXaegTnrc25pRT99+gWBCaRMR5nSigMSr+9TVnHCeC DCjw== X-Gm-Message-State: AElRT7G7ntOE/PldeRk61rmDVkZsbVtL3AsXS0drWjpTpU/iJUMc82VH slVM6pEC9Tr6qY8hJcFm0V8XW8W567Y= X-Google-Smtp-Source: AG47ELs5bPjbEBfJCiW/flLzuyocnRgqFXPXoBSQ+55YbmU3F2TSbA/Bwmf+mnmDUCtUhyc/LWbb8A== X-Received: by 10.28.16.18 with SMTP id 18mr7717588wmq.81.1521797785156; Fri, 23 Mar 2018 02:36:25 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-NIC-1-208-99.w2-15.abo.wanadoo.fr. [2.15.55.99]) by smtp.gmail.com with ESMTPSA id s125sm8045203wmf.4.2018.03.23.02.36.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 02:36:24 -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 v2 6/8] remoteproc: da8xx: prepare and unprepare the clock where needed Date: Fri, 23 Mar 2018 10:36:07 +0100 Message-Id: <20180323093609.24576-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180323093609.24576-1-brgl@bgdev.pl> References: <20180323093609.24576-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180323_023627_660119_C7166F5B 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; }