All of lore.kernel.org
 help / color / mirror / Atom feed
From: maxime.coquelin@st.com (Maxime Coquelin)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2 0/2] clk: Support for DT assigned clock parents and rates
Date: Fri, 21 Mar 2014 12:20:14 +0100	[thread overview]
Message-ID: <532C206E.1020907@st.com> (raw)
In-Reply-To: <532AE239.9000800@samsung.com>



On 03/20/2014 01:42 PM, Sylwester Nawrocki wrote:
> Hi Maxime,
>
> On 06/03/14 14:45, Maxime Coquelin wrote:
>> Hi Sylwester,
>>
>> 	I like the principle of your implementation, but I have two questions:
>> 	1 - How can we manage PM with this solution, as the parent/rate will be
>> set only once at probe time?
>> 	2 - How to set the parent of a parent clock (which can be shared with
>> other devices)? Same question about the parent rates.
>
> Thanks for your feedback and apologies for late reply.
No problem! Apologies accepted ;)

>
> IIUC your first concern is about a situation when clocks need to be
> reconfigured upon each resume from system sleep or runtime PM resume ?

Yes. This is the case of the STi SoCs.
When resuming from system sleep, the clocks-related registers are 
restored at their boot state.

> As I mentioned in v1 of the RFC I was considering having individual
> drivers calling explicitly the clocks set up routine. Presumably this
> would allow to resolve the power management related issue.
 From a functional point of view, that would indeed resolve the PM 
related issue.
But I'm not sure that on a performance point of view, parsing the DT at 
each driver's resume call is an efficient way.

> One example I'm aware the approach as in this RFC wouldn't work is
> when a device in a SoC belongs to a power domain, which needs to be
> first switched on before we can start setting up and the clocks'
> configuration get lost after the power domain switch off.
Yes, that's another case to handle.
I don't know which platforms are in that case, but not STi SoCs for your 
information.

>
> OTOH I suspect devices for which one-time clocks setup is sufficient
> will be quite common. And for these there would need to be a single
> call to the setup routine in probe() I guess, since it wouldn't be
> possible to figure out just from the DT data when the actual call
> should be made.
>
> For a global clocks configuration, I thought about specifying that
> in the clocks controller node, and then to have the setup routine
> called e.g. from of_clk_init(). I think that could work well enough,
> together with the patch [1], adding clock dependencies handling.
> But then the clock frequency set up function would need to be
> modified to respect the clock parent relationships, similarly as
> in patch series [2]. A just noticed [2] recently, after posting
> this RFC (adding Tero at Cc).
OK, I agree with the approach.
There is still the PM issue remaining with these clocks, but I think 
that is not related to your series as we already have the issue currently.

Thanks,
Maxime

>
> --
> Regards,
> Sylwester
>
> [1] http://www.spinics.net/lists/arm-kernel/msg310507.html
> [2] http://www.spinics.net/lists/linux-omap/msg103069.html
>

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Coquelin <maxime.coquelin@st.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
Cc: mark.rutland@arm.com, mturquette@linaro.org,
	gregkh@linuxfoundation.org, t.figa@samsung.com,
	sw0312.kim@samsung.com, linux-kernel@vger.kernel.org,
	kyungmin.park@samsung.com, robh+dt@kernel.org,
	galak@codeaurora.org, grant.likely@linaro.org,
	linux@arm.linux.org.uk, m.szyprowski@samsung.com,
	t-kristo@ti.com
Subject: Re: [RFC PATCH v2 0/2] clk: Support for DT assigned clock parents and rates
Date: Fri, 21 Mar 2014 12:20:14 +0100	[thread overview]
Message-ID: <532C206E.1020907@st.com> (raw)
In-Reply-To: <532AE239.9000800@samsung.com>



On 03/20/2014 01:42 PM, Sylwester Nawrocki wrote:
> Hi Maxime,
>
> On 06/03/14 14:45, Maxime Coquelin wrote:
>> Hi Sylwester,
>>
>> 	I like the principle of your implementation, but I have two questions:
>> 	1 - How can we manage PM with this solution, as the parent/rate will be
>> set only once at probe time?
>> 	2 - How to set the parent of a parent clock (which can be shared with
>> other devices)? Same question about the parent rates.
>
> Thanks for your feedback and apologies for late reply.
No problem! Apologies accepted ;)

