2022-04-08 14:14:05

by Tony Lindgren

[permalink] [raw]
Subject: [PATCH 2/3] clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3

Let's make timer-ti-dm selectable for ARCH_K3, and add a separate option
for OMAP_DM_SYSTIMER as there should be no need for it on ARCH_K3.

For older TI SoCs, we are already selecting OMAP_DM_TIMER in
arch/arm/mach-omap*/Kconfig. For mach-omap2, we need to now also select
OMAP_DM_SYSTIMER.

Cc: Keerthy <[email protected]>
Cc: Nishanth Menon <[email protected]>
Cc: Vignesh Raghavendra <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
---
arch/arm/mach-omap2/Kconfig | 2 ++
drivers/clocksource/Kconfig | 8 +++++++-
drivers/clocksource/Makefile | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -105,6 +105,7 @@ config ARCH_OMAP2PLUS
select MACH_OMAP_GENERIC
select MEMORY
select MFD_SYSCON
+ select OMAP_DM_SYSTIMER
select OMAP_DM_TIMER
select OMAP_GPMC
select PINCTRL
@@ -160,6 +161,7 @@ config SOC_OMAP2420
bool "OMAP2420 support"
depends on ARCH_OMAP2
default y
+ select OMAP_DM_SYSTIMER
select OMAP_DM_TIMER
select SOC_HAS_OMAP2_SDRC

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -22,7 +22,7 @@ config CLKEVT_I8253
config I8253_LOCK
bool

-config OMAP_DM_TIMER
+config OMAP_DM_SYSTIMER
bool
select TIMER_OF

@@ -56,6 +56,12 @@ config DIGICOLOR_TIMER
help
Enables the support for the digicolor timer driver.

+config OMAP_DM_TIMER
+ tristate "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST
+ select TIMER_OF
+ help
+ Enables the support for the TI dual-mode timer driver.
+
config DW_APB_TIMER
bool "DW APB timer driver" if COMPILE_TEST
help
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -18,7 +18,7 @@ obj-$(CONFIG_CLKSRC_MMIO) += mmio.o
obj-$(CONFIG_DAVINCI_TIMER) += timer-davinci.o
obj-$(CONFIG_DIGICOLOR_TIMER) += timer-digicolor.o
obj-$(CONFIG_OMAP_DM_TIMER) += timer-ti-dm.o
-obj-$(CONFIG_OMAP_DM_TIMER) += timer-ti-dm-systimer.o
+obj-$(CONFIG_OMAP_DM_SYSTIMER) += timer-ti-dm-systimer.o
obj-$(CONFIG_DW_APB_TIMER) += dw_apb_timer.o
obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o
obj-$(CONFIG_FTTMR010_TIMER) += timer-fttmr010.o
--
2.35.1


2022-05-22 14:15:57

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH 2/3] clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3

On 08/04/2022 12:17, Tony Lindgren wrote:
> Let's make timer-ti-dm selectable for ARCH_K3, and add a separate option
> for OMAP_DM_SYSTIMER as there should be no need for it on ARCH_K3.
>
> For older TI SoCs, we are already selecting OMAP_DM_TIMER in
> arch/arm/mach-omap*/Kconfig. For mach-omap2, we need to now also select
> OMAP_DM_SYSTIMER.
>
> Cc: Keerthy <[email protected]>
> Cc: Nishanth Menon <[email protected]>
> Cc: Vignesh Raghavendra <[email protected]>
> Signed-off-by: Tony Lindgren <[email protected]>
> ---
> arch/arm/mach-omap2/Kconfig | 2 ++
> drivers/clocksource/Kconfig | 8 +++++++-
> drivers/clocksource/Makefile | 2 +-
> 3 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -105,6 +105,7 @@ config ARCH_OMAP2PLUS
> select MACH_OMAP_GENERIC
> select MEMORY
> select MFD_SYSCON
> + select OMAP_DM_SYSTIMER
> select OMAP_DM_TIMER
> select OMAP_GPMC
> select PINCTRL
> @@ -160,6 +161,7 @@ config SOC_OMAP2420
> bool "OMAP2420 support"
> depends on ARCH_OMAP2
> default y
> + select OMAP_DM_SYSTIMER
> select OMAP_DM_TIMER
> select SOC_HAS_OMAP2_SDRC
>
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -22,7 +22,7 @@ config CLKEVT_I8253
> config I8253_LOCK
> bool
>
> -config OMAP_DM_TIMER
> +config OMAP_DM_SYSTIMER
> bool
> select TIMER_OF
>
> @@ -56,6 +56,12 @@ config DIGICOLOR_TIMER
> help
> Enables the support for the digicolor timer driver.
>
> +config OMAP_DM_TIMER
> + tristate "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST

