2020-04-27 17:32:35

by Lokesh Vutla

[permalink] [raw]
Subject: [PATCH] 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 <[email protected]>
---
- 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


2020-04-28 18:26:09

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare()

* Lokesh Vutla <[email protected]> [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 <[email protected]>

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
>

2020-05-05 16:09:55

by Suman Anna

[permalink] [raw]
Subject: Re: [PATCH] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare()

On 4/28/20 1:22 PM, Tony Lindgren wrote:
> * Lokesh Vutla <[email protected]> [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 <[email protected]>

Reviewed-by: Suman Anna <[email protected]>

>
> 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
>>

2020-05-05 18:11:54

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare()

* Tony Lindgren <[email protected]> [200428 18:23]:
> * Lokesh Vutla <[email protected]> [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 <[email protected]>
>
> 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 <[email protected]>

[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

2020-05-20 09:05:09

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare()

On 05/05/2020 20:07, Tony Lindgren wrote:
> * Tony Lindgren <[email protected]> [200428 18:23]:
>> * Lokesh Vutla <[email protected]> [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 <[email protected]>
>>
>> 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 <[email protected]>
>
> [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

Subject: [tip: timers/core] clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare()

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 <[email protected]>
AuthorDate: Mon, 27 Apr 2020 22:58:31 +05:30
Committer: Daniel Lezcano <[email protected]>
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 <[email protected]>
Reviewed-by: Suman Anna <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
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)