>
> IIUC your first concern is about a situation when clocks need to be
> reconfigured upon each resume from system sleep or runtime PM resume ?

Yes. This is the case of the STi SoCs.
When resuming from system sleep, the clocks-related registers are 
restored at their boot state.

> As I mentioned in v1 of the RFC I was considering having individual
> drivers calling explicitly the clocks set up routine. Presumably this
> would allow to resolve the power management related issue.
 From a functional point of view, that would indeed resolve the PM 
related issue.
But I'm not sure that on a performance point of view, parsing the DT at 
each driver's resume call is an efficient way.

> One example I'm aware the approach as in this RFC wouldn't work is
> when a device in a SoC belongs to a power domain, which needs to be
> first switched on before we can start setting up and the clocks'
> configuration get lost after the power domain switch off.
Yes, that's another case to handle.
I don't know which platforms are in that case, but not STi SoCs for your 
information.

>
> OTOH I suspect devices for which one-time clocks setup is sufficient
> will be quite common. And for these there would need to be a single
> call to the setup routine in probe() I guess, since it wouldn't be
> possible to figure out just from the DT data when the actual call
> should be made.
>
> For a global clocks configuration, I thought about specifying that
> in the clocks controller node, and then to have the setup routine
> called e.g. from of_clk_init(). I think that could work well enough,
> together with the patch [1], adding clock dependencies handling.
> But then the clock frequency set up function would need to be
> modified to respect the clock parent relationships, similarly as
> in patch series [2]. A just noticed [2] recently, after posting
> this RFC (adding Tero at Cc).
OK, I agree with the approach.
There is still the PM issue remaining with these clocks, but I think 
that is not related to your series as we already have the issue currently.

Thanks,
Maxime

>
> --
> Regards,
> Sylwester
>
> [1] http://www.spinics.net/lists/arm-kernel/msg310507.html
> [2] http://www.spinics.net/lists/linux-omap/msg103069.html
>

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Coquelin <maxime.coquelin@st.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<devicetree@vger.kernel.org>
Cc: <mark.rutland@arm.com>, <mturquette@linaro.org>,
	<gregkh@linuxfoundation.org>, <t.figa@samsung.com>,
	<sw0312.kim@samsung.com>, <linux-kernel@vger.kernel.org>,
	<kyungmin.park@samsung.com>, <robh+dt@kernel.org>,
	<galak@codeaurora.org>, <grant.likely@linaro.org>,
	<linux@arm.linux.org.uk>, <m.szyprowski@samsung.com>,
	<t-kristo@ti.com>
Subject: Re: [RFC PATCH v2 0/2] clk: Support for DT assigned clock parents and rates
Date: Fri, 21 Mar 2014 12:20:14 +0100	[thread overview]
Message-ID: <532C206E.1020907@st.com> (raw)
In-Reply-To: <532AE239.9000800@samsung.com>



On 03/20/2014 01:42 PM, Sylwester Nawrocki wrote:
> Hi Maxime,
>
> On 06/03/14 14:45, Maxime Coquelin wrote:
>> Hi Sylwester,
>>
>> 	I like the principle of your implementation, but I have two questions:
>> 	1 - How can we manage PM with this solution, as the parent/rate will be
>> set only once at probe time?
>> 	2 - How to set the parent of a parent clock (which can be shared with
>> other devices)? Same question about the parent rates.
>
> Thanks for your feedback and apologies for late reply.
No problem! Apologies accepted ;)

>
> IIUC your first concern is about a situation when clocks need to be
> reconfigured upon each resume from system sleep or runtime PM resume ?

Yes. This is the case of the STi SoCs.
When resuming from system sleep, the clocks-related registers are 
restored at their boot state.

> As I mentioned in v1 of the RFC I was considering having individual
> drivers calling explicitly the clocks set up routine. Presumably this
> would allow to resolve the power management related issue.
 From a functional point of view, that would indeed resolve the PM 
related issue.
But I'm not sure that on a performance point of view, parsing the DT at 
each driver's resume call is an efficient way.

