Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1573333ybl; Wed, 18 Dec 2019 22:26:12 -0800 (PST) X-Google-Smtp-Source: APXvYqxtx2hSYf7Qlh/t31yjaQxPI0s2xNhnsIAFOPLC/6pLYV4V/PDtaCKze6a5YvQM1PmV6/n4 X-Received: by 2002:a9d:6f11:: with SMTP id n17mr6983834otq.126.1576736772906; Wed, 18 Dec 2019 22:26:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576736772; cv=none; d=google.com; s=arc-20160816; b=Th1StzcbjRRHyKzmPnnNORztzPILHhEcvnmnjsXV6jVJsqkZNiDaToch0qmfOmjr5i pdUUo4XH9BBauc58auQYtMZB97rtvdCyp2sW0HVsix6rVfjuhFfFdn9Zd41gEvDWDrWm 04mrIhCD+e5EV7hFoF3b5a8yAttT8a/JnqZd4Gr7a/1eiFsXdRR8HP1a81qgM8GYqSFd wVzVjAmyGi1dAF8aJsePr8JopjZ4GOCFEzDNV84oZXt8B9MDkpmQsP2opdE9P+EY/z6f fQOx3bd2CPV2uukrYv11rwEyaDCUpjX3seZbpylA+2jZ02RXe6mK3eW6gT40SWfudhHi fKwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:user-agent:to:from :subject:cc:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=sUDq6AdOFjQfQ/vzUU6TE208+j1gzWnrzB+TqedNdlg=; b=iwU5CnGuPxXraDhcpkBSB9tgHEzA2ng4E5Ijy9VBz6yJMMvniFZ0PZEVTZoW/HcsNE 4fPwjbTHtLcThuIzp55iHbvGb155F/kQn8nUtFDby+G+5/VUO/nzq6X7whS/Lm7hw/D+ 6mgNPWMUu5XZK4Lv2OimuF1caShGgu6j0TBwJtCWWSWl9clLGt5mV5hwHHCLoo8KwAHG yDMAWEKr7lnQ86BS3TsRFGzgVZ02KisQp5qi5+/ErNxoByn6gdHJrti5P2E3fkTjRLwR ASPLwqDMuXlY7/UzgG7KAzSgPVXQWAxqEjdJcmIVoPjQP4sil7+c/36em1b3DcYrL8+D 6m5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cwht5CSA; 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 b6si2787291oiy.116.2019.12.18.22.26.02; Wed, 18 Dec 2019 22:26:12 -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=Cwht5CSA; 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 S1726559AbfLSGZW (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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