linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare()
@ 2020-04-27 17:28 Lokesh Vutla
  2020-04-28 18:22 ` Tony Lindgren
  2020-06-01 13:11 ` [tip: timers/core] " tip-bot2 for Lokesh Vutla
  0 siblings, 2 replies; 6+ messages in thread
From: Lokesh Vutla @ 2020-04-27 17:28 UTC (permalink / raw)
  To: daniel.lezcano, Tony Lindgren
  Cc: Tero Kristo, Sekhar Nori, Lokesh Vutla, Suman Anna,
	Linux OMAP Mailing List, linux-kernel

omap_dm_timer_prepare() is setting up the parent 32KHz clock. This
prepare() gets called by request_timer in the client's driver. Because of
this, the timer clock parent that is set with assigned-clock-parent is being
overwritten. So drop this default setting of parent in prepare().

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
- As per the discussion happened here[0], dropping the default setting.
[0] https://patchwork.kernel.org/patch/11379875/#23309493

 drivers/clocksource/timer-ti-dm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index 2531eab3d6d7..60aff087947a 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -258,9 +258,7 @@ static int omap_dm_timer_prepare(struct omap_dm_timer *timer)
 	__omap_dm_timer_enable_posted(timer);
 	omap_dm_timer_disable(timer);
 
-	rc = omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
-
-	return rc;
+	return 0;
 }
 
 static inline u32 omap_dm_timer_reserved_systimer(int id)
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare()
  2020-04-27 17:28 [PATCH] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare() Lokesh Vutla
@ 2020-04-28 18:22 ` Tony Lindgren
  2020-05-05 16:07   ` Suman Anna
  2020-05-05 18:07   ` Tony Lindgren
  2020-06-01 13:11 ` [tip: timers/core] " tip-bot2 for Lokesh Vutla
  1 sibling, 2 replies; 6+ messages in thread
From: Tony Lindgren @ 2020-04-28 18:22 UTC (permalink / raw)
  To: Lokesh Vutla
  Cc: daniel.lezcano, Tero Kristo, Sekhar Nori, Suman Anna,
	Linux OMAP Mailing List, linux-kernel

* Lokesh Vutla <lokeshvutla@ti.com> [200427 17:29]:
> omap_dm_timer_prepare() is setting up the parent 32KHz clock. This
> prepare() gets called by request_timer in the client's driver. Because of
> this, the timer clock parent that is set with assigned-clock-parent is being
> overwritten. So drop this default setting of parent in prepare().
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

This works just fine for me but depends on the dts changes.

Daniel, for merging, do you want to set up an immutable branch
for the related dts change and this? I'm afraid it will conflict
with the related systimer changes for the dts otherwise.

Regards,

Tony

> ---
> - As per the discussion happened here[0], dropping the default setting.
> [0] https://patchwork.kernel.org/patch/11379875/#23309493
> 
>  drivers/clocksource/timer-ti-dm.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
> index 2531eab3d6d7..60aff087947a 100644
> --- a/drivers/clocksource/timer-ti-dm.c
> +++ b/drivers/clocksource/timer-ti-dm.c
> @@ -258,9 +258,7 @@ static int omap_dm_timer_prepare(struct omap_dm_timer *timer)
>  	__omap_dm_timer_enable_posted(timer);
>  	omap_dm_timer_disable(timer);
>  
> -	rc = omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
> -
> -	return rc;
> +	return 0;
>  }
>  
>  static inline u32 omap_dm_timer_reserved_systimer(int id)
> -- 
> 2.23.0
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare()
  2020-04-28 18:22 ` Tony Lindgren
@ 2020-05-05 16:07   ` Suman Anna
  2020-05-05 18:07   ` Tony Lindgren
  1 sibling, 0 replies; 6+ messages in thread
From: Suman Anna @ 2020-05-05 16:07 UTC (permalink / raw)
  To: Tony Lindgren, Lokesh Vutla
  Cc: daniel.lezcano, Tero Kristo, Sekhar Nori,
	Linux OMAP Mailing List, linux-kernel

On 4/28/20 1:22 PM, Tony Lindgren wrote:
> * Lokesh Vutla <lokeshvutla@ti.com> [200427 17:29]:
>> omap_dm_timer_prepare() is setting up the parent 32KHz clock. This
>> prepare() gets called by request_timer in the client's driver. Because of
>> this, the timer clock parent that is set with assigned-clock-parent is being
>> overwritten. So drop this default setting of parent in prepare().
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Reviewed-by: Suman Anna <s-anna@ti.com>

> 
> This works just fine for me but depends on the dts changes.
> 
> Daniel, for merging, do you want to set up an immutable branch
> for the related dts change and this? I'm afraid it will conflict
> with the related systimer changes for the dts otherwise.
> 
> Regards,
> 
> Tony
> 
>> ---
>> - As per the discussion happened here[0], dropping the default setting.
>> [0] https://patchwork.kernel.org/patch/11379875/#23309493
>>
>>   drivers/clocksource/timer-ti-dm.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
>> index 2531eab3d6d7..60aff087947a 100644
>> --- a/drivers/clocksource/timer-ti-dm.c
>> +++ b/drivers/clocksource/timer-ti-dm.c
>> @@ -258,9 +258,7 @@ static int omap_dm_timer_prepare(struct omap_dm_timer *timer)
>>   	__omap_dm_timer_enable_posted(timer);
>>   	omap_dm_timer_disable(timer);
>>   
>> -	rc = omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
>> -
>> -	return rc;
>> +	return 0;
>>   }
>>   
>>   static inline u32 omap_dm_timer_reserved_systimer(int id)
>> -- 
>> 2.23.0
>>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare()
  2020-04-28 18:22 ` Tony Lindgren
  2020-05-05 16:07   ` Suman Anna
@ 2020-05-05 18:07   ` Tony Lindgren
  2020-05-20  9:03     ` Daniel Lezcano
  1 sibling, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2020-05-05 18:07 UTC (permalink / raw)
  To: Lokesh Vutla
  Cc: daniel.lezcano, Tero Kristo, Sekhar Nori, Suman Anna,
	Linux OMAP Mailing List, linux-kernel

* Tony Lindgren <tony@atomide.com> [200428 18:23]:
> * Lokesh Vutla <lokeshvutla@ti.com> [200427 17:29]:
> > omap_dm_timer_prepare() is setting up the parent 32KHz clock. This
> > prepare() gets called by request_timer in the client's driver. Because of
> > this, the timer clock parent that is set with assigned-clock-parent is being
> > overwritten. So drop this default setting of parent in prepare().
> > 
> > Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> 
> This works just fine for me but depends on the dts changes.
> 
> Daniel, for merging, do you want to set up an immutable branch
> for the related dts change and this? I'm afraid it will conflict
> with the related systimer changes for the dts otherwise.

So I've pushed out an immutable branch for the dts changes
this patch depends on against v5.7-rc1 as omap-for-v5.8/dt-timer
[0][1].

Daniel feel free to merge it in to apply this clocksource patch if
no more comments:

Acked-by: Tony Lindgren <tony@atomide.com>

[0] git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git omap-for-v5.8/dt-timer
[1] https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git/log/?h=omap-for-v5.8/dt-timer

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare()
  2020-05-05 18:07   ` Tony Lindgren