> One example I'm aware the approach as in this RFC wouldn't work is
> when a device in a SoC belongs to a power domain, which needs to be
> first switched on before we can start setting up and the clocks'
> configuration get lost after the power domain switch off.
Yes, that's another case to handle.
I don't know which platforms are in that case, but not STi SoCs for your 
information.

>
> OTOH I suspect devices for which one-time clocks setup is sufficient
> will be quite common. And for these there would need to be a single
> call to the setup routine in probe() I guess, since it wouldn't be
> possible to figure out just from the DT data when the actual call
> should be made.
>
> For a global clocks configuration, I thought about specifying that
> in the clocks controller node, and then to have the setup routine
> called e.g. from of_clk_init(). I think that could work well enough,
> together with the patch [1], adding clock dependencies handling.
> But then the clock frequency set up function would need to be
> modified to respect the clock parent relationships, similarly as
> in patch series [2]. A just noticed [2] recently, after posting
> this RFC (adding Tero at Cc).
OK, I agree with the approach.
There is still the PM issue remaining with these clocks, but I think 
that is not related to your series as we already have the issue currently.

Thanks,
Maxime

>
> --
> Regards,
> Sylwester
>
> [1] http://www.spinics.net/lists/arm-kernel/msg310507.html
> [2] http://www.spinics.net/lists/linux-omap/msg103069.html
>

  parent reply	other threads:[~2014-03-21 11:20 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03 18:15 [RFC PATCH v2 0/2] clk: Support for DT assigned clock parents and rates Sylwester Nawrocki
2014-03-03 18:15 ` Sylwester Nawrocki
2014-03-03 18:22 ` [RFC PATCH v2 1/2] clk: Add function parsing arbitrary clock list DT property Sylwester Nawrocki
2014-03-03 18:22   ` Sylwester Nawrocki
2014-03-03 18:22 ` [RFC PATCH v2 2/2] clk: Add handling of clk parent and rate assigned from DT Sylwester Nawrocki
2014-03-03 18:22   ` Sylwester Nawrocki
2014-03-03 18:22   ` Sylwester Nawrocki
2014-03-25 11:19   ` Sylwester Nawrocki
2014-03-25 11:19     ` Sylwester Nawrocki
2014-03-25 11:19     ` Sylwester Nawrocki
2014-03-25 22:54     ` Mike Turquette
2014-03-25 22:54       ` Mike Turquette
2014-03-25 22:54       ` Mike Turquette
2014-03-31 11:39       ` Sylwester Nawrocki
2014-03-31 11:39         ` Sylwester Nawrocki
2014-03-31 11:39         ` Sylwester Nawrocki
2014-03-06 13:45 ` [RFC PATCH v2 0/2] clk: Support for DT assigned clock parents and rates Maxime Coquelin
2014-03-06 13:45   ` Maxime Coquelin
2014-03-06 13:45   ` Maxime Coquelin
2014-03-20 12:42   ` Sylwester Nawrocki
2014-03-20 12:42     ` Sylwester Nawrocki
2014-03-20 12:42     ` Sylwester Nawrocki
2014-03-21  1:45     ` Mike Turquette
2014-03-21  1:45       ` Mike Turquette
2014-03-21  1:45       ` Mike Turquette
2014-03-21 14:09       ` Maxime Coquelin
2014-03-21 14:09         ` Maxime Coquelin
2014-03-21 14:09         ` Maxime Coquelin
2014-03-24 21:57         ` Mike Turquette
2014-03-24 21:57           ` Mike Turquette
2014-03-24 21:57           ` Mike Turquette
2014-03-24 22:07           ` Eric Boxer
2014-03-21 11:20     ` Maxime Coquelin [this message]
2014-03-21 11:20       ` Maxime Coquelin
2014-03-21 11:20       ` Maxime Coquelin
2014-03-21 14:56       ` Sylwester Nawrocki
2014-03-21 14:56         ` Sylwester Nawrocki
2014-03-21 14:56         ` Sylwester Nawrocki

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=532C206E.1020907@st.com \
    --to=maxime.coquelin@st.com \
    --cc=linux-arm-kernel@lists.infradead.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.