From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Boyd Subject: Re: [PATCH v2] clk: qcom: Add MSM8916 Global Clock Controller support Date: Fri, 06 Mar 2015 14:12:58 -0800 Message-ID: <54FA266A.2020502@codeaurora.org> References: <1424882699-32758-1-git-send-email-georgi.djakov@linaro.org> <20150305195838.GA11174@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:39831 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754804AbbCFWNA (ORCPT ); Fri, 6 Mar 2015 17:13:00 -0500 In-Reply-To: <20150305195838.GA11174@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Georgi Djakov Cc: mturquette@linaro.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org On 03/05/15 11:58, Stephen Boyd wrote: > > I guess this is ok, but it makes me uneasy. We don't do any bimc > PLL voting downstream because this PLL is completely under the > control of the RPM. For all we know, the RPM hasn't configured > the PLL to be in FSM voting mode so this may not even work. > Furthermore, if we have clk_pll_ops then we'll go and try to > turn off the PLL when the last software entity on the kernel side > is done using it. Unfortunately, this PLL may be used by > something else that the RPM is managing and so turning it off is > going to break things. > > We mostly need this here to get the right rate for the bus clocks > (which are usually constantly changing rate anyway so modeling it > in the kernel is ok but not perfect). The best solution is > probably to add some read-only PLL ops (clk_pll_ro_ops?) that we > can put on the bimc_pll and drop the voting thing completely. The > read-only ops would just detect the rate of the PLL and not > support anything else. Ah I looked back at the code and I think it may work out to leave the PLL voting as is. If the RPM has configured it for voting, then our PLL ops will bail out early in the enable/disable path. And voting isn't going to hurt anything so that part should be alright. I hope that the RPM is actually putting it in voting mode though and not leaving it under their direct control. That shouldn't be happening but it'd be worth a check. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project