@ 2020-05-20  9:03     ` Daniel Lezcano
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Lezcano @ 2020-05-20  9:03 UTC (permalink / raw)
  To: Tony Lindgren, Lokesh Vutla
  Cc: Tero Kristo, Sekhar Nori, Suman Anna, Linux OMAP Mailing List,
	linux-kernel

On 05/05/2020 20:07, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [200428 18:23]:
>> * Lokesh Vutla <lokeshvutla@ti.com> [200427 17:29]:
>>> omap_dm_timer_prepare() is setting up the parent 32KHz clock. This
>>> prepare() gets called by request_timer in the client's driver. Because of
>>> this, the timer clock parent that is set with assigned-clock-parent is being
>>> overwritten. So drop this default setting of parent in prepare().
>>>
>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>>
>> This works just fine for me but depends on the dts changes.
>>
>> Daniel, for merging, do you want to set up an immutable branch
>> for the related dts change and this? I'm afraid it will conflict
>> with the related systimer changes for the dts otherwise.
> 
> So I've pushed out an immutable branch for the dts changes
> this patch depends on against v5.7-rc1 as omap-for-v5.8/dt-timer
> [0][1].
> 
> Daniel feel free to merge it in to apply this clocksource patch if
> no more comments:
> 
> Acked-by: Tony Lindgren <tony@atomide.com>
> 
> [0] git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git omap-for-v5.8/dt-timer
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git/log/?h=omap-for-v5.8/dt-timer

Merged and patch applied, thanks


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tip: timers/core] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare()
  2020-04-27 17:28 [PATCH] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare() Lokesh Vutla
  2020-04-28 18:22 ` Tony Lindgren
@ 2020-06-01 13:11 ` tip-bot2 for Lokesh Vutla
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot2 for Lokesh Vutla @ 2020-06-01 13:11 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Lokesh Vutla, Suman Anna, Tony Lindgren, Daniel Lezcano, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     264418e20d1fedbed8ad79683b63caa3d72c3b2e
Gitweb:        https://git.kernel.org/tip/264418e20d1fedbed8ad79683b63caa3d72c3b2e
Author:        Lokesh Vutla <lokeshvutla@ti.com>
AuthorDate:    Mon, 27 Apr 2020 22:58:31 +05:30
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Sat, 23 May 2020 00:02:05 +02:00

clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare()

omap_dm_timer_prepare() is setting up the parent 32KHz clock. This
prepare() gets called by request_timer in the client's driver. Because of
this, the timer clock parent that is set with assigned-clock-parent is being
overwritten. So drop this default setting of parent in prepare().

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Suman Anna <s-anna@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200427172831.16546-1-lokeshvutla@ti.com
---
 drivers/clocksource/timer-ti-dm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index 2531eab..60aff08 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -258,9 +258,7 @@ static int omap_dm_timer_prepare(struct omap_dm_timer *timer)
 	__omap_dm_timer_enable_posted(timer);
 	omap_dm_timer_disable(timer);
 
-	rc = omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
-
-	return rc;
+	return 0;
 }
 
 static inline u32 omap_dm_timer_reserved_systimer(int id)

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-06-01 13:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27 17:28 [PATCH] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare() Lokesh Vutla
2020-04-28 18:22 ` Tony Lindgren
2020-05-05 16:07   ` Suman Anna
2020-05-05 18:07   ` Tony Lindgren
2020-05-20  9:03     ` Daniel Lezcano
2020-06-01 13:11 ` [tip: timers/core] " tip-bot2 for Lokesh Vutla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).