linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeffrey Hugo <jhugo@codeaurora.org>
To: Georgi Djakov <georgi.djakov@linaro.org>,
	Stephen Boyd <sboyd@kernel.org>,
	bjorn.andersson@linaro.org, mturquette@baylibre.com
Cc: marc.w.gonzalez@free.fr, andy.gross@linaro.org,
	david.brown@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v1 1/4] clk: qcom: smd: Add XO clock for MSM8998
Date: Wed, 6 Feb 2019 10:04:18 -0700	[thread overview]
Message-ID: <cc7e1104-0fbd-5948-4ed2-af17cdf17e3d@codeaurora.org> (raw)
In-Reply-To: <40ae31ba-7464-22c2-5782-a225d0f17b3b@linaro.org>

On 2/6/2019 6:55 AM, Georgi Djakov wrote:
> Hi Jeffrey,
> 
> On 2/6/19 00:32, Stephen Boyd wrote:
>> Quoting Jeffrey Hugo (2019-02-05 14:15:16)
>>> On 2/5/2019 3:01 PM, Stephen Boyd wrote:
>>>> Quoting Jeffrey Hugo (2019-01-30 08:35:44)
>>>>> The XO clock generally feeds into other clock controllers as the parent
>>>>> for a lot of clock generators.
>>>>>
>>>>> Fixes: 6131dc81211c (clk: qcom: smd: Add support for MSM8998 rpm clocks)
>>>>> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
>>>>
>>>> We've historically left out the XO clk because it causes problems where
>>>> the XO vote goes away during late init because nobody references it from
>>>> the rest of the clk tree and also because RPM defers probe of the system
>>>> and then the console blows up when it gets a clk that can't change rate.
>>>> See commit 54823af9cd52 ("clk: qcom: Always add factor clock for xo
>>>> clocks") for some more info on why we removed all the workarounds and
>>>> stuff around here too.
>>>>
>>>> So are you sure this is OK to do?
>>>>    
>>>>
>>>
>>> So, I've got pretty much everything as modules, and I haven't seen any
>>> issues.  However let me take a look at the commit you point out and see.
>>>
>>
>> Is the name of the clk "xo_clk_src"? That isn't the name that we were
>> expecting the XO clk from RPM to be called. You might have to look back
>> at the history of the rpm clk driver on the list and see when Georgi
>> dropped the XO clk from it and if there was anything wrong with that. I
>> can't recall if this was discussed on the list or if he just told me in
>> some hallway conversation at Connect.
> 
> The problem back then was the following: The RPM clock driver has
> various dependencies on other drivers (hwspinlock, smem, smd, rpmsg etc)
> and may probe defer multiple times during boot. Meanwhile the GCC clocks
> are registered as orphans, as their parent clock (RPM XO) is not there
> yet. And when some driver calls clk_get_rate() on an orphan clock, a
> bogus rate is returned. The consequence of this was that the serial
> console was broken, because of the baud rate being calculated based on
> this bogus clock rate.

Ok.  As far as I am aware, that issue still basically exists but I don't 
seem to be hitting it.  I suspect timing.  However, it seems like the 
key point is that GCC is initing, doesn't have its dependencies in 
place, but is allowing client activity anyways.  It seems like either 1) 
GCC should detect XO isn't present (yet), and probe defer or 2) clocks 
are somehow not usable if the parent hasn't appeared yet (maybe such 
parents are marked as critical somehow?)

Stephen, what are your thoughts?


-- 
Jeffrey Hugo
Qualcomm Datacenter Technologies as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

  reply	other threads:[~2019-02-06 17:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30 16:35 [PATCH v1 0/4] MSM8998 Multimedia Clock Controller Jeffrey Hugo
2019-01-30 16:35 ` [PATCH v1 1/4] clk: qcom: smd: Add XO clock for MSM8998 Jeffrey Hugo
2019-02-05 22:01   ` Stephen Boyd
2019-02-05 22:15     ` Jeffrey Hugo
2019-02-05 22:32       ` Stephen Boyd
2019-02-05 22:37         ` Jeffrey Hugo
2019-02-06 13:55         ` Georgi Djakov
2019-02-06 17:04           ` Jeffrey Hugo [this message]
2019-01-30 16:35 ` [PATCH v1 2/4] dt-bindings: clock: Add support for the MSM8998 mmcc Jeffrey Hugo
2019-02-05 22:02   ` Stephen Boyd
2019-02-05 22:08     ` Jeffrey Hugo
2019-02-05 22:16       ` Stephen Boyd
2019-02-05 22:36         ` Jeffrey Hugo
2019-01-30 16:36 ` [PATCH v1 3/4] clk: qcom: Add MSM8998 Multimedia Clock Controller (MMCC) driver Jeffrey Hugo
2019-02-05 22:06   ` Stephen Boyd
2019-02-05 22:12     ` Jeffrey Hugo
2019-02-05 22:16       ` Stephen Boyd
2019-01-30 16:36 ` [PATCH v1 4/4] arm64: dts: qcom: msm8998: Add mmcc node Jeffrey Hugo
2019-02-05 22:03   ` Stephen Boyd
2019-02-05 22:10     ` Jeffrey Hugo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cc7e1104-0fbd-5948-4ed2-af17cdf17e3d@codeaurora.org \
    --to=jhugo@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=georgi.djakov@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.w.gonzalez@free.fr \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).