diff mbox series

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

Message ID 20200427172831.16546-1-lokeshvutla@ti.com (mailing list archive)
State New, archived
Headers show
Series clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare() | expand

Commit Message

Lokesh Vutla April 27, 2020, 5:28 p.m. UTC
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(-)

Comments

Tony Lindgren April 28, 2020, 6:22 p.m. UTC | #1
* 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
>
Suman Anna May 5, 2020, 4:07 p.m. UTC | #2
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
>>
Tony Lindgren May 5, 2020, 6:07 p.m. UTC | #3
* 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
Daniel Lezcano May 20, 2020, 9:03 a.m. UTC | #4
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
diff mbox series

Patch

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)