All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits
@ 2013-12-11 23:56 ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-12-11 23:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: khilman, arnd, linux-sh, daniel.lezcano, horms, john.stultz,
	olof, Magnus Damm, tglx

clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits (v4)

[PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
[PATCH v4 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries
[PATCH v2 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2

This is V4 of the SH and ARM mach-shmobile clocksource Kconfig
consolidation series.

By sharing Kconfig entires in drivers/clocksource/Kconfig we
can get rid of duplicated bits that do not belong under arch/.

With this series applied it is possible to build the timer
drivers for CMT, MTU2, TMU and STI in case of SH or ARM. The timer
drivers are automatically selected by default. It is also possible
to select and/or deselect freely when COMPILE_TEST has been selected.

Many thanks to John, Daniel and Arnd for feedback!

Changes since V3:
 - Updated patch 1/3 with more detailed help texts
 - Updated patch 2/3 to fit latest renesas-devel tag, see below
 - Included acks from John Stultz for patch 2/3 and 3/3

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 Written against renesas.git tag renesas-devel-v3.13-rc2-20131211

 arch/arm/mach-shmobile/Kconfig |   35 +++++++++++++++----------------
 arch/sh/Kconfig                |   21 -------------------
 drivers/clocksource/Kconfig    |   44 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 39 deletions(-)


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

* [PATCH v4 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits
@ 2013-12-11 23:56 ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-12-11 23:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: khilman, arnd, linux-sh, daniel.lezcano, horms, john.stultz,
	olof, Magnus Damm, tglx

clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits (v4)

[PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
[PATCH v4 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries
[PATCH v2 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2

This is V4 of the SH and ARM mach-shmobile clocksource Kconfig
consolidation series.

By sharing Kconfig entires in drivers/clocksource/Kconfig we
can get rid of duplicated bits that do not belong under arch/.

With this series applied it is possible to build the timer
drivers for CMT, MTU2, TMU and STI in case of SH or ARM. The timer
drivers are automatically selected by default. It is also possible
to select and/or deselect freely when COMPILE_TEST has been selected.

Many thanks to John, Daniel and Arnd for feedback!

Changes since V3:
 - Updated patch 1/3 with more detailed help texts
 - Updated patch 2/3 to fit latest renesas-devel tag, see below
 - Included acks from John Stultz for patch 2/3 and 3/3

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 Written against renesas.git tag renesas-devel-v3.13-rc2-20131211

 arch/arm/mach-shmobile/Kconfig |   35 +++++++++++++++----------------
 arch/sh/Kconfig                |   21 -------------------
 drivers/clocksource/Kconfig    |   44 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 39 deletions(-)


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

* [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
  2013-12-11 23:56 ` Magnus Damm
@ 2013-12-11 23:56   ` Magnus Damm
  -1 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-12-11 23:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: khilman, arnd, linux-sh, daniel.lezcano, horms, john.stultz,
	olof, Magnus Damm, tglx

From: Magnus Damm <damm@opensource.se>

Add Kconfig entries for CMT, MTU2, TMU and STI to
drivers/clocksource/Kconfig. This will allow us to
get rid of duplicated entires in architecture code
such as arch/sh and arch/arm/mach-shmobile.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 drivers/clocksource/Kconfig |   44 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

--- 0001/drivers/clocksource/Kconfig
+++ work/drivers/clocksource/Kconfig	2013-12-12 08:41:55.000000000 +0900
@@ -134,3 +134,47 @@ config VF_PIT_TIMER
 	bool
 	help
 	  Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
+
+config SYS_SUPPORTS_CMT
+        bool
+
+config SYS_SUPPORTS_TMU
+        bool
+
+config SYS_SUPPORTS_MTU2
+        bool
+
+config SYS_SUPPORTS_STI
+        bool
+
+config SH_TIMER_CMT
+	bool "Renesas CMT timer driver" if COMPILE_TEST
+	default SYS_SUPPORTS_CMT
+	help
+	  This enables build of a clocksource and clockevent driver for
+	  the Compare Match Timer (CMT) hardware available in 16/32/48 bit
+	  variants on a wide range of Mobile and Automotive SoCs from Renesas.
+
+config SH_TIMER_MTU2
+	bool "Renesas MTU2 timer driver" if COMPILE_TEST
+	default SYS_SUPPORTS_MTU2
+	help
+	  This enables build of a clockevent driver for the Multi-Function
+	  Timer Pulse Unit 2 (TMU2) hardware available on SoCs from Renesas.
+	  This hardware comes with 16 bit timer registers.
+
+config SH_TIMER_TMU
+	bool "Renesas TMU timer driver" if COMPILE_TEST
+	default SYS_SUPPORTS_TMU
+	help
+	  This enables build of a clocksource and clockevent driver for
+	  the 32-bit Timer Unit (TMU) hardware available on a wide range
+	  SoCs from Renesas.
+
+config EM_TIMER_STI
+	bool "Renesas STI timer driver" if COMPILE_TEST
+	default SYS_SUPPORTS_STI
+	help
+	  This enables build of a clocksource and clockevent driver for
+	  the 48-bit System Timer (STI) hardware available on a SoCs
+	  such as EMEV2 from former NEC Electronics.

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

* [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
@ 2013-12-11 23:56   ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-12-11 23:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: khilman, arnd, linux-sh, daniel.lezcano, horms, john.stultz,
	olof, Magnus Damm, tglx

From: Magnus Damm <damm@opensource.se>

Add Kconfig entries for CMT, MTU2, TMU and STI to
drivers/clocksource/Kconfig. This will allow us to
get rid of duplicated entires in architecture code
such as arch/sh and arch/arm/mach-shmobile.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 drivers/clocksource/Kconfig |   44 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

--- 0001/drivers/clocksource/Kconfig
+++ work/drivers/clocksource/Kconfig	2013-12-12 08:41:55.000000000 +0900
@@ -134,3 +134,47 @@ config VF_PIT_TIMER
 	bool
 	help
 	  Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
+
+config SYS_SUPPORTS_CMT
+        bool
+
+config SYS_SUPPORTS_TMU
+        bool
+
+config SYS_SUPPORTS_MTU2
+        bool
+
+config SYS_SUPPORTS_STI
+        bool
+
+config SH_TIMER_CMT
+	bool "Renesas CMT timer driver" if COMPILE_TEST
+	default SYS_SUPPORTS_CMT
+	help
+	  This enables build of a clocksource and clockevent driver for
+	  the Compare Match Timer (CMT) hardware available in 16/32/48 bit
+	  variants on a wide range of Mobile and Automotive SoCs from Renesas.
+
+config SH_TIMER_MTU2
+	bool "Renesas MTU2 timer driver" if COMPILE_TEST
+	default SYS_SUPPORTS_MTU2
+	help
+	  This enables build of a clockevent driver for the Multi-Function
+	  Timer Pulse Unit 2 (TMU2) hardware available on SoCs from Renesas.
+	  This hardware comes with 16 bit timer registers.
+
+config SH_TIMER_TMU
+	bool "Renesas TMU timer driver" if COMPILE_TEST
+	default SYS_SUPPORTS_TMU
+	help
+	  This enables build of a clocksource and clockevent driver for
+	  the 32-bit Timer Unit (TMU) hardware available on a wide range
+	  SoCs from Renesas.
+
+config EM_TIMER_STI
+	bool "Renesas STI timer driver" if COMPILE_TEST
+	default SYS_SUPPORTS_STI
+	help
+	  This enables build of a clocksource and clockevent driver for
+	  the 48-bit System Timer (STI) hardware available on a SoCs
+	  such as EMEV2 from former NEC Electronics.

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

* [PATCH v4 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries
  2013-12-11 23:56 ` Magnus Damm
@ 2013-12-11 23:56   ` Magnus Damm
  -1 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-12-11 23:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: khilman, arnd, linux-sh, daniel.lezcano, horms, john.stultz,
	olof, Magnus Damm, tglx

From: Magnus Damm <damm@opensource.se>

Now when drivers/clocksource/Kconfig has been
updated with entires for CMT, TMU and STI
it is safe to remove these from mach-shmobile.

Also select timers per SoC via SYS_SUPPORTS_xxx.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: John Stultz <john.stultz@linaro.org>
---

 arch/arm/mach-shmobile/Kconfig |   35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

--- 0001/arch/arm/mach-shmobile/Kconfig
+++ work/arch/arm/mach-shmobile/Kconfig	2013-12-12 08:23:52.000000000 +0900
@@ -23,13 +23,16 @@ comment "Renesas ARM SoCs System Type"
 
 config ARCH_EMEV2
 	bool "Emma Mobile EV2"
+	select SYS_SUPPORTS_STI
 
 config ARCH_R7S72100
 	bool "RZ/A1H (R7S72100)"
+	select SYS_SUPPORTS_MTU2
 
 config ARCH_R8A7791
 	bool "R-Car M2 (R8A77910)"
 	select RENESAS_IRQC
+	select SYS_SUPPORTS_CMT
 
 comment "Renesas ARM SoCs Board Type"
 
@@ -59,6 +62,8 @@ config ARCH_SH7372
 	select ARM_CPU_SUSPEND if PM || CPU_IDLE
 	select CPU_V7
 	select SH_CLK_CPG
+	select SYS_SUPPORTS_CMT
+	select SYS_SUPPORTS_TMU
 
 config ARCH_SH73A0
 	bool "SH-Mobile AG5 (R8A73A00)"
@@ -68,6 +73,8 @@ config ARCH_SH73A0
 	select I2C
 	select SH_CLK_CPG
 	select RENESAS_INTC_IRQPIN
+	select SYS_SUPPORTS_CMT
+	select SYS_SUPPORTS_TMU
 
 config ARCH_R8A73A4
 	bool "R-Mobile APE6 (R8A73A40)"
@@ -78,6 +85,8 @@ config ARCH_R8A73A4
 	select RENESAS_IRQC
 	select ARCH_HAS_CPUFREQ
 	select ARCH_HAS_OPP
+	select SYS_SUPPORTS_CMT
+	select SYS_SUPPORTS_TMU
 
 config ARCH_R8A7740
 	bool "R-Mobile A1 (R8A77400)"
@@ -86,6 +95,8 @@ config ARCH_R8A7740
 	select CPU_V7
 	select SH_CLK_CPG
 	select RENESAS_INTC_IRQPIN
+	select SYS_SUPPORTS_CMT
+	select SYS_SUPPORTS_TMU
 
 config ARCH_R8A7778
 	bool "R-Car M1A (R8A77781)"
@@ -95,6 +106,7 @@ config ARCH_R8A7778
 	select ARM_GIC
 	select USB_ARCH_HAS_EHCI
 	select USB_ARCH_HAS_OHCI
+	select SYS_SUPPORTS_TMU
 
 config ARCH_R8A7779
 	bool "R-Car H1 (R8A77790)"
@@ -105,6 +117,7 @@ config ARCH_R8A7779
 	select USB_ARCH_HAS_EHCI
 	select USB_ARCH_HAS_OHCI
 	select RENESAS_INTC_IRQPIN
+	select SYS_SUPPORTS_TMU
 
 config ARCH_R8A7790
 	bool "R-Car H2 (R8A77900)"
@@ -113,6 +126,7 @@ config ARCH_R8A7790
 	select CPU_V7
 	select SH_CLK_CPG
 	select RENESAS_IRQC
+	select SYS_SUPPORTS_CMT
 
 config ARCH_R8A7791
 	bool "R-Car M2 (R8A77910)"
@@ -121,6 +135,7 @@ config ARCH_R8A7791
 	select CPU_V7
 	select SH_CLK_CPG
 	select RENESAS_IRQC
+	select SYS_SUPPORTS_CMT
 
 config ARCH_EMEV2
 	bool "Emma Mobile EV2"
@@ -129,6 +144,7 @@ config ARCH_EMEV2
 	select CPU_V7
 	select USE_OF
 	select AUTO_ZRELADDR
+	select SYS_SUPPORTS_STI
 
 config ARCH_R7S72100
 	bool "RZ/A1H (R7S72100)"
@@ -136,6 +152,7 @@ config ARCH_R7S72100
 	select ARM_GIC
 	select CPU_V7
 	select SH_CLK_CPG
+	select SYS_SUPPORTS_MTU2
 
 comment "Renesas ARM SoCs Board Type"
 
@@ -330,24 +347,6 @@ config SHMOBILE_TIMER_HZ
 	  want to select a HZ value such as 128 that can evenly divide RCLK.
 	  A HZ value that does not divide evenly may cause timer drift.
 
-config SH_TIMER_CMT
-	bool "CMT timer driver"
-	default y
-	help
-	  This enables build of the CMT timer driver.
-
-config SH_TIMER_TMU
-	bool "TMU timer driver"
-	default y
-	help
-	  This enables build of the TMU timer driver.
-
-config EM_TIMER_STI
-	bool "STI timer driver"
-	default y
-	help
-	  This enables build of the STI timer driver.
-
 endmenu
 
 endif

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

* [PATCH v4 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries
@ 2013-12-11 23:56   ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-12-11 23:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: khilman, arnd, linux-sh, daniel.lezcano, horms, john.stultz,
	olof, Magnus Damm, tglx

From: Magnus Damm <damm@opensource.se>

Now when drivers/clocksource/Kconfig has been
updated with entires for CMT, TMU and STI
it is safe to remove these from mach-shmobile.

Also select timers per SoC via SYS_SUPPORTS_xxx.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: John Stultz <john.stultz@linaro.org>
---

 arch/arm/mach-shmobile/Kconfig |   35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

--- 0001/arch/arm/mach-shmobile/Kconfig
+++ work/arch/arm/mach-shmobile/Kconfig	2013-12-12 08:23:52.000000000 +0900
@@ -23,13 +23,16 @@ comment "Renesas ARM SoCs System Type"
 
 config ARCH_EMEV2
 	bool "Emma Mobile EV2"
+	select SYS_SUPPORTS_STI
 
 config ARCH_R7S72100
 	bool "RZ/A1H (R7S72100)"
+	select SYS_SUPPORTS_MTU2
 
 config ARCH_R8A7791
 	bool "R-Car M2 (R8A77910)"
 	select RENESAS_IRQC
+	select SYS_SUPPORTS_CMT
 
 comment "Renesas ARM SoCs Board Type"
 
@@ -59,6 +62,8 @@ config ARCH_SH7372
 	select ARM_CPU_SUSPEND if PM || CPU_IDLE
 	select CPU_V7
 	select SH_CLK_CPG
+	select SYS_SUPPORTS_CMT
+	select SYS_SUPPORTS_TMU
 
 config ARCH_SH73A0
 	bool "SH-Mobile AG5 (R8A73A00)"
@@ -68,6 +73,8 @@ config ARCH_SH73A0
 	select I2C
 	select SH_CLK_CPG
 	select RENESAS_INTC_IRQPIN
+	select SYS_SUPPORTS_CMT
+	select SYS_SUPPORTS_TMU
 
 config ARCH_R8A73A4
 	bool "R-Mobile APE6 (R8A73A40)"
@@ -78,6 +85,8 @@ config ARCH_R8A73A4
 	select RENESAS_IRQC
 	select ARCH_HAS_CPUFREQ
 	select ARCH_HAS_OPP
+	select SYS_SUPPORTS_CMT
+	select SYS_SUPPORTS_TMU
 
 config ARCH_R8A7740
 	bool "R-Mobile A1 (R8A77400)"
@@ -86,6 +95,8 @@ config ARCH_R8A7740
 	select CPU_V7
 	select SH_CLK_CPG
 	select RENESAS_INTC_IRQPIN
+	select SYS_SUPPORTS_CMT
+	select SYS_SUPPORTS_TMU
 
 config ARCH_R8A7778
 	bool "R-Car M1A (R8A77781)"
@@ -95,6 +106,7 @@ config ARCH_R8A7778
 	select ARM_GIC
 	select USB_ARCH_HAS_EHCI
 	select USB_ARCH_HAS_OHCI
+	select SYS_SUPPORTS_TMU
 
 config ARCH_R8A7779
 	bool "R-Car H1 (R8A77790)"
@@ -105,6 +117,7 @@ config ARCH_R8A7779
 	select USB_ARCH_HAS_EHCI
 	select USB_ARCH_HAS_OHCI
 	select RENESAS_INTC_IRQPIN
+	select SYS_SUPPORTS_TMU
 
 config ARCH_R8A7790
 	bool "R-Car H2 (R8A77900)"
@@ -113,6 +126,7 @@ config ARCH_R8A7790
 	select CPU_V7
 	select SH_CLK_CPG
 	select RENESAS_IRQC
+	select SYS_SUPPORTS_CMT
 
 config ARCH_R8A7791
 	bool "R-Car M2 (R8A77910)"
@@ -121,6 +135,7 @@ config ARCH_R8A7791
 	select CPU_V7
 	select SH_CLK_CPG
 	select RENESAS_IRQC
+	select SYS_SUPPORTS_CMT
 
 config ARCH_EMEV2
 	bool "Emma Mobile EV2"
@@ -129,6 +144,7 @@ config ARCH_EMEV2
 	select CPU_V7
 	select USE_OF
 	select AUTO_ZRELADDR
+	select SYS_SUPPORTS_STI
 
 config ARCH_R7S72100
 	bool "RZ/A1H (R7S72100)"
@@ -136,6 +152,7 @@ config ARCH_R7S72100
 	select ARM_GIC
 	select CPU_V7
 	select SH_CLK_CPG
+	select SYS_SUPPORTS_MTU2
 
 comment "Renesas ARM SoCs Board Type"
 
@@ -330,24 +347,6 @@ config SHMOBILE_TIMER_HZ
 	  want to select a HZ value such as 128 that can evenly divide RCLK.
 	  A HZ value that does not divide evenly may cause timer drift.
 
-config SH_TIMER_CMT
-	bool "CMT timer driver"
-	default y
-	help
-	  This enables build of the CMT timer driver.
-
-config SH_TIMER_TMU
-	bool "TMU timer driver"
-	default y
-	help
-	  This enables build of the TMU timer driver.
-
-config EM_TIMER_STI
-	bool "STI timer driver"
-	default y
-	help
-	  This enables build of the STI timer driver.
-
 endmenu
 
 endif

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

* [PATCH v2 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2
  2013-12-11 23:56 ` Magnus Damm
@ 2013-12-11 23:56   ` Magnus Damm
  -1 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-12-11 23:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: khilman, arnd, linux-sh, daniel.lezcano, horms, john.stultz,
	olof, Magnus Damm, tglx

From: Magnus Damm <damm@opensource.se>

Now when drivers/clocksource/Kconfig has been
updated with entires for CMT, TMU and MTU2
it is safe to remove these from SH.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: John Stultz <john.stultz@linaro.org>
---

 arch/sh/Kconfig |   21 ---------------------
 1 file changed, 21 deletions(-)

--- 0001/arch/sh/Kconfig
+++ work/arch/sh/Kconfig	2013-11-05 21:03:10.000000000 +0900
@@ -565,27 +565,6 @@ source "arch/sh/boards/Kconfig"
 
 menu "Timer and clock configuration"
 
-config SH_TIMER_TMU
-	bool "TMU timer driver"
-	depends on SYS_SUPPORTS_TMU
-	default y
-	help
-	  This enables the build of the TMU timer driver.
-
-config SH_TIMER_CMT
-	bool "CMT timer driver"
-	depends on SYS_SUPPORTS_CMT
-	default y
-	help
-	  This enables build of the CMT timer driver.
-
-config SH_TIMER_MTU2
-	bool "MTU2 timer driver"
-	depends on SYS_SUPPORTS_MTU2
-	default y
-	help
-	  This enables build of the MTU2 timer driver.
-
 config SH_PCLK_FREQ
 	int "Peripheral clock frequency (in Hz)"
 	depends on SH_CLK_CPG_LEGACY

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

* [PATCH v2 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2
@ 2013-12-11 23:56   ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-12-11 23:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: khilman, arnd, linux-sh, daniel.lezcano, horms, john.stultz,
	olof, Magnus Damm, tglx

From: Magnus Damm <damm@opensource.se>

Now when drivers/clocksource/Kconfig has been
updated with entires for CMT, TMU and MTU2
it is safe to remove these from SH.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: John Stultz <john.stultz@linaro.org>
---

 arch/sh/Kconfig |   21 ---------------------
 1 file changed, 21 deletions(-)

--- 0001/arch/sh/Kconfig
+++ work/arch/sh/Kconfig	2013-11-05 21:03:10.000000000 +0900
@@ -565,27 +565,6 @@ source "arch/sh/boards/Kconfig"
 
 menu "Timer and clock configuration"
 
-config SH_TIMER_TMU
-	bool "TMU timer driver"
-	depends on SYS_SUPPORTS_TMU
-	default y
-	help
-	  This enables the build of the TMU timer driver.
-
-config SH_TIMER_CMT
-	bool "CMT timer driver"
-	depends on SYS_SUPPORTS_CMT
-	default y
-	help
-	  This enables build of the CMT timer driver.
-
-config SH_TIMER_MTU2
-	bool "MTU2 timer driver"
-	depends on SYS_SUPPORTS_MTU2
-	default y
-	help
-	  This enables build of the MTU2 timer driver.
-
 config SH_PCLK_FREQ
 	int "Peripheral clock frequency (in Hz)"
 	depends on SH_CLK_CPG_LEGACY

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

* Re: [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
  2013-12-11 23:56   ` Magnus Damm
@ 2013-12-12  1:05     ` Olof Johansson
  -1 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2013-12-12  1:05 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, khilman, arnd, linux-sh, daniel.lezcano, horms,
	john.stultz, tglx

Hi,

A couple of small comments below.

On Thu, Dec 12, 2013 at 08:56:26AM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> Add Kconfig entries for CMT, MTU2, TMU and STI to
> drivers/clocksource/Kconfig. This will allow us to
> get rid of duplicated entires in architecture code
> such as arch/sh and arch/arm/mach-shmobile.
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
> 
>  drivers/clocksource/Kconfig |   44 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
> 
> --- 0001/drivers/clocksource/Kconfig
> +++ work/drivers/clocksource/Kconfig	2013-12-12 08:41:55.000000000 +0900
> @@ -134,3 +134,47 @@ config VF_PIT_TIMER
>  	bool
>  	help
>  	  Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
> +
> +config SYS_SUPPORTS_CMT
> +        bool
> +
> +config SYS_SUPPORTS_TMU
> +        bool
> +
> +config SYS_SUPPORTS_MTU2
> +        bool
> +
> +config SYS_SUPPORTS_STI
> +        bool

Maybe a prefix to avoid namespace collissions here?

> +
> +config SH_TIMER_CMT
> +	bool "Renesas CMT timer driver" if COMPILE_TEST
> +	default SYS_SUPPORTS_CMT

It might be useful to have an explicit depends on ARCH_SH || ARCH_SHMOBILE
|| COMPILE_TEST on these, just to make it easier for someone reading
the code later on.


-Olof

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

* Re: [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
@ 2013-12-12  1:05     ` Olof Johansson
  0 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2013-12-12  1:05 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, khilman, arnd, linux-sh, daniel.lezcano, horms,
	john.stultz, tglx

Hi,

A couple of small comments below.

On Thu, Dec 12, 2013 at 08:56:26AM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> Add Kconfig entries for CMT, MTU2, TMU and STI to
> drivers/clocksource/Kconfig. This will allow us to
> get rid of duplicated entires in architecture code
> such as arch/sh and arch/arm/mach-shmobile.
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
> 
>  drivers/clocksource/Kconfig |   44 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
> 
> --- 0001/drivers/clocksource/Kconfig
> +++ work/drivers/clocksource/Kconfig	2013-12-12 08:41:55.000000000 +0900
> @@ -134,3 +134,47 @@ config VF_PIT_TIMER
>  	bool
>  	help
>  	  Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
> +
> +config SYS_SUPPORTS_CMT
> +        bool
> +
> +config SYS_SUPPORTS_TMU
> +        bool
> +
> +config SYS_SUPPORTS_MTU2
> +        bool
> +
> +config SYS_SUPPORTS_STI
> +        bool

Maybe a prefix to avoid namespace collissions here?

> +
> +config SH_TIMER_CMT
> +	bool "Renesas CMT timer driver" if COMPILE_TEST
> +	default SYS_SUPPORTS_CMT

It might be useful to have an explicit depends on ARCH_SH || ARCH_SHMOBILE
|| COMPILE_TEST on these, just to make it easier for someone reading
the code later on.


-Olof

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

* Re: [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
  2013-12-12  1:05     ` Olof Johansson
@ 2013-12-13 10:12       ` Magnus Damm
  -1 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-12-13 10:12 UTC (permalink / raw)
  To: Olof Johansson
  Cc: linux-kernel, Kevin Hilman, Arnd Bergmann, SH-Linux,
	Daniel Lezcano, Simon Horman [Horms],
	John Stultz, Thomas Gleixner

Hi Olof,

On Thu, Dec 12, 2013 at 10:05 AM, Olof Johansson <olof@lixom.net> wrote:
> Hi,
>
> A couple of small comments below.

Thanks for your feedback!

> On Thu, Dec 12, 2013 at 08:56:26AM +0900, Magnus Damm wrote:
>> From: Magnus Damm <damm@opensource.se>
>>
>> Add Kconfig entries for CMT, MTU2, TMU and STI to
>> drivers/clocksource/Kconfig. This will allow us to
>> get rid of duplicated entires in architecture code
>> such as arch/sh and arch/arm/mach-shmobile.
>>
>> Signed-off-by: Magnus Damm <damm@opensource.se>
>> ---
>>
>>  drivers/clocksource/Kconfig |   44 +++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 44 insertions(+)
>>
>> --- 0001/drivers/clocksource/Kconfig
>> +++ work/drivers/clocksource/Kconfig  2013-12-12 08:41:55.000000000 +0900
>> @@ -134,3 +134,47 @@ config VF_PIT_TIMER
>>       bool
>>       help
>>         Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
>> +
>> +config SYS_SUPPORTS_CMT
>> +        bool
>> +
>> +config SYS_SUPPORTS_TMU
>> +        bool
>> +
>> +config SYS_SUPPORTS_MTU2
>> +        bool
>> +
>> +config SYS_SUPPORTS_STI
>> +        bool
>
> Maybe a prefix to avoid namespace collissions here?

Sure, that is fine with me. I based the ones above on already existing
ones used by SH but I don't mind reworking those.

How about SYS_SUPPORTS_CLKSRC_xxx?

>> +config SH_TIMER_CMT
>> +     bool "Renesas CMT timer driver" if COMPILE_TEST
>> +     default SYS_SUPPORTS_CMT
>
> It might be useful to have an explicit depends on ARCH_SH || ARCH_SHMOBILE
> || COMPILE_TEST on these, just to make it easier for someone reading
> the code later on.

I have any strong feelings one way or the other about that myself, but
I got the impression that John Stultz preferred to not allow manual
selection at all, and my compromise here is to allow it only when
COMPILE_TEST is selected.

Would you be ok to keep it as-is for now? If needed then we can add an
incremental patch later to enable more flexible selection.

Thanks,

/ magnus

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

* Re: [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
@ 2013-12-13 10:12       ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-12-13 10:12 UTC (permalink / raw)
  To: Olof Johansson
  Cc: linux-kernel, Kevin Hilman, Arnd Bergmann, SH-Linux,
	Daniel Lezcano, Simon Horman [Horms],
	John Stultz, Thomas Gleixner

Hi Olof,

On Thu, Dec 12, 2013 at 10:05 AM, Olof Johansson <olof@lixom.net> wrote:
> Hi,
>
> A couple of small comments below.

Thanks for your feedback!

> On Thu, Dec 12, 2013 at 08:56:26AM +0900, Magnus Damm wrote:
>> From: Magnus Damm <damm@opensource.se>
>>
>> Add Kconfig entries for CMT, MTU2, TMU and STI to
>> drivers/clocksource/Kconfig. This will allow us to
>> get rid of duplicated entires in architecture code
>> such as arch/sh and arch/arm/mach-shmobile.
>>
>> Signed-off-by: Magnus Damm <damm@opensource.se>
>> ---
>>
>>  drivers/clocksource/Kconfig |   44 +++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 44 insertions(+)
>>
>> --- 0001/drivers/clocksource/Kconfig
>> +++ work/drivers/clocksource/Kconfig  2013-12-12 08:41:55.000000000 +0900
>> @@ -134,3 +134,47 @@ config VF_PIT_TIMER
>>       bool
>>       help
>>         Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
>> +
>> +config SYS_SUPPORTS_CMT
>> +        bool
>> +
>> +config SYS_SUPPORTS_TMU
>> +        bool
>> +
>> +config SYS_SUPPORTS_MTU2
>> +        bool
>> +
>> +config SYS_SUPPORTS_STI
>> +        bool
>
> Maybe a prefix to avoid namespace collissions here?

Sure, that is fine with me. I based the ones above on already existing
ones used by SH but I don't mind reworking those.

How about SYS_SUPPORTS_CLKSRC_xxx?

>> +config SH_TIMER_CMT
>> +     bool "Renesas CMT timer driver" if COMPILE_TEST
>> +     default SYS_SUPPORTS_CMT
>
> It might be useful to have an explicit depends on ARCH_SH || ARCH_SHMOBILE
> || COMPILE_TEST on these, just to make it easier for someone reading
> the code later on.

I have any strong feelings one way or the other about that myself, but
I got the impression that John Stultz preferred to not allow manual
selection at all, and my compromise here is to allow it only when
COMPILE_TEST is selected.

Would you be ok to keep it as-is for now? If needed then we can add an
incremental patch later to enable more flexible selection.

Thanks,

/ magnus

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

* Re: [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
  2013-12-13 10:12       ` Magnus Damm
@ 2013-12-16  5:39         ` Olof Johansson
  -1 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2013-12-16  5:39 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, Kevin Hilman, Arnd Bergmann, SH-Linux,
	Daniel Lezcano, Simon Horman [Horms],
	John Stultz, Thomas Gleixner

On Fri, Dec 13, 2013 at 07:12:58PM +0900, Magnus Damm wrote:
> Hi Olof,
> 
> On Thu, Dec 12, 2013 at 10:05 AM, Olof Johansson <olof@lixom.net> wrote:
> > Hi,
> >
> > A couple of small comments below.
> 
> Thanks for your feedback!
> 
> > On Thu, Dec 12, 2013 at 08:56:26AM +0900, Magnus Damm wrote:
> >> From: Magnus Damm <damm@opensource.se>
> >>
> >> Add Kconfig entries for CMT, MTU2, TMU and STI to
> >> drivers/clocksource/Kconfig. This will allow us to
> >> get rid of duplicated entires in architecture code
> >> such as arch/sh and arch/arm/mach-shmobile.
> >>
> >> Signed-off-by: Magnus Damm <damm@opensource.se>
> >> ---
> >>
> >>  drivers/clocksource/Kconfig |   44 +++++++++++++++++++++++++++++++++++++++++++
> >>  1 file changed, 44 insertions(+)
> >>
> >> --- 0001/drivers/clocksource/Kconfig
> >> +++ work/drivers/clocksource/Kconfig  2013-12-12 08:41:55.000000000 +0900
> >> @@ -134,3 +134,47 @@ config VF_PIT_TIMER
> >>       bool
> >>       help
> >>         Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
> >> +
> >> +config SYS_SUPPORTS_CMT
> >> +        bool
> >> +
> >> +config SYS_SUPPORTS_TMU
> >> +        bool
> >> +
> >> +config SYS_SUPPORTS_MTU2
> >> +        bool
> >> +
> >> +config SYS_SUPPORTS_STI
> >> +        bool
> >
> > Maybe a prefix to avoid namespace collissions here?
> 
> Sure, that is fine with me. I based the ones above on already existing
> ones used by SH but I don't mind reworking those.
> 
> How about SYS_SUPPORTS_CLKSRC_xxx?

Oh, I was hoping for something shmobile-specific. Other platforms might have
some other clock source that they name STI or MTU, for example.

> >> +config SH_TIMER_CMT
> >> +     bool "Renesas CMT timer driver" if COMPILE_TEST
> >> +     default SYS_SUPPORTS_CMT
> >
> > It might be useful to have an explicit depends on ARCH_SH || ARCH_SHMOBILE
> > || COMPILE_TEST on these, just to make it easier for someone reading
> > the code later on.
> 
> I have any strong feelings one way or the other about that myself, but
> I got the impression that John Stultz preferred to not allow manual
> selection at all, and my compromise here is to allow it only when
> COMPILE_TEST is selected.
> 
> Would you be ok to keep it as-is for now? If needed then we can add an
> incremental patch later to enable more flexible selection.

Yeah, if there's no manual selection at all we might be fine.


-Olof

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

* Re: [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
@ 2013-12-16  5:39         ` Olof Johansson
  0 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2013-12-16  5:39 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, Kevin Hilman, Arnd Bergmann, SH-Linux,
	Daniel Lezcano, Simon Horman [Horms],
	John Stultz, Thomas Gleixner

On Fri, Dec 13, 2013 at 07:12:58PM +0900, Magnus Damm wrote:
> Hi Olof,
> 
> On Thu, Dec 12, 2013 at 10:05 AM, Olof Johansson <olof@lixom.net> wrote:
> > Hi,
> >
> > A couple of small comments below.
> 
> Thanks for your feedback!
> 
> > On Thu, Dec 12, 2013 at 08:56:26AM +0900, Magnus Damm wrote:
> >> From: Magnus Damm <damm@opensource.se>
> >>
> >> Add Kconfig entries for CMT, MTU2, TMU and STI to
> >> drivers/clocksource/Kconfig. This will allow us to
> >> get rid of duplicated entires in architecture code
> >> such as arch/sh and arch/arm/mach-shmobile.
> >>
> >> Signed-off-by: Magnus Damm <damm@opensource.se>
> >> ---
> >>
> >>  drivers/clocksource/Kconfig |   44 +++++++++++++++++++++++++++++++++++++++++++
> >>  1 file changed, 44 insertions(+)
> >>
> >> --- 0001/drivers/clocksource/Kconfig
> >> +++ work/drivers/clocksource/Kconfig  2013-12-12 08:41:55.000000000 +0900
> >> @@ -134,3 +134,47 @@ config VF_PIT_TIMER
> >>       bool
> >>       help
> >>         Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
> >> +
> >> +config SYS_SUPPORTS_CMT
> >> +        bool
> >> +
> >> +config SYS_SUPPORTS_TMU
> >> +        bool
> >> +
> >> +config SYS_SUPPORTS_MTU2
> >> +        bool
> >> +
> >> +config SYS_SUPPORTS_STI
> >> +        bool
> >
> > Maybe a prefix to avoid namespace collissions here?
> 
> Sure, that is fine with me. I based the ones above on already existing
> ones used by SH but I don't mind reworking those.
> 
> How about SYS_SUPPORTS_CLKSRC_xxx?

Oh, I was hoping for something shmobile-specific. Other platforms might have
some other clock source that they name STI or MTU, for example.

> >> +config SH_TIMER_CMT
> >> +     bool "Renesas CMT timer driver" if COMPILE_TEST
> >> +     default SYS_SUPPORTS_CMT
> >
> > It might be useful to have an explicit depends on ARCH_SH || ARCH_SHMOBILE
> > || COMPILE_TEST on these, just to make it easier for someone reading
> > the code later on.
> 
> I have any strong feelings one way or the other about that myself, but
> I got the impression that John Stultz preferred to not allow manual
> selection at all, and my compromise here is to allow it only when
> COMPILE_TEST is selected.
> 
> Would you be ok to keep it as-is for now? If needed then we can add an
> incremental patch later to enable more flexible selection.

Yeah, if there's no manual selection at all we might be fine.


-Olof

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

* Re: [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
  2013-12-16  5:39         ` Olof Johansson
@ 2013-12-17  5:28           ` Magnus Damm
  -1 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-12-17  5:28 UTC (permalink / raw)
  To: Olof Johansson
  Cc: linux-kernel, Kevin Hilman, Arnd Bergmann, SH-Linux,
	Daniel Lezcano, Simon Horman [Horms],
	John Stultz, Thomas Gleixner

Hi Olof,

On Mon, Dec 16, 2013 at 2:39 PM, Olof Johansson <olof@lixom.net> wrote:
> On Fri, Dec 13, 2013 at 07:12:58PM +0900, Magnus Damm wrote:
>> Hi Olof,
>>
>> On Thu, Dec 12, 2013 at 10:05 AM, Olof Johansson <olof@lixom.net> wrote:
>> > Hi,
>> >
>> > A couple of small comments below.
>>
>> Thanks for your feedback!
>>
>> > On Thu, Dec 12, 2013 at 08:56:26AM +0900, Magnus Damm wrote:
>> >> From: Magnus Damm <damm@opensource.se>
>> >>
>> >> Add Kconfig entries for CMT, MTU2, TMU and STI to
>> >> drivers/clocksource/Kconfig. This will allow us to
>> >> get rid of duplicated entires in architecture code
>> >> such as arch/sh and arch/arm/mach-shmobile.
>> >>
>> >> Signed-off-by: Magnus Damm <damm@opensource.se>
>> >> ---
>> >>
>> >>  drivers/clocksource/Kconfig |   44 +++++++++++++++++++++++++++++++++++++++++++
>> >>  1 file changed, 44 insertions(+)
>> >>
>> >> --- 0001/drivers/clocksource/Kconfig
>> >> +++ work/drivers/clocksource/Kconfig  2013-12-12 08:41:55.000000000 +0900
>> >> @@ -134,3 +134,47 @@ config VF_PIT_TIMER
>> >>       bool
>> >>       help
>> >>         Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
>> >> +
>> >> +config SYS_SUPPORTS_CMT
>> >> +        bool
>> >> +
>> >> +config SYS_SUPPORTS_TMU
>> >> +        bool
>> >> +
>> >> +config SYS_SUPPORTS_MTU2
>> >> +        bool
>> >> +
>> >> +config SYS_SUPPORTS_STI
>> >> +        bool
>> >
>> > Maybe a prefix to avoid namespace collissions here?
>>
>> Sure, that is fine with me. I based the ones above on already existing
>> ones used by SH but I don't mind reworking those.
>>
>> How about SYS_SUPPORTS_CLKSRC_xxx?
>
> Oh, I was hoping for something shmobile-specific. Other platforms might have
> some other clock source that they name STI or MTU, for example.

Thanks for the clarification. So how about the following?

SYS_SUPPORTS_SH_CMT
SYS_SUPPORTS_SH_MTU2
SYS_SUPPORTS_SH_TMU
SYS_SUPPORTS_EM_STI

The above match the style of the existing CONFIG_ SH/EM _TIMER_
CMT/MTU2/TMU/STI. Regarding the SH vs EM prefix, the SH ones are
present on arch/sh while EM_STI is only present on Emma Mobile SoCs.

>> >> +config SH_TIMER_CMT
>> >> +     bool "Renesas CMT timer driver" if COMPILE_TEST
>> >> +     default SYS_SUPPORTS_CMT
>> >
>> > It might be useful to have an explicit depends on ARCH_SH || ARCH_SHMOBILE
>> > || COMPILE_TEST on these, just to make it easier for someone reading
>> > the code later on.
>>
>> I have any strong feelings one way or the other about that myself, but
>> I got the impression that John Stultz preferred to not allow manual
>> selection at all, and my compromise here is to allow it only when
>> COMPILE_TEST is selected.
>>
>> Would you be ok to keep it as-is for now? If needed then we can add an
>> incremental patch later to enable more flexible selection.
>
> Yeah, if there's no manual selection at all we might be fine.

Ok, I will keep it as-is then.

Thanks,

/ magnus

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

* Re: [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
@ 2013-12-17  5:28           ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-12-17  5:28 UTC (permalink / raw)
  To: Olof Johansson
  Cc: linux-kernel, Kevin Hilman, Arnd Bergmann, SH-Linux,
	Daniel Lezcano, Simon Horman [Horms],
	John Stultz, Thomas Gleixner

Hi Olof,

On Mon, Dec 16, 2013 at 2:39 PM, Olof Johansson <olof@lixom.net> wrote:
> On Fri, Dec 13, 2013 at 07:12:58PM +0900, Magnus Damm wrote:
>> Hi Olof,
>>
>> On Thu, Dec 12, 2013 at 10:05 AM, Olof Johansson <olof@lixom.net> wrote:
>> > Hi,
>> >
>> > A couple of small comments below.
>>
>> Thanks for your feedback!
>>
>> > On Thu, Dec 12, 2013 at 08:56:26AM +0900, Magnus Damm wrote:
>> >> From: Magnus Damm <damm@opensource.se>
>> >>
>> >> Add Kconfig entries for CMT, MTU2, TMU and STI to
>> >> drivers/clocksource/Kconfig. This will allow us to
>> >> get rid of duplicated entires in architecture code
>> >> such as arch/sh and arch/arm/mach-shmobile.
>> >>
>> >> Signed-off-by: Magnus Damm <damm@opensource.se>
>> >> ---
>> >>
>> >>  drivers/clocksource/Kconfig |   44 +++++++++++++++++++++++++++++++++++++++++++
>> >>  1 file changed, 44 insertions(+)
>> >>
>> >> --- 0001/drivers/clocksource/Kconfig
>> >> +++ work/drivers/clocksource/Kconfig  2013-12-12 08:41:55.000000000 +0900
>> >> @@ -134,3 +134,47 @@ config VF_PIT_TIMER
>> >>       bool
>> >>       help
>> >>         Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
>> >> +
>> >> +config SYS_SUPPORTS_CMT
>> >> +        bool
>> >> +
>> >> +config SYS_SUPPORTS_TMU
>> >> +        bool
>> >> +
>> >> +config SYS_SUPPORTS_MTU2
>> >> +        bool
>> >> +
>> >> +config SYS_SUPPORTS_STI
>> >> +        bool
>> >
>> > Maybe a prefix to avoid namespace collissions here?
>>
>> Sure, that is fine with me. I based the ones above on already existing
>> ones used by SH but I don't mind reworking those.
>>
>> How about SYS_SUPPORTS_CLKSRC_xxx?
>
> Oh, I was hoping for something shmobile-specific. Other platforms might have
> some other clock source that they name STI or MTU, for example.

Thanks for the clarification. So how about the following?

SYS_SUPPORTS_SH_CMT
SYS_SUPPORTS_SH_MTU2
SYS_SUPPORTS_SH_TMU
SYS_SUPPORTS_EM_STI

The above match the style of the existing CONFIG_ SH/EM _TIMER_
CMT/MTU2/TMU/STI. Regarding the SH vs EM prefix, the SH ones are
present on arch/sh while EM_STI is only present on Emma Mobile SoCs.

>> >> +config SH_TIMER_CMT
>> >> +     bool "Renesas CMT timer driver" if COMPILE_TEST
>> >> +     default SYS_SUPPORTS_CMT
>> >
>> > It might be useful to have an explicit depends on ARCH_SH || ARCH_SHMOBILE
>> > || COMPILE_TEST on these, just to make it easier for someone reading
>> > the code later on.
>>
>> I have any strong feelings one way or the other about that myself, but
>> I got the impression that John Stultz preferred to not allow manual
>> selection at all, and my compromise here is to allow it only when
>> COMPILE_TEST is selected.
>>
>> Would you be ok to keep it as-is for now? If needed then we can add an
>> incremental patch later to enable more flexible selection.
>
> Yeah, if there's no manual selection at all we might be fine.

Ok, I will keep it as-is then.

Thanks,

/ magnus

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

* Re: [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
  2013-12-17  5:28           ` Magnus Damm
@ 2013-12-17  5:32             ` Olof Johansson
  -1 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2013-12-17  5:32 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, Kevin Hilman, Arnd Bergmann, SH-Linux,
	Daniel Lezcano, Simon Horman [Horms],
	John Stultz, Thomas Gleixner

On Mon, Dec 16, 2013 at 9:28 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
> Hi Olof,
>
> On Mon, Dec 16, 2013 at 2:39 PM, Olof Johansson <olof@lixom.net> wrote:
>> On Fri, Dec 13, 2013 at 07:12:58PM +0900, Magnus Damm wrote:
>>> Hi Olof,
>>>
>>> On Thu, Dec 12, 2013 at 10:05 AM, Olof Johansson <olof@lixom.net> wrote:
>>> > Hi,
>>> >
>>> > A couple of small comments below.
>>>
>>> Thanks for your feedback!
>>>
>>> > On Thu, Dec 12, 2013 at 08:56:26AM +0900, Magnus Damm wrote:
>>> >> From: Magnus Damm <damm@opensource.se>
>>> >>
>>> >> Add Kconfig entries for CMT, MTU2, TMU and STI to
>>> >> drivers/clocksource/Kconfig. This will allow us to
>>> >> get rid of duplicated entires in architecture code
>>> >> such as arch/sh and arch/arm/mach-shmobile.
>>> >>
>>> >> Signed-off-by: Magnus Damm <damm@opensource.se>
>>> >> ---
>>> >>
>>> >>  drivers/clocksource/Kconfig |   44 +++++++++++++++++++++++++++++++++++++++++++
>>> >>  1 file changed, 44 insertions(+)
>>> >>
>>> >> --- 0001/drivers/clocksource/Kconfig
>>> >> +++ work/drivers/clocksource/Kconfig  2013-12-12 08:41:55.000000000 +0900
>>> >> @@ -134,3 +134,47 @@ config VF_PIT_TIMER
>>> >>       bool
>>> >>       help
>>> >>         Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
>>> >> +
>>> >> +config SYS_SUPPORTS_CMT
>>> >> +        bool
>>> >> +
>>> >> +config SYS_SUPPORTS_TMU
>>> >> +        bool
>>> >> +
>>> >> +config SYS_SUPPORTS_MTU2
>>> >> +        bool
>>> >> +
>>> >> +config SYS_SUPPORTS_STI
>>> >> +        bool
>>> >
>>> > Maybe a prefix to avoid namespace collissions here?
>>>
>>> Sure, that is fine with me. I based the ones above on already existing
>>> ones used by SH but I don't mind reworking those.
>>>
>>> How about SYS_SUPPORTS_CLKSRC_xxx?
>>
>> Oh, I was hoping for something shmobile-specific. Other platforms might have
>> some other clock source that they name STI or MTU, for example.
>
> Thanks for the clarification. So how about the following?
>
> SYS_SUPPORTS_SH_CMT
> SYS_SUPPORTS_SH_MTU2
> SYS_SUPPORTS_SH_TMU
> SYS_SUPPORTS_EM_STI
>
> The above match the style of the existing CONFIG_ SH/EM _TIMER_
> CMT/MTU2/TMU/STI. Regarding the SH vs EM prefix, the SH ones are
> present on arch/sh while EM_STI is only present on Emma Mobile SoCs.

Yep, that sounds good.


-Olof

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

* Re: [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
@ 2013-12-17  5:32             ` Olof Johansson
  0 siblings, 0 replies; 18+ messages in thread
From: Olof Johansson @ 2013-12-17  5:32 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, Kevin Hilman, Arnd Bergmann, SH-Linux,
	Daniel Lezcano, Simon Horman [Horms],
	John Stultz, Thomas Gleixner

On Mon, Dec 16, 2013 at 9:28 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
> Hi Olof,
>
> On Mon, Dec 16, 2013 at 2:39 PM, Olof Johansson <olof@lixom.net> wrote:
>> On Fri, Dec 13, 2013 at 07:12:58PM +0900, Magnus Damm wrote:
>>> Hi Olof,
>>>
>>> On Thu, Dec 12, 2013 at 10:05 AM, Olof Johansson <olof@lixom.net> wrote:
>>> > Hi,
>>> >
>>> > A couple of small comments below.
>>>
>>> Thanks for your feedback!
>>>
>>> > On Thu, Dec 12, 2013 at 08:56:26AM +0900, Magnus Damm wrote:
>>> >> From: Magnus Damm <damm@opensource.se>
>>> >>
>>> >> Add Kconfig entries for CMT, MTU2, TMU and STI to
>>> >> drivers/clocksource/Kconfig. This will allow us to
>>> >> get rid of duplicated entires in architecture code
>>> >> such as arch/sh and arch/arm/mach-shmobile.
>>> >>
>>> >> Signed-off-by: Magnus Damm <damm@opensource.se>
>>> >> ---
>>> >>
>>> >>  drivers/clocksource/Kconfig |   44 +++++++++++++++++++++++++++++++++++++++++++
>>> >>  1 file changed, 44 insertions(+)
>>> >>
>>> >> --- 0001/drivers/clocksource/Kconfig
>>> >> +++ work/drivers/clocksource/Kconfig  2013-12-12 08:41:55.000000000 +0900
>>> >> @@ -134,3 +134,47 @@ config VF_PIT_TIMER
>>> >>       bool
>>> >>       help
>>> >>         Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
>>> >> +
>>> >> +config SYS_SUPPORTS_CMT
>>> >> +        bool
>>> >> +
>>> >> +config SYS_SUPPORTS_TMU
>>> >> +        bool
>>> >> +
>>> >> +config SYS_SUPPORTS_MTU2
>>> >> +        bool
>>> >> +
>>> >> +config SYS_SUPPORTS_STI
>>> >> +        bool
>>> >
>>> > Maybe a prefix to avoid namespace collissions here?
>>>
>>> Sure, that is fine with me. I based the ones above on already existing
>>> ones used by SH but I don't mind reworking those.
>>>
>>> How about SYS_SUPPORTS_CLKSRC_xxx?
>>
>> Oh, I was hoping for something shmobile-specific. Other platforms might have
>> some other clock source that they name STI or MTU, for example.
>
> Thanks for the clarification. So how about the following?
>
> SYS_SUPPORTS_SH_CMT
> SYS_SUPPORTS_SH_MTU2
> SYS_SUPPORTS_SH_TMU
> SYS_SUPPORTS_EM_STI
>
> The above match the style of the existing CONFIG_ SH/EM _TIMER_
> CMT/MTU2/TMU/STI. Regarding the SH vs EM prefix, the SH ones are
> present on arch/sh while EM_STI is only present on Emma Mobile SoCs.

Yep, that sounds good.


-Olof

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

end of thread, other threads:[~2013-12-17  5:32 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-11 23:56 [PATCH v4 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits Magnus Damm
2013-12-11 23:56 ` Magnus Damm
2013-12-11 23:56 ` [PATCH v4 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI Magnus Damm
2013-12-11 23:56   ` Magnus Damm
2013-12-12  1:05   ` Olof Johansson
2013-12-12  1:05     ` Olof Johansson
2013-12-13 10:12     ` Magnus Damm
2013-12-13 10:12       ` Magnus Damm
2013-12-16  5:39       ` Olof Johansson
2013-12-16  5:39         ` Olof Johansson
2013-12-17  5:28         ` Magnus Damm
2013-12-17  5:28           ` Magnus Damm
2013-12-17  5:32           ` Olof Johansson
2013-12-17  5:32             ` Olof Johansson
2013-12-11 23:56 ` [PATCH v4 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries Magnus Damm
2013-12-11 23:56   ` Magnus Damm
2013-12-11 23:56 ` [PATCH v2 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2 Magnus Damm
2013-12-11 23:56   ` Magnus Damm

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.