From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 052E9C43603 for ; Thu, 19 Dec 2019 06:25:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2E6421582 for ; Thu, 19 Dec 2019 06:25:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576736722; bh=sUDq6AdOFjQfQ/vzUU6TE208+j1gzWnrzB+TqedNdlg=; h=In-Reply-To:References:Cc:Subject:From:To:Date:List-ID:From; b=fnDenmJ9oQUUPYs4Y1i9WVp2dWw2dzeIR43mOaSMT8WdqozIC7SZYWlTPyN3BekHA AoH3q7mbS28nEqzvqqJOlPy2zD/Q14jDnW5+wumyUS9A9mS4HuSjo9QkXkYUyVmoYv 9dFvaxhYaH8JeJSfCdnjPfG5iibsM9/CShUkxXTQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725987AbfLSGZW (ORCPT ); Thu, 19 Dec 2019 01:25:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:59922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbfLSGZW (ORCPT ); Thu, 19 Dec 2019 01:25:22 -0500 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9CDAD21582; Thu, 19 Dec 2019 06:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576736721; bh=sUDq6AdOFjQfQ/vzUU6TE208+j1gzWnrzB+TqedNdlg=; h=In-Reply-To:References:Cc:Subject:From:To:Date:From; b=Cwht5CSA/K+mCq4m04LLqwD4LxPVpPLs/pKypHI/JJ7wjmtN3ZtXFVjLnbXVIDXIu RUyZqZldGvjpBcu8aeqb+SCrgOzGg5vn+BmH8+u2rJysFccmwf4U0Y+UmQm1M45Rgt VPH8wtwWoYjU/N0QFZ1gIp4YJWIAajM6xQkv+K0k= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20191125135910.679310-5-niklas.cassel@linaro.org> References: <20191125135910.679310-1-niklas.cassel@linaro.org> <20191125135910.679310-5-niklas.cassel@linaro.org> Cc: linux-arm-msm@vger.kernel.org, amit.kucheria@linaro.org, Jorge Ramirez-Ortiz , Niklas Cassel , Michael Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 4/7] clk: qcom: hfpll: CLK_IGNORE_UNUSED From: Stephen Boyd To: Andy Gross , Bjorn Andersson , Niklas Cassel User-Agent: alot/0.8.1 Date: Wed, 18 Dec 2019 22:25:20 -0800 Message-Id: <20191219062521.9CDAD21582@mail.kernel.org> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Quoting Niklas Cassel (2019-11-25 05:59:06) > From: Jorge Ramirez-Ortiz >=20 > When COMMON_CLK_DISABLED_UNUSED is set, in an effort to save power and > to keep the software model of the clock in line with reality, the > framework transverses the clock tree and disables those clocks that > were enabled by the firmware but have not been enabled by any device > driver. >=20 > If CPUFREQ is enabled, early during the system boot, it might attempt > to change the CPU frequency ("set_rate"). If the HFPLL is selected as > a provider, it will then change the rate for this clock. >=20 > As boot continues, clk_disable_unused_subtree will run. Since it wont > find a valid counter (enable_count) for a clock that is actually > enabled it will attempt to disable it which will cause the CPU to > stop. Notice that in this driver, calls to check whether the clock is > enabled are routed via the is_enabled callback which queries the > hardware. >=20 > The following commit, rather than marking the clock critical and > forcing the clock to be always enabled, addresses the above scenario > making sure the clock is not disabled but it continues to rely on the > firmware to enable the clock. >=20 > Co-developed-by: Niklas Cassel > Signed-off-by: Niklas Cassel > Signed-off-by: Jorge Ramirez-Ortiz > Reviewed-by: Bjorn Andersson > --- Applied to clk-next