All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
@ 2022-04-07  7:10 ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07  7:10 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, linux-omap, linux-arm-kernel, devicetree, Keerthy,
	Krzysztof Kozlowski, Nishanth Menon, Rob Herring,
	Vignesh Raghavendra

Document the dual-mode timers available on am6.

Cc: devicetree@vger.kernel.org
Cc: Keerthy <j-keerthy@ti.com>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Nishanth Menon <nm@ti.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
--- a/Documentation/devicetree/bindings/timer/ti,timer.txt
+++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
@@ -14,6 +14,7 @@ Required properties:
 			ti,omap5430-timer (applicable to OMAP543x devices)
 			ti,am335x-timer	(applicable to AM335x devices)
 			ti,am335x-timer-1ms (applicable to AM335x devices)
+			ti,am6-timer (applicable to AM6 devices)
 
 - reg:			Contains timer register address range (base address and
 			length).
-- 
2.35.1

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

* [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
@ 2022-04-07  7:10 ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07  7:10 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, linux-omap, linux-arm-kernel, devicetree, Keerthy,
	Krzysztof Kozlowski, Nishanth Menon, Rob Herring,
	Vignesh Raghavendra

Document the dual-mode timers available on am6.

Cc: devicetree@vger.kernel.org
Cc: Keerthy <j-keerthy@ti.com>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Nishanth Menon <nm@ti.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
--- a/Documentation/devicetree/bindings/timer/ti,timer.txt
+++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
@@ -14,6 +14,7 @@ Required properties:
 			ti,omap5430-timer (applicable to OMAP543x devices)
 			ti,am335x-timer	(applicable to AM335x devices)
 			ti,am335x-timer-1ms (applicable to AM335x devices)
+			ti,am6-timer (applicable to AM6 devices)
 
 - reg:			Contains timer register address range (base address and
 			length).
-- 
2.35.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
  2022-04-07  7:10 ` Tony Lindgren
@ 2022-04-07  7:10   ` Tony Lindgren
  -1 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07  7:10 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, linux-omap, linux-arm-kernel, Keerthy,
	Nishanth Menon, Vignesh Raghavendra, Krzysztof Kozlowski,
	Rob Herring, devicetree

We have pwm-omap-dmtimer tagged with COMPILE_TEST, so we need to use the
ifdefs around the inline functions. Let's add ARCH_K3 to the list of SoCs
to allow using timer-ti-dm on these SoCs.

Cc: Keerthy <j-keerthy@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 include/clocksource/timer-ti-dm.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/clocksource/timer-ti-dm.h b/include/clocksource/timer-ti-dm.h
--- a/include/clocksource/timer-ti-dm.h
+++ b/include/clocksource/timer-ti-dm.h
@@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
  * The below are inlined to optimize code size for system timers. Other code
  * should not need these at all.
  */
-#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
+#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
+	defined(CONFIG_ARCH_K3)
 static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg,
 						int posted)
 {
@@ -390,5 +391,5 @@ static inline void __omap_dm_timer_write_status(struct omap_dm_timer *timer,
 {
 	writel_relaxed(value, timer->irq_stat);
 }
-#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS */
+#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS || CONFIG_ARCH_K3 */
 #endif /* __CLOCKSOURCE_DMTIMER_H */
-- 
2.35.1

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

* [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
@ 2022-04-07  7:10   ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07  7:10 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, linux-omap, linux-arm-kernel, Keerthy,
	Nishanth Menon, Vignesh Raghavendra, Krzysztof Kozlowski,
	Rob Herring, devicetree

We have pwm-omap-dmtimer tagged with COMPILE_TEST, so we need to use the
ifdefs around the inline functions. Let's add ARCH_K3 to the list of SoCs
to allow using timer-ti-dm on these SoCs.

Cc: Keerthy <j-keerthy@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 include/clocksource/timer-ti-dm.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/clocksource/timer-ti-dm.h b/include/clocksource/timer-ti-dm.h
--- a/include/clocksource/timer-ti-dm.h
+++ b/include/clocksource/timer-ti-dm.h
@@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
  * The below are inlined to optimize code size for system timers. Other code
  * should not need these at all.
  */
-#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
+#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
+	defined(CONFIG_ARCH_K3)
 static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg,
 						int posted)
 {
@@ -390,5 +391,5 @@ static inline void __omap_dm_timer_write_status(struct omap_dm_timer *timer,
 {
 	writel_relaxed(value, timer->irq_stat);
 }
-#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS */
+#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS || CONFIG_ARCH_K3 */
 #endif /* __CLOCKSOURCE_DMTIMER_H */
-- 
2.35.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/4] clocksource/drivers/timer-ti-dm: Add compatible for am6
  2022-04-07  7:10 ` Tony Lindgren
@ 2022-04-07  7:10   ` Tony Lindgren
  -1 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07  7:10 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, linux-omap, linux-arm-kernel, Keerthy,
	Nishanth Menon, Vignesh Raghavendra, Krzysztof Kozlowski,
	Rob Herring, devicetree

Add compatible for am6 to support the timers. For example, am654 has
four timers in the MCU domain and 12 timers in the MAIN domain.

Cc: Keerthy <j-keerthy@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/clocksource/timer-ti-dm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -922,6 +922,10 @@ static const struct dmtimer_platform_data omap3plus_pdata = {
 	.timer_ops = &dmtimer_ops,
 };
 
+static const struct dmtimer_platform_data am6_pdata = {
+	.timer_ops = &dmtimer_ops,
+};
+
 static const struct of_device_id omap_timer_match[] = {
 	{
 		.compatible = "ti,omap2420-timer",
@@ -950,6 +954,10 @@ static const struct of_device_id omap_timer_match[] = {
 		.compatible = "ti,dm816-timer",
 		.data = &omap3plus_pdata,
 	},
+	{
+		.compatible = "ti,am6-timer",
+		.data = &am6_pdata,
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, omap_timer_match);
-- 
2.35.1

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

* [PATCH 3/4] clocksource/drivers/timer-ti-dm: Add compatible for am6
@ 2022-04-07  7:10   ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07  7:10 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, linux-omap, linux-arm-kernel, Keerthy,
	Nishanth Menon, Vignesh Raghavendra, Krzysztof Kozlowski,
	Rob Herring, devicetree

Add compatible for am6 to support the timers. For example, am654 has
four timers in the MCU domain and 12 timers in the MAIN domain.

Cc: Keerthy <j-keerthy@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/clocksource/timer-ti-dm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -922,6 +922,10 @@ static const struct dmtimer_platform_data omap3plus_pdata = {
 	.timer_ops = &dmtimer_ops,
 };
 
+static const struct dmtimer_platform_data am6_pdata = {
+	.timer_ops = &dmtimer_ops,
+};
+
 static const struct of_device_id omap_timer_match[] = {
 	{
 		.compatible = "ti,omap2420-timer",
@@ -950,6 +954,10 @@ static const struct of_device_id omap_timer_match[] = {
 		.compatible = "ti,dm816-timer",
 		.data = &omap3plus_pdata,
 	},
+	{
+		.compatible = "ti,am6-timer",
+		.data = &am6_pdata,
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, omap_timer_match);
-- 
2.35.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 4/4] clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3
  2022-04-07  7:10 ` Tony Lindgren
@ 2022-04-07  7:10   ` Tony Lindgren
  -1 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07  7:10 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, linux-omap, linux-arm-kernel, Keerthy,
	Nishanth Menon, Vignesh Raghavendra, Krzysztof Kozlowski,
	Rob Herring, devicetree

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 <j-keerthy@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 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

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

* [PATCH 4/4] clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3
@ 2022-04-07  7:10   ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07  7:10 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, linux-omap, linux-arm-kernel, Keerthy,
	Nishanth Menon, Vignesh Raghavendra, Krzysztof Kozlowski,
	Rob Herring, devicetree

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 <j-keerthy@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
  2022-04-07  7:10 ` Tony Lindgren
@ 2022-04-07  7:56   ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 34+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07  7:56 UTC (permalink / raw)
  To: Tony Lindgren, Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, linux-omap, linux-arm-kernel, devicetree, Keerthy,
	Krzysztof Kozlowski, Nishanth Menon, Rob Herring,
	Vignesh Raghavendra

On 07/04/2022 09:10, Tony Lindgren wrote:
> Document the dual-mode timers available on am6.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Keerthy <j-keerthy@ti.com>
> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Vignesh Raghavendra <vigneshr@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
>  1 file changed, 1 insertion(+)
> 


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
@ 2022-04-07  7:56   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 34+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-07  7:56 UTC (permalink / raw)
  To: Tony Lindgren, Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, linux-omap, linux-arm-kernel, devicetree, Keerthy,
	Krzysztof Kozlowski, Nishanth Menon, Rob Herring,
	Vignesh Raghavendra

On 07/04/2022 09:10, Tony Lindgren wrote:
> Document the dual-mode timers available on am6.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Keerthy <j-keerthy@ti.com>
> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Vignesh Raghavendra <vigneshr@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
>  1 file changed, 1 insertion(+)
> 


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
  2022-04-07  7:10   ` Tony Lindgren
@ 2022-04-07  8:04     ` Daniel Lezcano
  -1 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2022-04-07  8:04 UTC (permalink / raw)
  To: Tony Lindgren, Thomas Gleixner
  Cc: linux-kernel, linux-omap, linux-arm-kernel, Keerthy,
	Nishanth Menon, Vignesh Raghavendra, Krzysztof Kozlowski,
	Rob Herring, devicetree

On 07/04/2022 09:10, Tony Lindgren wrote:
> We have pwm-omap-dmtimer tagged with COMPILE_TEST, so we need to use the
> ifdefs around the inline functions. Let's add ARCH_K3 to the list of SoCs
> to allow using timer-ti-dm on these SoCs.
> 
> Cc: Keerthy <j-keerthy@ti.com>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Vignesh Raghavendra <vigneshr@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>   include/clocksource/timer-ti-dm.h | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/include/clocksource/timer-ti-dm.h b/include/clocksource/timer-ti-dm.h
> --- a/include/clocksource/timer-ti-dm.h
> +++ b/include/clocksource/timer-ti-dm.h
> @@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
>    * The below are inlined to optimize code size for system timers. Other code
>    * should not need these at all.
>    */
> -#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
> +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
> +	defined(CONFIG_ARCH_K3)

Why not replace the above by CONFIG_OMAP_DM_TIMER ?

>   static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg,
>   						int posted)
>   {
> @@ -390,5 +391,5 @@ static inline void __omap_dm_timer_write_status(struct omap_dm_timer *timer,
>   {
>   	writel_relaxed(value, timer->irq_stat);
>   }
> -#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS */
> +#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS || CONFIG_ARCH_K3 */
>   #endif /* __CLOCKSOURCE_DMTIMER_H */


-- 
<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] 34+ messages in thread

* Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
@ 2022-04-07  8:04     ` Daniel Lezcano
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2022-04-07  8:04 UTC (permalink / raw)
  To: Tony Lindgren, Thomas Gleixner
  Cc: linux-kernel, linux-omap, linux-arm-kernel, Keerthy,
	Nishanth Menon, Vignesh Raghavendra, Krzysztof Kozlowski,
	Rob Herring, devicetree

On 07/04/2022 09:10, Tony Lindgren wrote:
> We have pwm-omap-dmtimer tagged with COMPILE_TEST, so we need to use the
> ifdefs around the inline functions. Let's add ARCH_K3 to the list of SoCs
> to allow using timer-ti-dm on these SoCs.
> 
> Cc: Keerthy <j-keerthy@ti.com>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Vignesh Raghavendra <vigneshr@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>   include/clocksource/timer-ti-dm.h | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/include/clocksource/timer-ti-dm.h b/include/clocksource/timer-ti-dm.h
> --- a/include/clocksource/timer-ti-dm.h
> +++ b/include/clocksource/timer-ti-dm.h
> @@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
>    * The below are inlined to optimize code size for system timers. Other code
>    * should not need these at all.
>    */
> -#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
> +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
> +	defined(CONFIG_ARCH_K3)

Why not replace the above by CONFIG_OMAP_DM_TIMER ?

>   static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg,
>   						int posted)
>   {
> @@ -390,5 +391,5 @@ static inline void __omap_dm_timer_write_status(struct omap_dm_timer *timer,
>   {
>   	writel_relaxed(value, timer->irq_stat);
>   }
> -#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS */
> +#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS || CONFIG_ARCH_K3 */
>   #endif /* __CLOCKSOURCE_DMTIMER_H */


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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
  2022-04-07  8:04     ` Daniel Lezcano
@ 2022-04-07  8:15       ` Tony Lindgren
  -1 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07  8:15 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Thomas Gleixner, linux-kernel, linux-omap, linux-arm-kernel,
	Keerthy, Nishanth Menon, Vignesh Raghavendra,
	Krzysztof Kozlowski, Rob Herring, devicetree

* Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:01]:
> On 07/04/2022 09:10, Tony Lindgren wrote:
> > @@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
> >    * The below are inlined to optimize code size for system timers. Other code
> >    * should not need these at all.
> >    */
> > -#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
> > +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
> > +	defined(CONFIG_ARCH_K3)
> 
> Why not replace the above by CONFIG_OMAP_DM_TIMER ?

Hmm that's a good question for why it was not that way earlier.

This series changes things for tristate "OMAP dual-mode timer driver" if
ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for
COMPILE_TEST it seems.

Regards,

Tony

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

* Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
@ 2022-04-07  8:15       ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07  8:15 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Thomas Gleixner, linux-kernel, linux-omap, linux-arm-kernel,
	Keerthy, Nishanth Menon, Vignesh Raghavendra,
	Krzysztof Kozlowski, Rob Herring, devicetree

* Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:01]:
> On 07/04/2022 09:10, Tony Lindgren wrote:
> > @@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
> >    * The below are inlined to optimize code size for system timers. Other code
> >    * should not need these at all.
> >    */
> > -#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
> > +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
> > +	defined(CONFIG_ARCH_K3)
> 
> Why not replace the above by CONFIG_OMAP_DM_TIMER ?

Hmm that's a good question for why it was not that way earlier.

This series changes things for tristate "OMAP dual-mode timer driver" if
ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for
COMPILE_TEST it seems.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
  2022-04-07  8:15       ` Tony Lindgren
@ 2022-04-07  8:26         ` Daniel Lezcano
  -1 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2022-04-07  8:26 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Thomas Gleixner, linux-kernel, linux-omap, linux-arm-kernel,
	Keerthy, Nishanth Menon, Vignesh Raghavendra,
	Krzysztof Kozlowski, Rob Herring, devicetree

On 07/04/2022 10:15, Tony Lindgren wrote:
> * Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:01]:
>> On 07/04/2022 09:10, Tony Lindgren wrote:
>>> @@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
>>>     * The below are inlined to optimize code size for system timers. Other code
>>>     * should not need these at all.
>>>     */
>>> -#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
>>> +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
>>> +	defined(CONFIG_ARCH_K3)
>>
>> Why not replace the above by CONFIG_OMAP_DM_TIMER ?
> 
> Hmm that's a good question for why it was not that way earlier.
> 
> This series changes things for tristate "OMAP dual-mode timer driver" if
> ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for
> COMPILE_TEST it seems.

But if ARCH_K3 or COMPILE_TEST is set, CONFIG_DM_TIMER is also set, no?


-- 
<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] 34+ messages in thread

* Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
@ 2022-04-07  8:26         ` Daniel Lezcano
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2022-04-07  8:26 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Thomas Gleixner, linux-kernel, linux-omap, linux-arm-kernel,
	Keerthy, Nishanth Menon, Vignesh Raghavendra,
	Krzysztof Kozlowski, Rob Herring, devicetree

On 07/04/2022 10:15, Tony Lindgren wrote:
> * Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:01]:
>> On 07/04/2022 09:10, Tony Lindgren wrote:
>>> @@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
>>>     * The below are inlined to optimize code size for system timers. Other code
>>>     * should not need these at all.
>>>     */
>>> -#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
>>> +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
>>> +	defined(CONFIG_ARCH_K3)
>>
>> Why not replace the above by CONFIG_OMAP_DM_TIMER ?
> 
> Hmm that's a good question for why it was not that way earlier.
> 
> This series changes things for tristate "OMAP dual-mode timer driver" if
> ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for
> COMPILE_TEST it seems.

But if ARCH_K3 or COMPILE_TEST is set, CONFIG_DM_TIMER is also set, no?


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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
  2022-04-07  8:26         ` Daniel Lezcano
@ 2022-04-07  8:53           ` Tony Lindgren
  -1 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07  8:53 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Thomas Gleixner, linux-kernel, linux-omap, linux-arm-kernel,
	Keerthy, Nishanth Menon, Vignesh Raghavendra,
	Krzysztof Kozlowski, Rob Herring, devicetree

* Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:23]:
> On 07/04/2022 10:15, Tony Lindgren wrote:
> > * Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:01]:
> > > On 07/04/2022 09:10, Tony Lindgren wrote:
> > > > @@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
> > > >     * The below are inlined to optimize code size for system timers. Other code
> > > >     * should not need these at all.
> > > >     */
> > > > -#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
> > > > +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
> > > > +	defined(CONFIG_ARCH_K3)
> > > 
> > > Why not replace the above by CONFIG_OMAP_DM_TIMER ?
> > 
> > Hmm that's a good question for why it was not that way earlier.
> > 
> > This series changes things for tristate "OMAP dual-mode timer driver" if
> > ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for
> > COMPILE_TEST it seems.
> 
> But if ARCH_K3 or COMPILE_TEST is set, CONFIG_DM_TIMER is also set, no?

Right but I suspect that COMPILE_TEST will produce a build error on other
architectures. I need to check that though, maybe that is no longer the
case.

Regards,

Tony

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

* Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
@ 2022-04-07  8:53           ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07  8:53 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Thomas Gleixner, linux-kernel, linux-omap, linux-arm-kernel,
	Keerthy, Nishanth Menon, Vignesh Raghavendra,
	Krzysztof Kozlowski, Rob Herring, devicetree

* Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:23]:
> On 07/04/2022 10:15, Tony Lindgren wrote:
> > * Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:01]:
> > > On 07/04/2022 09:10, Tony Lindgren wrote:
> > > > @@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
> > > >     * The below are inlined to optimize code size for system timers. Other code
> > > >     * should not need these at all.
> > > >     */
> > > > -#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
> > > > +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
> > > > +	defined(CONFIG_ARCH_K3)
> > > 
> > > Why not replace the above by CONFIG_OMAP_DM_TIMER ?
> > 
> > Hmm that's a good question for why it was not that way earlier.
> > 
> > This series changes things for tristate "OMAP dual-mode timer driver" if
> > ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for
> > COMPILE_TEST it seems.
> 
> But if ARCH_K3 or COMPILE_TEST is set, CONFIG_DM_TIMER is also set, no?

Right but I suspect that COMPILE_TEST will produce a build error on other
architectures. I need to check that though, maybe that is no longer the
case.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
  2022-04-07  8:53           ` Tony Lindgren
@ 2022-04-07 10:26             ` Tony Lindgren
  -1 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07 10:26 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Thomas Gleixner, linux-kernel, linux-omap, linux-arm-kernel,
	Keerthy, Nishanth Menon, Vignesh Raghavendra,
	Krzysztof Kozlowski, Rob Herring, devicetree

* Tony Lindgren <tony@atomide.com> [220407 08:50]:
> * Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:23]:
> > On 07/04/2022 10:15, Tony Lindgren wrote:
> > > * Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:01]:
> > > > On 07/04/2022 09:10, Tony Lindgren wrote:
> > > > > @@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
> > > > >     * The below are inlined to optimize code size for system timers. Other code
> > > > >     * should not need these at all.
> > > > >     */
> > > > > -#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
> > > > > +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
> > > > > +	defined(CONFIG_ARCH_K3)
> > > > 
> > > > Why not replace the above by CONFIG_OMAP_DM_TIMER ?
> > > 
> > > Hmm that's a good question for why it was not that way earlier.
> > > 
> > > This series changes things for tristate "OMAP dual-mode timer driver" if
> > > ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for
> > > COMPILE_TEST it seems.
> > 
> > But if ARCH_K3 or COMPILE_TEST is set, CONFIG_DM_TIMER is also set, no?
> 
> Right but I suspect that COMPILE_TEST will produce a build error on other
> architectures. I need to check that though, maybe that is no longer the
> case.

We could use IS_ENABLED(CONFIG_OMAP_DM_TIMER), but looks like we can now
just move the __omap_dm_timer_* inline functions to timer-ti-dm.c instead.

I'll do that and repost after some testing.

Regards,

Tony

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

* Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
@ 2022-04-07 10:26             ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-07 10:26 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Thomas Gleixner, linux-kernel, linux-omap, linux-arm-kernel,
	Keerthy, Nishanth Menon, Vignesh Raghavendra,
	Krzysztof Kozlowski, Rob Herring, devicetree

* Tony Lindgren <tony@atomide.com> [220407 08:50]:
> * Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:23]:
> > On 07/04/2022 10:15, Tony Lindgren wrote:
> > > * Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:01]:
> > > > On 07/04/2022 09:10, Tony Lindgren wrote:
> > > > > @@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
> > > > >     * The below are inlined to optimize code size for system timers. Other code
> > > > >     * should not need these at all.
> > > > >     */
> > > > > -#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
> > > > > +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
> > > > > +	defined(CONFIG_ARCH_K3)
> > > > 
> > > > Why not replace the above by CONFIG_OMAP_DM_TIMER ?
> > > 
> > > Hmm that's a good question for why it was not that way earlier.
> > > 
> > > This series changes things for tristate "OMAP dual-mode timer driver" if
> > > ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for
> > > COMPILE_TEST it seems.
> > 
> > But if ARCH_K3 or COMPILE_TEST is set, CONFIG_DM_TIMER is also set, no?
> 
> Right but I suspect that COMPILE_TEST will produce a build error on other
> architectures. I need to check that though, maybe that is no longer the
> case.

We could use IS_ENABLED(CONFIG_OMAP_DM_TIMER), but looks like we can now
just move the __omap_dm_timer_* inline functions to timer-ti-dm.c instead.

I'll do that and repost after some testing.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
  2022-04-07 10:26             ` Tony Lindgren
@ 2022-04-07 11:48               ` Daniel Lezcano
  -1 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2022-04-07 11:48 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Thomas Gleixner, linux-kernel, linux-omap, linux-arm-kernel,
	Keerthy, Nishanth Menon, Vignesh Raghavendra,
	Krzysztof Kozlowski, Rob Herring, devicetree

On 07/04/2022 12:26, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [220407 08:50]:
>> * Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:23]:
>>> On 07/04/2022 10:15, Tony Lindgren wrote:
>>>> * Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:01]:
>>>>> On 07/04/2022 09:10, Tony Lindgren wrote:
>>>>>> @@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
>>>>>>      * The below are inlined to optimize code size for system timers. Other code
>>>>>>      * should not need these at all.
>>>>>>      */
>>>>>> -#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
>>>>>> +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
>>>>>> +	defined(CONFIG_ARCH_K3)
>>>>>
>>>>> Why not replace the above by CONFIG_OMAP_DM_TIMER ?
>>>>
>>>> Hmm that's a good question for why it was not that way earlier.
>>>>
>>>> This series changes things for tristate "OMAP dual-mode timer driver" if
>>>> ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for
>>>> COMPILE_TEST it seems.
>>>
>>> But if ARCH_K3 or COMPILE_TEST is set, CONFIG_DM_TIMER is also set, no?
>>
>> Right but I suspect that COMPILE_TEST will produce a build error on other
>> architectures. I need to check that though, maybe that is no longer the
>> case.
> 
> We could use IS_ENABLED(CONFIG_OMAP_DM_TIMER), but looks like we can now
> just move the __omap_dm_timer_* inline functions to timer-ti-dm.c instead.
> 
> I'll do that and repost after some testing.

Even better :)


-- 
<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] 34+ messages in thread

* Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions
@ 2022-04-07 11:48               ` Daniel Lezcano
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2022-04-07 11:48 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Thomas Gleixner, linux-kernel, linux-omap, linux-arm-kernel,
	Keerthy, Nishanth Menon, Vignesh Raghavendra,
	Krzysztof Kozlowski, Rob Herring, devicetree

On 07/04/2022 12:26, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [220407 08:50]:
>> * Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:23]:
>>> On 07/04/2022 10:15, Tony Lindgren wrote:
>>>> * Daniel Lezcano <daniel.lezcano@linaro.org> [220407 08:01]:
>>>>> On 07/04/2022 09:10, Tony Lindgren wrote:
>>>>>> @@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
>>>>>>      * The below are inlined to optimize code size for system timers. Other code
>>>>>>      * should not need these at all.
>>>>>>      */
>>>>>> -#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
>>>>>> +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
>>>>>> +	defined(CONFIG_ARCH_K3)
>>>>>
>>>>> Why not replace the above by CONFIG_OMAP_DM_TIMER ?
>>>>
>>>> Hmm that's a good question for why it was not that way earlier.
>>>>
>>>> This series changes things for tristate "OMAP dual-mode timer driver" if
>>>> ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for
>>>> COMPILE_TEST it seems.
>>>
>>> But if ARCH_K3 or COMPILE_TEST is set, CONFIG_DM_TIMER is also set, no?
>>
>> Right but I suspect that COMPILE_TEST will produce a build error on other
>> architectures. I need to check that though, maybe that is no longer the
>> case.
> 
> We could use IS_ENABLED(CONFIG_OMAP_DM_TIMER), but looks like we can now
> just move the __omap_dm_timer_* inline functions to timer-ti-dm.c instead.
> 
> I'll do that and repost after some testing.

Even better :)


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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
  2022-04-07  7:10 ` Tony Lindgren
@ 2022-04-07 13:31   ` Nishanth Menon
  -1 siblings, 0 replies; 34+ messages in thread
From: Nishanth Menon @ 2022-04-07 13:31 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, linux-omap,
	linux-arm-kernel, devicetree, Keerthy, Krzysztof Kozlowski,
	Rob Herring, Vignesh Raghavendra

On 10:10-20220407, Tony Lindgren wrote:
> Document the dual-mode timers available on am6.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Keerthy <j-keerthy@ti.com>
> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Vignesh Raghavendra <vigneshr@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> @@ -14,6 +14,7 @@ Required properties:
>  			ti,omap5430-timer (applicable to OMAP543x devices)
>  			ti,am335x-timer	(applicable to AM335x devices)
>  			ti,am335x-timer-1ms (applicable to AM335x devices)
> +			ti,am6-timer (applicable to AM6 devices)
>  
>  - reg:			Contains timer register address range (base address and
>  			length).
> -- 
> 2.35.1


We need to convert this into yaml prior to the dts updates patches :(


-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
@ 2022-04-07 13:31   ` Nishanth Menon
  0 siblings, 0 replies; 34+ messages in thread
From: Nishanth Menon @ 2022-04-07 13:31 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, linux-omap,
	linux-arm-kernel, devicetree, Keerthy, Krzysztof Kozlowski,
	Rob Herring, Vignesh Raghavendra

On 10:10-20220407, Tony Lindgren wrote:
> Document the dual-mode timers available on am6.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Keerthy <j-keerthy@ti.com>
> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Vignesh Raghavendra <vigneshr@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> @@ -14,6 +14,7 @@ Required properties:
>  			ti,omap5430-timer (applicable to OMAP543x devices)
>  			ti,am335x-timer	(applicable to AM335x devices)
>  			ti,am335x-timer-1ms (applicable to AM335x devices)
> +			ti,am6-timer (applicable to AM6 devices)
>  
>  - reg:			Contains timer register address range (base address and
>  			length).
> -- 
> 2.35.1


We need to convert this into yaml prior to the dts updates patches :(


-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
  2022-04-07  7:10 ` Tony Lindgren
@ 2022-04-07 13:33   ` Nishanth Menon
  -1 siblings, 0 replies; 34+ messages in thread
From: Nishanth Menon @ 2022-04-07 13:33 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, linux-omap,
	linux-arm-kernel, devicetree, Keerthy, Krzysztof Kozlowski,
	Rob Herring, Vignesh Raghavendra

On 10:10-20220407, Tony Lindgren wrote:
> Document the dual-mode timers available on am6.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Keerthy <j-keerthy@ti.com>
> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Vignesh Raghavendra <vigneshr@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> @@ -14,6 +14,7 @@ Required properties:
>  			ti,omap5430-timer (applicable to OMAP543x devices)
>  			ti,am335x-timer	(applicable to AM335x devices)
>  			ti,am335x-timer-1ms (applicable to AM335x devices)
> +			ti,am6-timer (applicable to AM6 devices)

Suggestion:

Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans
a couple of sub SoC architectures.

>  
>  - reg:			Contains timer register address range (base address and
>  			length).
> -- 
> 2.35.1

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
@ 2022-04-07 13:33   ` Nishanth Menon
  0 siblings, 0 replies; 34+ messages in thread
From: Nishanth Menon @ 2022-04-07 13:33 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, linux-omap,
	linux-arm-kernel, devicetree, Keerthy, Krzysztof Kozlowski,
	Rob Herring, Vignesh Raghavendra

On 10:10-20220407, Tony Lindgren wrote:
> Document the dual-mode timers available on am6.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Keerthy <j-keerthy@ti.com>
> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Vignesh Raghavendra <vigneshr@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> @@ -14,6 +14,7 @@ Required properties:
>  			ti,omap5430-timer (applicable to OMAP543x devices)
>  			ti,am335x-timer	(applicable to AM335x devices)
>  			ti,am335x-timer-1ms (applicable to AM335x devices)
> +			ti,am6-timer (applicable to AM6 devices)

Suggestion:

Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans
a couple of sub SoC architectures.

>  
>  - reg:			Contains timer register address range (base address and
>  			length).
> -- 
> 2.35.1

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
  2022-04-07 13:31   ` Nishanth Menon
@ 2022-04-08  4:28     ` Tony Lindgren
  -1 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-08  4:28 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, linux-omap,
	linux-arm-kernel, devicetree, Keerthy, Krzysztof Kozlowski,
	Rob Herring, Vignesh Raghavendra

* Nishanth Menon <nm@ti.com> [220407 13:28]:
> On 10:10-20220407, Tony Lindgren wrote:
> > Document the dual-mode timers available on am6.
> > 
> > Cc: devicetree@vger.kernel.org
> > Cc: Keerthy <j-keerthy@ti.com>
> > Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> > Cc: Nishanth Menon <nm@ti.com>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: Vignesh Raghavendra <vigneshr@ti.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> >  Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> > +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > @@ -14,6 +14,7 @@ Required properties:
> >  			ti,omap5430-timer (applicable to OMAP543x devices)
> >  			ti,am335x-timer	(applicable to AM335x devices)
> >  			ti,am335x-timer-1ms (applicable to AM335x devices)
> > +			ti,am6-timer (applicable to AM6 devices)
> >  
> >  - reg:			Contains timer register address range (base address and
> >  			length).
> > -- 
> > 2.35.1
> 
> 
> We need to convert this into yaml prior to the dts updates patches :(

OK I'll convert to yaml and send the binding patch separately.

Regards,

Tony

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
@ 2022-04-08  4:28     ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-08  4:28 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, linux-omap,
	linux-arm-kernel, devicetree, Keerthy, Krzysztof Kozlowski,
	Rob Herring, Vignesh Raghavendra

* Nishanth Menon <nm@ti.com> [220407 13:28]:
> On 10:10-20220407, Tony Lindgren wrote:
> > Document the dual-mode timers available on am6.
> > 
> > Cc: devicetree@vger.kernel.org
> > Cc: Keerthy <j-keerthy@ti.com>
> > Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> > Cc: Nishanth Menon <nm@ti.com>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: Vignesh Raghavendra <vigneshr@ti.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> >  Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> > +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > @@ -14,6 +14,7 @@ Required properties:
> >  			ti,omap5430-timer (applicable to OMAP543x devices)
> >  			ti,am335x-timer	(applicable to AM335x devices)
> >  			ti,am335x-timer-1ms (applicable to AM335x devices)
> > +			ti,am6-timer (applicable to AM6 devices)
> >  
> >  - reg:			Contains timer register address range (base address and
> >  			length).
> > -- 
> > 2.35.1
> 
> 
> We need to convert this into yaml prior to the dts updates patches :(

OK I'll convert to yaml and send the binding patch separately.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
  2022-04-07 13:33   ` Nishanth Menon
@ 2022-04-08  4:38     ` Tony Lindgren
  -1 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-08  4:38 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, linux-omap,
	linux-arm-kernel, devicetree, Keerthy, Krzysztof Kozlowski,
	Rob Herring, Vignesh Raghavendra

Hi,

* Nishanth Menon <nm@ti.com> [220407 13:31]:
> On 10:10-20220407, Tony Lindgren wrote:
> > diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> > +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > @@ -14,6 +14,7 @@ Required properties:
> >  			ti,omap5430-timer (applicable to OMAP543x devices)
> >  			ti,am335x-timer	(applicable to AM335x devices)
> >  			ti,am335x-timer-1ms (applicable to AM335x devices)
> > +			ti,am6-timer (applicable to AM6 devices)
> 
> Suggestion:
> 
> Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans
> a couple of sub SoC architectures.

I think the timer hardware is the same across am64, am65 and j7. So we
should pick something to represent the am6 timers as it would allow using
shared dtsi files for the 16 - 30 timers there are.

Using shared timer dtsi files should work as long as the clocks are
defined in include/dt-bindings/clock for each SoC, and assuming we can use
the same compatible property for the timers.

Of course if the timers are really different across am64, am65 and j72
then multiple compatible properties are neeeded.

If the timer hardware is the same, then I guess we should just pick the
earliest version, so how about using ti,am64-timer?

Regards,

Tony

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
@ 2022-04-08  4:38     ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-08  4:38 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, linux-omap,
	linux-arm-kernel, devicetree, Keerthy, Krzysztof Kozlowski,
	Rob Herring, Vignesh Raghavendra

Hi,

* Nishanth Menon <nm@ti.com> [220407 13:31]:
> On 10:10-20220407, Tony Lindgren wrote:
> > diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> > +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > @@ -14,6 +14,7 @@ Required properties:
> >  			ti,omap5430-timer (applicable to OMAP543x devices)
> >  			ti,am335x-timer	(applicable to AM335x devices)
> >  			ti,am335x-timer-1ms (applicable to AM335x devices)
> > +			ti,am6-timer (applicable to AM6 devices)
> 
> Suggestion:
> 
> Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans
> a couple of sub SoC architectures.

I think the timer hardware is the same across am64, am65 and j7. So we
should pick something to represent the am6 timers as it would allow using
shared dtsi files for the 16 - 30 timers there are.

Using shared timer dtsi files should work as long as the clocks are
defined in include/dt-bindings/clock for each SoC, and assuming we can use
the same compatible property for the timers.

Of course if the timers are really different across am64, am65 and j72
then multiple compatible properties are neeeded.

If the timer hardware is the same, then I guess we should just pick the
earliest version, so how about using ti,am64-timer?

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
  2022-04-08  4:38     ` Tony Lindgren
@ 2022-04-08  7:34       ` Nishanth Menon
  -1 siblings, 0 replies; 34+ messages in thread
From: Nishanth Menon @ 2022-04-08  7:34 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, linux-omap,
	linux-arm-kernel, devicetree, Keerthy, Krzysztof Kozlowski,
	Rob Herring, Vignesh Raghavendra

On 07:38-20220408, Tony Lindgren wrote:
> Hi,
> 
> * Nishanth Menon <nm@ti.com> [220407 13:31]:
> > On 10:10-20220407, Tony Lindgren wrote:
> > > diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > @@ -14,6 +14,7 @@ Required properties:
> > >  			ti,omap5430-timer (applicable to OMAP543x devices)
> > >  			ti,am335x-timer	(applicable to AM335x devices)
> > >  			ti,am335x-timer-1ms (applicable to AM335x devices)
> > > +			ti,am6-timer (applicable to AM6 devices)
> > 
> > Suggestion:
> > 
> > Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans
> > a couple of sub SoC architectures.
> 
> I think the timer hardware is the same across am64, am65 and j7. So we
> should pick something to represent the am6 timers as it would allow using
> shared dtsi files for the 16 - 30 timers there are.
> 
> Using shared timer dtsi files should work as long as the clocks are
> defined in include/dt-bindings/clock for each SoC, and assuming we can use
> the same compatible property for the timers.

Compatible should work fine, Though I doubt clock and other indices
(base address etc will scale appropriately), but we could give it a
shot, but we can discuss that in the context of the dts patches.

> 
> Of course if the timers are really different across am64, am65 and j72
> then multiple compatible properties are neeeded.
> 
> If the timer hardware is the same, then I guess we should just pick the
> earliest version, so how about using ti,am64-timer?

yep - the oldest version will be ti,am654-timer ( AM65 was the first
K3 device. Unfortunately, the numbering does'nt follow a chronological
order)

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
@ 2022-04-08  7:34       ` Nishanth Menon
  0 siblings, 0 replies; 34+ messages in thread
From: Nishanth Menon @ 2022-04-08  7:34 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, linux-omap,
	linux-arm-kernel, devicetree, Keerthy, Krzysztof Kozlowski,
	Rob Herring, Vignesh Raghavendra

On 07:38-20220408, Tony Lindgren wrote:
> Hi,
> 
> * Nishanth Menon <nm@ti.com> [220407 13:31]:
> > On 10:10-20220407, Tony Lindgren wrote:
> > > diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > @@ -14,6 +14,7 @@ Required properties:
> > >  			ti,omap5430-timer (applicable to OMAP543x devices)
> > >  			ti,am335x-timer	(applicable to AM335x devices)
> > >  			ti,am335x-timer-1ms (applicable to AM335x devices)
> > > +			ti,am6-timer (applicable to AM6 devices)
> > 
> > Suggestion:
> > 
> > Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans
> > a couple of sub SoC architectures.
> 
> I think the timer hardware is the same across am64, am65 and j7. So we
> should pick something to represent the am6 timers as it would allow using
> shared dtsi files for the 16 - 30 timers there are.
> 
> Using shared timer dtsi files should work as long as the clocks are
> defined in include/dt-bindings/clock for each SoC, and assuming we can use
> the same compatible property for the timers.

Compatible should work fine, Though I doubt clock and other indices
(base address etc will scale appropriately), but we could give it a
shot, but we can discuss that in the context of the dts patches.

> 
> Of course if the timers are really different across am64, am65 and j72
> then multiple compatible properties are neeeded.
> 
> If the timer hardware is the same, then I guess we should just pick the
> earliest version, so how about using ti,am64-timer?

yep - the oldest version will be ti,am654-timer ( AM65 was the first
K3 device. Unfortunately, the numbering does'nt follow a chronological
order)

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
  2022-04-08  7:34       ` Nishanth Menon
@ 2022-04-08  7:43         ` Tony Lindgren
  -1 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-08  7:43 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, linux-omap,
	linux-arm-kernel, devicetree, Keerthy, Krzysztof Kozlowski,
	Rob Herring, Vignesh Raghavendra

* Nishanth Menon <nm@ti.com> [220408 07:31]:
> On 07:38-20220408, Tony Lindgren wrote:
> > Hi,
> > 
> > * Nishanth Menon <nm@ti.com> [220407 13:31]:
> > > On 10:10-20220407, Tony Lindgren wrote:
> > > > diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > > --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > > +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > > @@ -14,6 +14,7 @@ Required properties:
> > > >  			ti,omap5430-timer (applicable to OMAP543x devices)
> > > >  			ti,am335x-timer	(applicable to AM335x devices)
> > > >  			ti,am335x-timer-1ms (applicable to AM335x devices)
> > > > +			ti,am6-timer (applicable to AM6 devices)
> > > 
> > > Suggestion:
> > > 
> > > Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans
> > > a couple of sub SoC architectures.
> > 
> > I think the timer hardware is the same across am64, am65 and j7. So we
> > should pick something to represent the am6 timers as it would allow using
> > shared dtsi files for the 16 - 30 timers there are.
> > 
> > Using shared timer dtsi files should work as long as the clocks are
> > defined in include/dt-bindings/clock for each SoC, and assuming we can use
> > the same compatible property for the timers.
> 
> Compatible should work fine, Though I doubt clock and other indices
> (base address etc will scale appropriately), but we could give it a
> shot, but we can discuss that in the context of the dts patches.

Yeah that's a separate series for sure and can be done later on after we
have am6 timers working first.

> > Of course if the timers are really different across am64, am65 and j72
> > then multiple compatible properties are neeeded.
> > 
> > If the timer hardware is the same, then I guess we should just pick the
> > earliest version, so how about using ti,am64-timer?
> 
> yep - the oldest version will be ti,am654-timer ( AM65 was the first
> K3 device. Unfortunately, the numbering does'nt follow a chronological
> order)

OK great, I will use ti,am654-timer then.

Regards,

Tony

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

* Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer
@ 2022-04-08  7:43         ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2022-04-08  7:43 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, linux-omap,
	linux-arm-kernel, devicetree, Keerthy, Krzysztof Kozlowski,
	Rob Herring, Vignesh Raghavendra

* Nishanth Menon <nm@ti.com> [220408 07:31]:
> On 07:38-20220408, Tony Lindgren wrote:
> > Hi,
> > 
> > * Nishanth Menon <nm@ti.com> [220407 13:31]:
> > > On 10:10-20220407, Tony Lindgren wrote:
> > > > diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > > --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > > +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > > @@ -14,6 +14,7 @@ Required properties:
> > > >  			ti,omap5430-timer (applicable to OMAP543x devices)
> > > >  			ti,am335x-timer	(applicable to AM335x devices)
> > > >  			ti,am335x-timer-1ms (applicable to AM335x devices)
> > > > +			ti,am6-timer (applicable to AM6 devices)
> > > 
> > > Suggestion:
> > > 
> > > Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans
> > > a couple of sub SoC architectures.
> > 
> > I think the timer hardware is the same across am64, am65 and j7. So we
> > should pick something to represent the am6 timers as it would allow using
> > shared dtsi files for the 16 - 30 timers there are.
> > 
> > Using shared timer dtsi files should work as long as the clocks are
> > defined in include/dt-bindings/clock for each SoC, and assuming we can use
> > the same compatible property for the timers.
> 
> Compatible should work fine, Though I doubt clock and other indices
> (base address etc will scale appropriately), but we could give it a
> shot, but we can discuss that in the context of the dts patches.

Yeah that's a separate series for sure and can be done later on after we
have am6 timers working first.

> > Of course if the timers are really different across am64, am65 and j72
> > then multiple compatible properties are neeeded.
> > 
> > If the timer hardware is the same, then I guess we should just pick the
> > earliest version, so how about using ti,am64-timer?
> 
> yep - the oldest version will be ti,am654-timer ( AM65 was the first
> K3 device. Unfortunately, the numbering does'nt follow a chronological
> order)

OK great, I will use ti,am654-timer then.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-04-08  7:44 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07  7:10 [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer Tony Lindgren
2022-04-07  7:10 ` Tony Lindgren
2022-04-07  7:10 ` [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions Tony Lindgren
2022-04-07  7:10   ` Tony Lindgren
2022-04-07  8:04   ` Daniel Lezcano
2022-04-07  8:04     ` Daniel Lezcano
2022-04-07  8:15     ` Tony Lindgren
2022-04-07  8:15       ` Tony Lindgren
2022-04-07  8:26       ` Daniel Lezcano
2022-04-07  8:26         ` Daniel Lezcano
2022-04-07  8:53         ` Tony Lindgren
2022-04-07  8:53           ` Tony Lindgren
2022-04-07 10:26           ` Tony Lindgren
2022-04-07 10:26             ` Tony Lindgren
2022-04-07 11:48             ` Daniel Lezcano
2022-04-07 11:48               ` Daniel Lezcano
2022-04-07  7:10 ` [PATCH 3/4] clocksource/drivers/timer-ti-dm: Add compatible for am6 Tony Lindgren
2022-04-07  7:10   ` Tony Lindgren
2022-04-07  7:10 ` [PATCH 4/4] clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3 Tony Lindgren
2022-04-07  7:10   ` Tony Lindgren
2022-04-07  7:56 ` [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer Krzysztof Kozlowski
2022-04-07  7:56   ` Krzysztof Kozlowski
2022-04-07 13:31 ` Nishanth Menon
2022-04-07 13:31   ` Nishanth Menon
2022-04-08  4:28   ` Tony Lindgren
2022-04-08  4:28     ` Tony Lindgren
2022-04-07 13:33 ` Nishanth Menon
2022-04-07 13:33   ` Nishanth Menon
2022-04-08  4:38   ` Tony Lindgren
2022-04-08  4:38     ` Tony Lindgren
2022-04-08  7:34     ` Nishanth Menon
2022-04-08  7:34       ` Nishanth Menon
2022-04-08  7:43       ` Tony Lindgren
2022-04-08  7:43         ` Tony Lindgren

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.