[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <40ae31ba-7464-22c2-5782-a225d0f17b3b@linaro.org>
Date: Wed, 6 Feb 2019 15:55:08 +0200
From: Georgi Djakov <georgi.djakov@...aro.org>
To: Stephen Boyd <sboyd@...nel.org>,
Jeffrey Hugo <jhugo@...eaurora.org>,
bjorn.andersson@...aro.org, mturquette@...libre.com
Cc: marc.w.gonzalez@...e.fr, andy.gross@...aro.org,
david.brown@...aro.org, robh+dt@...nel.org, mark.rutland@....com,
linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v1 1/4] clk: qcom: smd: Add XO clock for MSM8998
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@...eaurora.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.
Thanks,
Georgi
Powered by blists - more mailing lists