From patchwork Wed Oct 21 23:48:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 7461551 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E4CC7BEEA4 for ; Wed, 21 Oct 2015 23:50:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C27832093C for ; Wed, 21 Oct 2015 23:50:17 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id B431820937 for ; Wed, 21 Oct 2015 23:50:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zp37V-0001YU-AM; Wed, 21 Oct 2015 23:48:37 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zp37Q-0001VY-TL for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2015 23:48:33 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 66287141675; Wed, 21 Oct 2015 23:48:12 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 343B5141690; Wed, 21 Oct 2015 23:48:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 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 98680141675; Wed, 21 Oct 2015 23:48:11 +0000 (UTC) Date: Wed, 21 Oct 2015 16:48:10 -0700 From: Stephen Boyd To: Jon Mason Subject: Re: [PATCH v3 03/10] clk: iproc: Add PWRCTRL support Message-ID: <20151021234810.GP19782@codeaurora.org> References: <1444938513-10758-1-git-send-email-jonmason@broadcom.com> <1444938513-10758-4-git-send-email-jonmason@broadcom.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1444938513-10758-4-git-send-email-jonmason@broadcom.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151021_164832_975865_DB44D154 X-CRM114-Status: GOOD ( 18.84 ) X-Spam-Score: -2.6 (--) 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: devicetree@vger.kernel.org, Florian Fainelli , Scott Branden , Hauke Mehrtens , Michael Turquette , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Ray Jui , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 10/15, Jon Mason wrote: > Some iProc SoC clocks use a different way to control clock power, via > the PWRDWN bit in the PLL control register. Since the PLL control > register is used to access the PWRDWN bit, there is no need for the > pwr_base when this is being used. A new flag, IPROC_CLK_EMBED_PWRCTRL, > has been added to identify this usage. We can use the AON interface to > write the values to enable/disable PWRDOWN. > > Signed-off-by: Jon Mason > --- Applied to clk-next + ---8<---- diff --git a/drivers/clk/bcm/clk-iproc-pll.c b/drivers/clk/bcm/clk-iproc-pll.c index 61b49ba24602..fb1e6b1d0df6 100644 --- a/drivers/clk/bcm/clk-iproc-pll.c +++ b/drivers/clk/bcm/clk-iproc-pll.c @@ -150,7 +150,7 @@ static void __pll_disable(struct iproc_pll *pll) if (ctrl->flags & IPROC_CLK_EMBED_PWRCTRL) { val = readl(pll->pll_base + ctrl->aon.offset); - val |= (bit_mask(ctrl->aon.pwr_width) << ctrl->aon.pwr_shift); + val |= bit_mask(ctrl->aon.pwr_width) << ctrl->aon.pwr_shift; writel(val, pll->pll_base + ctrl->aon.offset); if (unlikely(ctrl->flags & IPROC_CLK_NEEDS_READ_BACK)) @@ -160,7 +160,7 @@ static void __pll_disable(struct iproc_pll *pll) if (pll->pwr_base) { /* latch input value so core power can be shut down */ val = readl(pll->pwr_base + ctrl->aon.offset); - val |= (1 << ctrl->aon.iso_shift); + val |= 1 << ctrl->aon.iso_shift; writel(val, pll->pwr_base + ctrl->aon.offset); /* power down the core */