Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp1737862imc; Fri, 22 Feb 2019 10:13:17 -0800 (PST) X-Google-Smtp-Source: AHgI3IZLDIGepYZ2XjU3F4pvbSqJ3qKut3CO2uM5rd/KkpYdb9lB8f2G6asoNerGx5MX01q+1Mkr X-Received: by 2002:a17:902:76c7:: with SMTP id j7mr5325673plt.121.1550859197489; Fri, 22 Feb 2019 10:13:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550859197; cv=none; d=google.com; s=arc-20160816; b=Whg6JoVq6T6O6WWQzsptBwmRjSTY5VCEFdieJ/tj/yK9GFGodMpJ4qHVLpMG38hQKP WUgeJvCsxzvZl//ldEk1FB8uaNco+Auvxw8vAqjWLWXA0gtrXJpipnNI6FwcswDsij25 oE5XX2EzUpE/Zi6E3ZzVlSh9sJrg8244tzVBaubzyWObSu4nptrYqipSYa+zVqw3mO31 0JvfmNsOu1kGkzdvFTf7UGP/ZdlohYbCzm2CDAauQRXwYW3oznHuq+v/H0BTgprir2ff xfoOb/fsDPzbWKIT6b3CpSv8pGPBj6ztGBvHWj5dcq7tCfQ8mbSMIJQNYFL6tQrJHVvf ILqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:in-reply-to:from:references :user-agent:message-id:subject:content-transfer-encoding :mime-version:dkim-signature; bh=GoH2yDBeD2eh+2aa0JcDQOiDZL1LJW2590LnuivcHOk=; b=n32uZMHFyVsJPjWI/p5eBPSRQpzC+a6VhWCtFyVoPQKBJV+rlcoOBA6ipQZ3WIB7dy f+Vyhci1Q2XztwwNPPDRzM4Zk8+GQhf5Jsd4HgcMjLPMhVxQ+6RzCLnST1QyEE9nv38W ScltFajRhMD2HLhiRk3yuSIED29/R43zSWvo+bmecQ5A2NtRedZ+PQqXgUo9ISrPTJAD kdJj/4na1x/Wdpw9+MtQn7jt9ByTzCMULYSHF0bXjtUGi15D91jeYP3pUoMRF92pabEH wf92N9IlyrbTZNawTpZPgps02JqN26gcGzxRNMXmZRCjPWdBUNA0zaUdyp+KSGL25908 w6xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="D4o2np/8"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e40si1928308plb.234.2019.02.22.10.13.01; Fri, 22 Feb 2019 10:13:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="D4o2np/8"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727174AbfBVSMf (ORCPT + 99 others); Fri, 22 Feb 2019 13:12:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:46136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726152AbfBVSMf (ORCPT ); Fri, 22 Feb 2019 13:12:35 -0500 Received: from localhost (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 6B909206B6; Fri, 22 Feb 2019 18:12:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550859154; bh=LjMXoNtcXYUdEOY3ueVHbXKeT7w1E5goTW+q5BHQ3Bc=; h=Subject:References:From:In-Reply-To:To:Cc:Date:From; b=D4o2np/8wAIqY/xnEO//3DssQfk9LiQyqN1Oi6ZiIzmf92/olWsKS1WmIr8GtDy+t AEWfLhzsr3t4cPTXVjZVc1gggpFd3UDQqTYMrOKIzokxq8+kWj1OOxCGpQ8/xK9Vjy t8RbFaI32zPDiM4SvN4alme5PUU8Yrzafo7dox5M= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v2 08/14] clk: qcom: hfpll: CLK_IGNORE_UNUSED Message-ID: <155085915374.77512.3766517034394591147@swboyd.mtv.corp.google.com> User-Agent: alot/0.8 References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> <1548700381-22376-9-git-send-email-jorge.ramirez-ortiz@linaro.org> From: Stephen Boyd In-Reply-To: <1548700381-22376-9-git-send-email-jorge.ramirez-ortiz@linaro.org> To: andy.gross@linaro.org, arnd@arndb.de, bjorn.andersson@linaro.org, david.brown@linaro.org, enric.balletbo@collabora.com, heiko@sntech.de, horms+renesas@verge.net.au, jagan@amarulasolutions.com, jassisinghbrar@gmail.com, jorge.ramirez-ortiz@linaro.org, mark.rutland@arm.com, mturquette@baylibre.com, olof@lixom.net, robh+dt@kernel.org, sibis@codeaurora.org, will.deacon@arm.com Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Date: Fri, 22 Feb 2019 10:12:33 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Jorge Ramirez-Ortiz (2019-01-28 10:32:55) > 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 > --- > drivers/clk/qcom/hfpll.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c > index 0ffed0d..9d92f5d 100644 > --- a/drivers/clk/qcom/hfpll.c > +++ b/drivers/clk/qcom/hfpll.c > @@ -58,6 +58,7 @@ static int qcom_hfpll_probe(struct platform_device *pde= v) > .parent_names =3D (const char *[]){ "xo" }, > .num_parents =3D 1, > .ops =3D &clk_ops_hfpll, > + .flags =3D CLK_IGNORE_UNUSED, Please put some sort of similar comment in the code so we can find it without git history digging.