From: "Heiko Stübner" <heiko@sntech.de>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: mturquette@baylibre.com, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
sjoerd.simons@collabora.co.uk
Subject: Re: [PATCH 1/3] clk: add flag for clocks that need to be enabled on rate changes
Date: Sun, 11 Oct 2015 12:41:09 +0200 [thread overview]
Message-ID: <13378907.1JCOSf8QGs@diego> (raw)
In-Reply-To: <20151008215840.GJ26883@codeaurora.org>
Hi Stephen,
Am Donnerstag, 8. Oktober 2015, 14:58:40 schrieb Stephen Boyd:
> On 10/02, Heiko St=FCbner wrote:
> > Hi,
> >=20
> > any comment on these 3 patches?
>=20
> Dong has a similar problem, but those patches conflate this with
> enabling parent clocks during clk_disable_unused() which makes no
> sense to me. So I'm ok with the requirement that we turn clocks
> on to change rates, but I wonder if in this case we need to turn
> on the clock that's changing rates itself, or if we just need to
> turn on the parent and/or future parent of the clock during the
> rate switch. Care to elaborate on that?
As you can see in the follow-up patches, the fractional dividers on Roc=
kchip=20
SoCs are quite strange in that they even need to have their _downstream=
_ mux=20
point to them to actually accept rate changes.
The register value always reflects the value set by the system, but har=
dware=20
really only accepts it if the clock is enabled and even the downstream =
mux=20
selects the fractional divider as parent (they call it a auto-gating fe=
ature).
So in the worst (and current) case, you end up with the register showin=
g the=20
right value, but the hardware can use completely different dividers fro=
m the=20
previous setting.
That strange behaviour got quite deeply investigated between Rockchip a=
nd=20
Google engineers who stumbled upon this in the first place, so I'm reas=
onably=20
sure this is the right solution for that clock type :-) .
Heiko
WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: mturquette@baylibre.com, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
sjoerd.simons@collabora.co.uk
Subject: Re: [PATCH 1/3] clk: add flag for clocks that need to be enabled on rate changes
Date: Sun, 11 Oct 2015 12:41:09 +0200 [thread overview]
Message-ID: <13378907.1JCOSf8QGs@diego> (raw)
In-Reply-To: <20151008215840.GJ26883@codeaurora.org>
Hi Stephen,
Am Donnerstag, 8. Oktober 2015, 14:58:40 schrieb Stephen Boyd:
> On 10/02, Heiko Stübner wrote:
> > Hi,
> >
> > any comment on these 3 patches?
>
> Dong has a similar problem, but those patches conflate this with
> enabling parent clocks during clk_disable_unused() which makes no
> sense to me. So I'm ok with the requirement that we turn clocks
> on to change rates, but I wonder if in this case we need to turn
> on the clock that's changing rates itself, or if we just need to
> turn on the parent and/or future parent of the clock during the
> rate switch. Care to elaborate on that?
As you can see in the follow-up patches, the fractional dividers on Rockchip
SoCs are quite strange in that they even need to have their _downstream_ mux
point to them to actually accept rate changes.
The register value always reflects the value set by the system, but hardware
really only accepts it if the clock is enabled and even the downstream mux
selects the fractional divider as parent (they call it a auto-gating feature).
So in the worst (and current) case, you end up with the register showing the
right value, but the hardware can use completely different dividers from the
previous setting.
That strange behaviour got quite deeply investigated between Rockchip and
Google engineers who stumbled upon this in the first place, so I'm reasonably
sure this is the right solution for that clock type :-) .
Heiko
WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] clk: add flag for clocks that need to be enabled on rate changes
Date: Sun, 11 Oct 2015 12:41:09 +0200 [thread overview]
Message-ID: <13378907.1JCOSf8QGs@diego> (raw)
In-Reply-To: <20151008215840.GJ26883@codeaurora.org>
Hi Stephen,
Am Donnerstag, 8. Oktober 2015, 14:58:40 schrieb Stephen Boyd:
> On 10/02, Heiko St?bner wrote:
> > Hi,
> >
> > any comment on these 3 patches?
>
> Dong has a similar problem, but those patches conflate this with
> enabling parent clocks during clk_disable_unused() which makes no
> sense to me. So I'm ok with the requirement that we turn clocks
> on to change rates, but I wonder if in this case we need to turn
> on the clock that's changing rates itself, or if we just need to
> turn on the parent and/or future parent of the clock during the
> rate switch. Care to elaborate on that?
As you can see in the follow-up patches, the fractional dividers on Rockchip
SoCs are quite strange in that they even need to have their _downstream_ mux
point to them to actually accept rate changes.
The register value always reflects the value set by the system, but hardware
really only accepts it if the clock is enabled and even the downstream mux
selects the fractional divider as parent (they call it a auto-gating feature).
So in the worst (and current) case, you end up with the register showing the
right value, but the hardware can use completely different dividers from the
previous setting.
That strange behaviour got quite deeply investigated between Rockchip and
Google engineers who stumbled upon this in the first place, so I'm reasonably
sure this is the right solution for that clock type :-) .
Heiko
next prev parent reply other threads:[~2015-10-11 10:41 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 17:46 [PATCH 1/3] clk: add flag for clocks that need to be enabled on rate changes Heiko Stuebner
2015-08-21 17:46 ` Heiko Stuebner
2015-08-21 17:46 ` Heiko Stuebner
2015-08-21 17:47 ` [PATCH 2/3] clk: rockchip: handle mux dependency of fractional dividers Heiko Stuebner
2015-08-21 17:47 ` Heiko Stuebner
2015-08-21 17:47 ` Heiko Stuebner
2015-10-05 19:09 ` Sjoerd Simons
2015-10-05 19:09 ` Sjoerd Simons
2015-10-05 19:09 ` Sjoerd Simons
2015-08-21 17:48 ` [PATCH 3/3] clk: rockchip: include downstream muxes into " Heiko Stuebner
2015-08-21 17:48 ` Heiko Stuebner
2015-08-21 17:48 ` Heiko Stuebner
2015-10-05 19:09 ` Sjoerd Simons
2015-10-05 19:09 ` Sjoerd Simons
2015-10-05 19:09 ` Sjoerd Simons
2015-12-12 3:35 ` Caesar Wang
2015-12-12 3:35 ` Caesar Wang
2015-12-12 3:35 ` Caesar Wang
2015-10-02 14:12 ` [PATCH 1/3] clk: add flag for clocks that need to be enabled on rate changes Heiko Stübner
2015-10-02 14:12 ` Heiko Stübner
2015-10-08 21:58 ` Stephen Boyd
2015-10-08 21:58 ` Stephen Boyd
2015-10-11 10:41 ` Heiko Stübner [this message]
2015-10-11 10:41 ` Heiko Stübner
2015-10-11 10:41 ` Heiko Stübner
2015-10-12 16:03 ` Heiko Stübner
2015-10-12 16:03 ` Heiko Stübner
2015-10-12 16:03 ` Heiko Stübner
2015-10-13 3:34 ` Xing Zheng
2015-10-13 3:34 ` Xing Zheng
2015-10-05 19:09 ` Sjoerd Simons
2015-10-05 19:09 ` Sjoerd Simons
2015-10-05 19:09 ` Sjoerd Simons
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=13378907.1JCOSf8QGs@diego \
--to=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
--cc=sjoerd.simons@collabora.co.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.