Actually, I missed this. Could you convert to a 'bool' there is no
module in the timer drivers ATM.



> + select TIMER_OF
> + help
> + Enables the support for the TI dual-mode timer driver.
> +
> config DW_APB_TIMER
> bool "DW APB timer driver" if COMPILE_TEST
> help
> diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
> --- a/drivers/clocksource/Makefile
> +++ b/drivers/clocksource/Makefile
> @@ -18,7 +18,7 @@ obj-$(CONFIG_CLKSRC_MMIO) += mmio.o
> obj-$(CONFIG_DAVINCI_TIMER) += timer-davinci.o
> obj-$(CONFIG_DIGICOLOR_TIMER) += timer-digicolor.o
> obj-$(CONFIG_OMAP_DM_TIMER) += timer-ti-dm.o
> -obj-$(CONFIG_OMAP_DM_TIMER) += timer-ti-dm-systimer.o
> +obj-$(CONFIG_OMAP_DM_SYSTIMER) += timer-ti-dm-systimer.o
> obj-$(CONFIG_DW_APB_TIMER) += dw_apb_timer.o
> obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o
> obj-$(CONFIG_FTTMR010_TIMER) += timer-fttmr010.o


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

2022-05-23 08:19:58

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 2/3] clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3

Hi,

* Daniel Lezcano <[email protected]> [220520 15:24]:
> On 08/04/2022 12:17, Tony Lindgren wrote:
> > diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> > --- a/drivers/clocksource/Kconfig
> > +++ b/drivers/clocksource/Kconfig
> > @@ -22,7 +22,7 @@ config CLKEVT_I8253
> > config I8253_LOCK
> > bool
> > -config OMAP_DM_TIMER
> > +config OMAP_DM_SYSTIMER
> > bool
> > select TIMER_OF
> > @@ -56,6 +56,12 @@ config DIGICOLOR_TIMER
> > help
> > Enables the support for the digicolor timer driver.
> > +config OMAP_DM_TIMER
> > + tristate "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST
>
> Actually, I missed this. Could you convert to a 'bool' there is no module in
> the timer drivers ATM.

OK sure will do.

Did you notice some loadable module usage issues for timers that are not
system timers? Just wondering if there are some issues that I did not
notice.

Regards,

Tony

2022-05-23 12:41:27

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH 2/3] clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3


Hi Tony,

On 23/05/2022 09:13, Tony Lindgren wrote:
> Hi,
>
> * Daniel Lezcano <[email protected]> [220520 15:24]:
>> On 08/04/2022 12:17, Tony Lindgren wrote:
>>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
>>> --- a/drivers/clocksource/Kconfig
>>> +++ b/drivers/clocksource/Kconfig
>>> @@ -22,7 +22,7 @@ config CLKEVT_I8253
>>> config I8253_LOCK
>>> bool
>>> -config OMAP_DM_TIMER
>>> +config OMAP_DM_SYSTIMER
>>> bool
>>> select TIMER_OF
>>> @@ -56,6 +56,12 @@ config DIGICOLOR_TIMER
>>> help
>>> Enables the support for the digicolor timer driver.
>>> +config OMAP_DM_TIMER
>>> + tristate "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST
>>
>> Actually, I missed this. Could you convert to a 'bool' there is no module in
>> the timer drivers ATM.
>
> OK sure will do.
>
> Did you notice some loadable module usage issues for timers that are not
> system timers? Just wondering if there are some issues that I did not
> notice.

