From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com,
"Javier Martinez Canillas" <javier@osg.samsung.com>,
"Bartłomiej Żołnierkiewicz" <b.zolnierkie@samsung.com>,
"Seung Woo Kim" <sw0312.kim@samsung.com>,
"Inki Dae" <inki.dae@samsung.com>,
"Chanwoo Choi" <cw00.choi@samsung.com>,
linux-clk@vger.kernel.org
Subject: Re: [PATCH RFC 1/7] clk: samsung: Add enable/disable operation for PLL36XX clocks
Date: Mon, 24 Apr 2017 13:35:13 +0200 [thread overview]
Message-ID: <3232b6e5-05b6-2d91-07ef-e5473ee70889@samsung.com> (raw)
In-Reply-To: <CAJKOXPdKRzC+f4mLCPhHKNuGS4=K-9CC_AKor0Etfu7Bxp-+iw@mail.gmail.com>
(dropping unrelated addresses from Cc list)
On 04/24/2017 01:18 PM, Krzysztof Kozlowski wrote:
> On Mon, Apr 24, 2017 at 1:12 PM, Sylwester Nawrocki
> <s.nawrocki@samsung.com> wrote:
>> On 04/22/2017 05:22 PM, Krzysztof Kozlowski wrote:
>>>> @@ -354,10 +359,12 @@ static int samsung_pll36xx_set_rate(struct clk_hw
>>>> *hw, unsigned long drate,
>>>> writel_relaxed(pll_con1, pll->con_reg + 4);
>>>>
>>>> /* wait_lock_time */
>>>> - do {
>>>> - cpu_relax();
>>>> - tmp = readl_relaxed(pll->con_reg);
>>>> - } while (!(tmp & (1 << PLL36XX_LOCK_STAT_SHIFT)));
>>
>>
>> I will add a comment here like:
>> /* Wait until the PLL is locked if it is enabled. */
>>
>>>> + if (pll_con0 & BIT(pll->enable_offs)) {
>>>
>>>
>>> Why this additional if() is needed?
>>
>>
>> The PLL will never transition to a locked state if it is disabled, without
>> this test we would end up with an indefinite loop below.
>
> Hmmm... shouldn't this be split from this change? Or maybe this is
> needed only because you added enable/disable for pl36xx and previously
> this was not existing?
Yes, it looks like previously the PLLs were always on after were enabled.
I wouldn't be separating that part, as it's all logically dependent.
Just the commit message might need some improvement.
--
Thanks,
Sylwester
next prev parent reply other threads:[~2017-04-24 11:35 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170421172007epcas1p25dba753df34c309e6b00ed08ae930043@epcas1p2.samsung.com>
2017-04-21 17:19 ` [PATCH RFC 0/7] HDMI audio support for Exynos Odroid boards Sylwester Nawrocki
2017-04-21 17:19 ` [PATCH RFC 1/7] clk: samsung: Add enable/disable operation for PLL36XX clocks Sylwester Nawrocki
2017-04-22 2:51 ` Stephen Boyd
2017-04-24 11:12 ` Sylwester Nawrocki
2017-04-22 15:22 ` Krzysztof Kozlowski
2017-04-24 11:12 ` Sylwester Nawrocki
2017-04-24 11:18 ` Krzysztof Kozlowski
2017-04-24 11:35 ` Sylwester Nawrocki [this message]
2017-04-24 11:50 ` Krzysztof Kozlowski
2017-04-21 17:19 ` [PATCH RFC 2/7] clk: samsung: Add definitions of some audio related clocks Sylwester Nawrocki
2017-04-22 15:27 ` Krzysztof Kozlowski
2017-06-08 10:00 ` Sylwester Nawrocki
2017-04-21 17:19 ` [PATCH RFC 3/7] clk: samsung: exynos542x: Add EPLL rate table Sylwester Nawrocki
2017-04-22 15:28 ` Krzysztof Kozlowski
2017-04-21 17:19 ` [PATCH RFC 4/7] drm: exynos: Add driver for HDMI audio interface Sylwester Nawrocki
2017-04-22 15:31 ` Krzysztof Kozlowski
2017-04-21 17:19 ` [PATCH RFC 5/7] ASoC: Add Odroid sound DT bindings documentation Sylwester Nawrocki
2017-04-21 17:28 ` Applied "ASoC: Add Odroid sound DT bindings documentation" to the asoc tree Mark Brown
2017-04-21 17:31 ` Krzysztof Kozlowski
2017-04-21 17:58 ` Mark Brown
2017-04-21 18:01 ` Krzysztof Kozlowski
2017-04-21 18:07 ` Krzysztof Kozlowski
2017-04-24 9:57 ` Mark Brown
2017-04-28 17:03 ` [PATCH RFC 5/7] ASoC: Add Odroid sound DT bindings documentation Rob Herring
2017-06-09 16:53 ` Sylwester Nawrocki
2017-04-21 17:19 ` [PATCH RFC 6/7] ASoC: samsung: Add Odroid ASoC machine driver Sylwester Nawrocki
2017-04-21 17:28 ` Applied "ASoC: samsung: Add Odroid ASoC machine driver" to the asoc tree Mark Brown
2017-04-21 17:19 ` [PATCH RFC 7/7] ARM: dts: samsung: Switch to dedicated Odroid sound card binding Sylwester Nawrocki
2017-04-21 18:43 ` Krzysztof Kozlowski
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=3232b6e5-05b6-2d91-07ef-e5473ee70889@samsung.com \
--to=s.nawrocki@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=inki.dae@samsung.com \
--cc=javier@osg.samsung.com \
--cc=jy0922.shim@samsung.com \
--cc=krzk@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=sw0312.kim@samsung.com \
/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