From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760818AbbKTQnv (ORCPT ); Fri, 20 Nov 2015 11:43:51 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:18437 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760743AbbKTQns (ORCPT ); Fri, 20 Nov 2015 11:43:48 -0500 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Fri, 20 Nov 2015 08:31:49 -0800 Subject: Re: [PATCH] clk: tegra: Fix bypassing of PLLs To: Jon Hunter , Peter De Schrijver , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Stephen Warren , Thierry Reding , Alexandre Courbot References: <1448032264-29622-1-git-send-email-jonathanh@nvidia.com> CC: , , From: Rhyland Klein Message-ID: <564F4DC1.4090604@nvidia.com> Date: Fri, 20 Nov 2015 11:43:45 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1448032264-29622-1-git-send-email-jonathanh@nvidia.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/20/2015 10:11 AM, Jon Hunter wrote: > The _clk_disable_pll() function will attempt to place a PLL into bypass > if the TEGRA_PLL_BYPASS is specified for the PLL and then disable the PLL > by clearing the enable bit. To place the PLL into bypass, the bypass bit > needs to be set and not cleared. Fix this by setting the bypass bit and > not clearing it. > > Signed-off-by: Jon Hunter > --- > drivers/clk/tegra/clk-pll.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c > index d6d4ecb88e94..e5aa9c87df4c 100644 > --- a/drivers/clk/tegra/clk-pll.c > +++ b/drivers/clk/tegra/clk-pll.c > @@ -312,7 +312,7 @@ static void _clk_pll_disable(struct clk_hw *hw) > > val = pll_readl_base(pll); > if (pll->params->flags & TEGRA_PLL_BYPASS) > - val &= ~PLL_BASE_BYPASS; > + val |= PLL_BASE_BYPASS; > val &= ~PLL_BASE_ENABLE; > pll_writel_base(val, pll); > > Good catch. Acked-by: Rhyland Klein -- nvpublic