From: Mikko Perttunen <mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Mike Turquette
<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
Alexandre Courbot
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Tomeu Vizoso
<tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
Subject: Re: [GIT PULL 4/8] clk: tegra: Changes for v4.2-rc1
Date: Thu, 21 May 2015 09:25:31 +0300 [thread overview]
Message-ID: <555D7A5B.1070901@nvidia.com> (raw)
In-Reply-To: <20150520195459.GU31753-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
On 05/20/2015 10:54 PM, Stephen Boyd wrote:
> On 05/13, Thierry Reding wrote:
>> Hi Mike, Stephen,
>>
>> The following changes since commit b787f68c36d49bb1d9236f403813641efa74a031:
>>
>> Linux 4.1-rc1 (2015-04-26 17:59:10 -0700)
>>
>> are available in the git repository at:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git tags/tegra-for-4.2-clk
>>
>> for you to fetch changes up to 36b7be6d3ea8f434f1e0723f3fb0e85c3e00ebc2:
>>
>> clk: tegra: Fix hda2codec_2x clock name for Tegra30 (2015-05-13 15:17:14 +0200)
>>
>> I've based this pull request on top of the tegra-for-4.2-ramcode pull
>> request, so pulling only this one should be sufficient to resolve the
>> dependency.
>>
>> Thanks,
>> Thierry
>>
>> ----------------------------------------------------------------
>> clk: tegra: Changes for v4.2-rc1
>>
>> This contains the EMC clock driver that's been exhaustively reviewed and
>> tested. It also includes a change to the clock core that allows a clock
>> provider to perform low-level reparenting of clocks. This is required by
>> the EMC clock driver because the reparenting needs to be done at a very
>> specific point in time during the EMC frequency switch.
>
> Can someone please describe why we need to do software
> reparenting at a specific point in time during a frequency
> switch? I must have missed out on the conversation somewhere and
> looking at the commit that introduces the function, the argument
> for why the API is exposed:
>
> To be used by clock implementations for switching to a new
> parent during rate change.
>
> is lacking in any details about *why* we need it.
>
Hi Stephen,
the way the EMC clock rate is set in hardware is similar to other
clocks, i.e. there's a register and you write the new divider and parent
id to it. However, with EMC, you cannot just do this any time you want;
writing to the register initiates a state machine in the clock hardware
that changes a large number of other parameters regarding DRAM timings
as well. These parameters need to be programmed into shadow registers
before the rate change write is done. This means that both the new
divisor and the parent must be written in the same register write.
The CCF has a callback, set_rate_and_parent, which allows for both to be
passed to the driver at the same time. However, it also requires
set_rate and set_parent to be implemented, which the EMC driver cannot do.
Furthermore, the CCF cannot help with parent selection for the EMC clock
at all. The parent for each rate is selected by the board designer.
There is also the issue that sometimes, the EMC driver cannot directly
switch to the target (rate, parent) pair; instead it is necessary to
switch first to another pair we call a backup timing. In this situation,
we temporarily have a parent that is neither the one we had before the
set_rate call or the one it will be after. Especially, if the switch to
the backup timing succeeds but the following switch to the target timing
fails, then without the reparent call the parent in hardware would be
left inconsistent with the software state.
This is why we've decided to implement the driver with only the set_rate
callback and decide the required transitions within the driver.
This also means that the driver needs to have a function to tell the CCF
that it has changed its parent.
Thanks,
Mikko.
nvpublic
WARNING: multiple messages have this Message-ID (diff)
From: mperttunen@nvidia.com (Mikko Perttunen)
To: linux-arm-kernel@lists.infradead.org
Subject: [GIT PULL 4/8] clk: tegra: Changes for v4.2-rc1
Date: Thu, 21 May 2015 09:25:31 +0300 [thread overview]
Message-ID: <555D7A5B.1070901@nvidia.com> (raw)
In-Reply-To: <20150520195459.GU31753@codeaurora.org>
On 05/20/2015 10:54 PM, Stephen Boyd wrote:
> On 05/13, Thierry Reding wrote:
>> Hi Mike, Stephen,
>>
>> The following changes since commit b787f68c36d49bb1d9236f403813641efa74a031:
>>
>> Linux 4.1-rc1 (2015-04-26 17:59:10 -0700)
>>
>> are available in the git repository at:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git tags/tegra-for-4.2-clk
>>
>> for you to fetch changes up to 36b7be6d3ea8f434f1e0723f3fb0e85c3e00ebc2:
>>
>> clk: tegra: Fix hda2codec_2x clock name for Tegra30 (2015-05-13 15:17:14 +0200)
>>
>> I've based this pull request on top of the tegra-for-4.2-ramcode pull
>> request, so pulling only this one should be sufficient to resolve the
>> dependency.
>>
>> Thanks,
>> Thierry
>>
>> ----------------------------------------------------------------
>> clk: tegra: Changes for v4.2-rc1
>>
>> This contains the EMC clock driver that's been exhaustively reviewed and
>> tested. It also includes a change to the clock core that allows a clock
>> provider to perform low-level reparenting of clocks. This is required by
>> the EMC clock driver because the reparenting needs to be done at a very
>> specific point in time during the EMC frequency switch.
>
> Can someone please describe why we need to do software
> reparenting at a specific point in time during a frequency
> switch? I must have missed out on the conversation somewhere and
> looking at the commit that introduces the function, the argument
> for why the API is exposed:
>
> To be used by clock implementations for switching to a new
> parent during rate change.
>
> is lacking in any details about *why* we need it.
>
Hi Stephen,
the way the EMC clock rate is set in hardware is similar to other
clocks, i.e. there's a register and you write the new divider and parent
id to it. However, with EMC, you cannot just do this any time you want;
writing to the register initiates a state machine in the clock hardware
that changes a large number of other parameters regarding DRAM timings
as well. These parameters need to be programmed into shadow registers
before the rate change write is done. This means that both the new
divisor and the parent must be written in the same register write.
The CCF has a callback, set_rate_and_parent, which allows for both to be
passed to the driver at the same time. However, it also requires
set_rate and set_parent to be implemented, which the EMC driver cannot do.
Furthermore, the CCF cannot help with parent selection for the EMC clock
at all. The parent for each rate is selected by the board designer.
There is also the issue that sometimes, the EMC driver cannot directly
switch to the target (rate, parent) pair; instead it is necessary to
switch first to another pair we call a backup timing. In this situation,
we temporarily have a parent that is neither the one we had before the
set_rate call or the one it will be after. Especially, if the switch to
the backup timing succeeds but the following switch to the target timing
fails, then without the reparent call the parent in hardware would be
left inconsistent with the software state.
This is why we've decided to implement the driver with only the set_rate
callback and decide the required transitions within the driver.
This also means that the driver needs to have a function to tell the CCF
that it has changed its parent.
Thanks,
Mikko.
nvpublic
next prev parent reply other threads:[~2015-05-21 6:25 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 13:49 [GIT PULL 0/8] ARM: tegra: Changes for v4.2-rc1 Thierry Reding
2015-05-13 13:49 ` Thierry Reding
[not found] ` <1431524980-13599-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13 13:49 ` [GIT PULL 1/8] ARM: tegra: Cleanup patches " Thierry Reding
2015-05-13 13:49 ` Thierry Reding
[not found] ` <1431524980-13599-2-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13 15:54 ` Arnd Bergmann
2015-05-13 15:54 ` Arnd Bergmann
2015-05-13 13:49 ` [GIT PULL 2/8] ARM: tegra: Memory controller updates " Thierry Reding
2015-05-13 13:49 ` Thierry Reding
[not found] ` <1431524980-13599-3-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13 15:55 ` Arnd Bergmann
2015-05-13 15:55 ` Arnd Bergmann
2015-05-13 13:49 ` [GIT PULL 3/8] ARM: tegra: RAM code access " Thierry Reding
2015-05-13 13:49 ` Thierry Reding
[not found] ` <1431524980-13599-4-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13 15:58 ` Arnd Bergmann
2015-05-13 15:58 ` Arnd Bergmann
2015-05-13 13:49 ` [GIT PULL 4/8] clk: tegra: Changes " Thierry Reding
2015-05-13 13:49 ` Thierry Reding
[not found] ` <1431524980-13599-5-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-20 19:54 ` Stephen Boyd
2015-05-20 19:54 ` Stephen Boyd
[not found] ` <20150520195459.GU31753-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-05-21 6:25 ` Mikko Perttunen [this message]
2015-05-21 6:25 ` Mikko Perttunen
[not found] ` <555D7A5B.1070901-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-27 14:59 ` Mikko Perttunen
2015-05-27 14:59 ` Mikko Perttunen
2015-05-27 19:50 ` Stephen Boyd
2015-05-27 19:50 ` Stephen Boyd
[not found] ` <20150527195021.GA24204-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-05-28 7:03 ` Mikko Perttunen
2015-05-28 7:03 ` Mikko Perttunen
[not found] ` <5566BDA5.5080104-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-06-18 23:41 ` Michael Turquette
2015-06-18 23:41 ` Michael Turquette
2015-06-20 20:41 ` Michael Turquette
2015-06-20 20:41 ` Michael Turquette
2015-06-22 6:59 ` Mikko Perttunen
2015-06-22 6:59 ` Mikko Perttunen
[not found] ` <5587B243.2070300-/1wQRMveznE@public.gmane.org>
2015-06-22 7:03 ` Mikko Perttunen
2015-06-22 7:03 ` Mikko Perttunen
2015-06-29 8:54 ` Thierry Reding
2015-06-29 8:54 ` Thierry Reding
2015-05-28 10:13 ` Peter De Schrijver
2015-05-28 10:13 ` Peter De Schrijver
2015-05-13 13:49 ` [GIT PULL 5/8] ARM: tegra: Add EMC driver " Thierry Reding
2015-05-13 13:49 ` Thierry Reding
[not found] ` <1431524980-13599-6-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13 16:00 ` Arnd Bergmann
2015-05-13 16:00 ` Arnd Bergmann
2015-05-13 13:49 ` [GIT PULL 6/8] ARM: tegra: Core SoC changes " Thierry Reding
2015-05-13 13:49 ` Thierry Reding
[not found] ` <1431524980-13599-7-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13 16:02 ` Arnd Bergmann
2015-05-13 16:02 ` Arnd Bergmann
2015-05-13 13:49 ` [GIT PULL 7/8] ARM: tegra: Devicetree " Thierry Reding
2015-05-13 13:49 ` Thierry Reding
[not found] ` <1431524980-13599-8-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13 16:09 ` Arnd Bergmann
2015-05-13 16:09 ` Arnd Bergmann
2015-05-15 10:43 ` Thierry Reding
2015-05-15 10:43 ` Thierry Reding
[not found] ` <20150515104332.GB20474-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-05-15 11:06 ` Arnd Bergmann
2015-05-15 11:06 ` Arnd Bergmann
2015-05-13 13:49 ` [GIT PULL 8/8] ARM: tegra: Default configuration updates " Thierry Reding
2015-05-13 13:49 ` Thierry Reding
[not found] ` <1431524980-13599-9-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13 16:12 ` Arnd Bergmann
2015-05-13 16:12 ` Arnd Bergmann
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=555D7A5B.1070901@nvidia.com \
--to=mperttunen-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.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 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.