From patchwork Mon Aug 15 21:10:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9282181 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 3134E60839 for ; Mon, 15 Aug 2016 21:12:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D27C28E75 for ; Mon, 15 Aug 2016 21:12:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 117B528E7F; Mon, 15 Aug 2016 21:12:04 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9C18328E75 for ; Mon, 15 Aug 2016 21:12:03 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZP9q-0003GK-3u; Mon, 15 Aug 2016 21:10:54 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZP9X-0002Po-Sy for linux-arm-kernel@lists.infradead.org; Mon, 15 Aug 2016 21:10:37 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8CA4161CAB; Mon, 15 Aug 2016 21:10:15 +0000 (UTC) Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id CBC2A61C85; Mon, 15 Aug 2016 21:10:14 +0000 (UTC) Date: Mon, 15 Aug 2016 14:10:14 -0700 From: Stephen Boyd To: Gregory CLEMENT Subject: Re: [PATCH v3 4/6] clk: mvebu Add the time base generator clocks for Armada 3700 Message-ID: <20160815211014.GC361@codeaurora.org> References: <1468935742-11218-1-git-send-email-gregory.clement@free-electrons.com> <1468935742-11218-5-git-send-email-gregory.clement@free-electrons.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1468935742-11218-5-git-send-email-gregory.clement@free-electrons.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160815_141036_059131_772711DD X-CRM114-Status: GOOD ( 17.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , devicetree@vger.kernel.org, Romain Perier , Jason Cooper , Andrew Lunn , Mike Turquette , Omri Itach , linux-kernel@vger.kernel.org, Nadav Haklai , Rob Herring , Terry Zhou , Victor Gu , Hua Jing , Marcin Wojtas , Wilson Ding , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth 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 On 07/19, Gregory CLEMENT wrote: > These clocks are children of the xtal clock and each one can be selected > as a source for the peripheral clocks. > > According to the datasheet it should be possible to modify their rate, > but currently it is not supported. > > Signed-off-by: Gregory CLEMENT > --- Applied to clk-next + the following squashed in diff --git a/drivers/clk/mvebu/armada-37xx-tbg.c b/drivers/clk/mvebu/armada-37xx-tbg.c index 2063ba7d5cb1..aa80db11f543 100644 --- a/drivers/clk/mvebu/armada-37xx-tbg.c +++ b/drivers/clk/mvebu/armada-37xx-tbg.c @@ -46,14 +46,14 @@ struct tbg_def { u32 vcodiv_offset; }; -const struct tbg_def tbg[NUM_TBG] = { +static const struct tbg_def tbg[NUM_TBG] = { {"TBG-A-P", TBG_A_REFDIV, TBG_A_FBDIV, TBG_CTRL8, TBG_A_VCODIV_DIFF}, {"TBG-B-P", TBG_B_REFDIV, TBG_B_FBDIV, TBG_CTRL8, TBG_B_VCODIV_DIFF}, {"TBG-A-S", TBG_A_REFDIV, TBG_A_FBDIV, TBG_CTRL1, TBG_A_VCODIV_SE}, {"TBG-B-S", TBG_B_REFDIV, TBG_B_FBDIV, TBG_CTRL1, TBG_B_VCODIV_SE}, }; -unsigned int tbg_get_mult(void __iomem *reg, const struct tbg_def *ptbg) +static unsigned int tbg_get_mult(void __iomem *reg, const struct tbg_def *ptbg) { u32 val; @@ -62,7 +62,7 @@ unsigned int tbg_get_mult(void __iomem *reg, const struct tbg_def *ptbg) return ((val >> ptbg->fbdiv_offset) & TBG_DIV_MASK) << 2; } -unsigned int tbg_get_div(void __iomem *reg, const struct tbg_def *ptbg) +static unsigned int tbg_get_div(void __iomem *reg, const struct tbg_def *ptbg) { u32 val; unsigned int div; @@ -99,7 +99,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev) hw_tbg_data->num = NUM_TBG; platform_set_drvdata(pdev, hw_tbg_data); - parent = devm_clk_get(dev, 0); + parent = devm_clk_get(dev, NULL); if (IS_ERR(parent)) { dev_err(dev, "Could get the clock parent\n"); return -EINVAL;