I think the removal won't be supported. We already had a proposal to
move one of the timer as a module but I wanted to have more insights
about the changes, not just do that because of a GKI Android.



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

2022-05-23 14:34:10

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 2/3] clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3

* Daniel Lezcano <[email protected]> [220523 12:37]:
> On 23/05/2022 09:13, Tony Lindgren wrote:
> > Did you notice some loadable module usage issues for timers that are not
> > system timers? Just wondering if there are some issues that I did not
> > notice.
>
> I think the removal won't be supported. We already had a proposal to move
> one of the timer as a module but I wanted to have more insights about the
> changes, not just do that because of a GKI Android.

OK good to know.

Thanks,

Tony

Subject: [tip: timers/core] clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3

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

Commit-ID: ab0bbef3ae0f6b5a3b60671cd0124d0fc4fc2567
Gitweb: https://git.kernel.org/tip/ab0bbef3ae0f6b5a3b60671cd0124d0fc4fc2567
Author: Tony Lindgren <[email protected]>
AuthorDate: Fri, 08 Apr 2022 13:17:14 +03:00
Committer: Daniel Lezcano <[email protected]>
CommitterDate: Wed, 27 Jul 2022 17:00:48 +02:00

clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3

Let's make timer-ti-dm selectable for ARCH_K3, and add a separate option
for OMAP_DM_SYSTIMER as there should be no need for it on ARCH_K3.

For older TI SoCs, we are already selecting OMAP_DM_TIMER in
arch/arm/mach-omap*/Kconfig. For mach-omap2, we need to now also select
OMAP_DM_SYSTIMER.

Cc: Keerthy <[email protected]>
Cc: Nishanth Menon <[email protected]>
Cc: Vignesh Raghavendra <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Lezcano <[email protected]>
---
arch/arm/mach-omap2/Kconfig | 2 ++
drivers/clocksource/Kconfig | 8 +++++++-
drivers/clocksource/Makefile | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 02c253d..21e9928 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -105,6 +105,7 @@ config ARCH_OMAP2PLUS
select MACH_OMAP_GENERIC
select MEMORY
select MFD_SYSCON
+ select OMAP_DM_SYSTIMER
select OMAP_DM_TIMER
select OMAP_GPMC
select PINCTRL
@@ -160,6 +161,7 @@ config SOC_OMAP2420
bool "OMAP2420 support"
depends on ARCH_OMAP2
default y
+ select OMAP_DM_SYSTIMER
select OMAP_DM_TIMER
select SOC_HAS_OMAP2_SDRC

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 2dcdf02..967dcfb 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -22,7 +22,7 @@ config CLKEVT_I8253
config I8253_LOCK
bool

-config OMAP_DM_TIMER
+config OMAP_DM_SYSTIMER
bool
select TIMER_OF

@@ -56,6 +56,12 @@ config DIGICOLOR_TIMER
help
Enables the support for the digicolor timer driver.

+config OMAP_DM_TIMER
+ tristate "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST
+ select TIMER_OF
+ help
+ Enables the support for the TI dual-mode timer driver.
+
config DW_APB_TIMER
bool "DW APB timer driver" if COMPILE_TEST
help
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index 685430d..fadb5a8 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -18,7 +18,7 @@ obj-$(CONFIG_CLKSRC_MMIO) += mmio.o
obj-$(CONFIG_DAVINCI_TIMER) += timer-davinci.o
obj-$(CONFIG_DIGICOLOR_TIMER) += timer-digicolor.o
obj-$(CONFIG_OMAP_DM_TIMER) += timer-ti-dm.o
-obj-$(CONFIG_OMAP_DM_TIMER) += timer-ti-dm-systimer.o
+obj-$(CONFIG_OMAP_DM_SYSTIMER) += timer-ti-dm-systimer.o
obj-$(CONFIG_DW_APB_TIMER) += dw_apb_timer.o
obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o
obj-$(CONFIG_FTTMR010_TIMER) += timer-fttmr010.o