* [PATCH v3 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits
@ 2013-12-04 20:38 Magnus Damm
2013-12-04 20:38 ` [PATCH v3 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI Magnus Damm
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Magnus Damm @ 2013-12-04 20:38 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 (v3)
[PATCH v3 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
[PATCH v3 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 V3 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.
Since last time this has been broken out into 3 separate patches,
where [PATCH v3 01/03] needs to go first, and the other patches
can be merged any time after without any build or configuration
issues.
Thanks to Daniel, John and Arnd for feedback!
This version tries to find a middle ground by:
- Not allowing user selection of timers by default
- Automaticlally select available drivers using SYS_SUPPORTS_xxx.
- Allow manual override in case of COMPILE_TEST (select and deselect)
- The system will boot regardless of these settigns
- In this version the special case menu tand if have been dropped
Slightly different and/or not really handled in this version:
- The acronym soup is kept as-is for now
- Allow select _and_ deselect in case of COMPILE_TEST (not only select)
- Follow same style as SH and select per-SoC SYS_SUPPORTS_xxx
Signed-off-by: Magnus Damm <damm@opensource.se>
---
Written against renesas.git tag renesas-devel-v3.13-rc2-20131202
arch/arm/mach-shmobile/Kconfig | 35 +++++++++++++++++------------------
arch/sh/Kconfig | 21 ---------------------
drivers/clocksource/Kconfig | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 53 insertions(+), 39 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
2013-12-04 20:38 [PATCH v3 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits Magnus Damm
@ 2013-12-04 20:38 ` Magnus Damm
2013-12-05 18:32 ` John Stultz
2013-12-04 20:38 ` [PATCH v3 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries Magnus Damm
2013-12-04 20:38 ` [PATCH v2 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2 Magnus Damm
2 siblings, 1 reply; 7+ messages in thread
From: Magnus Damm @ 2013-12-04 20:38 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 | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
--- 0001/drivers/clocksource/Kconfig
+++ work/drivers/clocksource/Kconfig 2013-12-04 22:14:29.000000000 +0900
@@ -134,3 +134,39 @@ 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 the CMT timer driver.
+
+config SH_TIMER_MTU2
+ bool "Renesas MTU2 timer driver" if COMPILE_TEST
+ default SYS_SUPPORTS_MTU2
+ help
+ This enables build of the MTU2 timer driver.
+
+config SH_TIMER_TMU
+ bool "Renesas TMU timer driver" if COMPILE_TEST
+ default SYS_SUPPORTS_TMU
+ help
+ This enables build of the TMU timer driver.
+
+config EM_TIMER_STI
+ bool "Renesas STI timer driver" if COMPILE_TEST
+ default SYS_SUPPORTS_STI
+ help
+ This enables build of the STI timer driver.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries
2013-12-04 20:38 [PATCH v3 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits Magnus Damm
2013-12-04 20:38 ` [PATCH v3 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI Magnus Damm
@ 2013-12-04 20:38 ` Magnus Damm
2013-12-05 18:34 ` John Stultz
2013-12-04 20:38 ` [PATCH v2 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2 Magnus Damm
2 siblings, 1 reply; 7+ messages in thread
From: Magnus Damm @ 2013-12-04 20:38 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>
---
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-04 22:04:05.000000000 +0900
@@ -23,13 +23,16 @@ comment "SH-Mobile 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 "SH-Mobile 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"
@@ -128,6 +143,7 @@ config ARCH_EMEV2
select ARM_GIC
select CPU_V7
select USE_OF
+ select SYS_SUPPORTS_STI
config ARCH_R7S72100
bool "RZ/A1H (R7S72100)"
@@ -135,6 +151,7 @@ config ARCH_R7S72100
select ARM_GIC
select CPU_V7
select SH_CLK_CPG
+ select SYS_SUPPORTS_MTU2
comment "SH-Mobile Board Type"
@@ -329,24 +346,6 @@ config SHMOBILE_TIMER_HZ
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] 7+ messages in thread
* [PATCH v2 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2
2013-12-04 20:38 [PATCH v3 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits Magnus Damm
2013-12-04 20:38 ` [PATCH v3 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI Magnus Damm
2013-12-04 20:38 ` [PATCH v3 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries Magnus Damm
@ 2013-12-04 20:38 ` Magnus Damm
2013-12-05 18:35 ` John Stultz
2 siblings, 1 reply; 7+ messages in thread
From: Magnus Damm @ 2013-12-04 20:38 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>
---
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] 7+ messages in thread
* Re: [PATCH v3 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
2013-12-04 20:38 ` [PATCH v3 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI Magnus Damm
@ 2013-12-05 18:32 ` John Stultz
0 siblings, 0 replies; 7+ messages in thread
From: John Stultz @ 2013-12-05 18:32 UTC (permalink / raw)
To: Magnus Damm, linux-kernel
Cc: khilman, arnd, linux-sh, daniel.lezcano, horms, olof, tglx
On 12/04/2013 12:38 PM, 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 | 36 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
> --- 0001/drivers/clocksource/Kconfig
> +++ work/drivers/clocksource/Kconfig 2013-12-04 22:14:29.000000000 +0900
> @@ -134,3 +134,39 @@ 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 the CMT timer driver.
> +
So again, I'd say if this is a non-conflicting COMPILE_TEST option (ie,
enabling it doesn't for anything else to be disabled), you might as well
enable it without a prompt on COMPILE_TEST. But that's just me. :)
If folks really disagree, and there is to be a user prompt, can we get
just a little more detail in the help text?
So what is the CMT hardware? Maybe what does CMT stand for? What
hardware is it frequently found on?
thanks
-john
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries
2013-12-04 20:38 ` [PATCH v3 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries Magnus Damm
@ 2013-12-05 18:34 ` John Stultz
0 siblings, 0 replies; 7+ messages in thread
From: John Stultz @ 2013-12-05 18:34 UTC (permalink / raw)
To: Magnus Damm, linux-kernel
Cc: khilman, arnd, linux-sh, daniel.lezcano, horms, olof, tglx
On 12/04/2013 12:38 PM, Magnus Damm wrote:
> 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>
Looks ok to me. Sorry for all the review pain on this.
For what its worth:
Acked-by: John Stultz <john.stultz@linaro.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2
2013-12-04 20:38 ` [PATCH v2 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2 Magnus Damm
@ 2013-12-05 18:35 ` John Stultz
0 siblings, 0 replies; 7+ messages in thread
From: John Stultz @ 2013-12-05 18:35 UTC (permalink / raw)
To: Magnus Damm, linux-kernel
Cc: khilman, arnd, linux-sh, daniel.lezcano, horms, olof, tglx
On 12/04/2013 12:38 PM, Magnus Damm wrote:
> 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>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-12-05 18:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-04 20:38 [PATCH v3 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits Magnus Damm
2013-12-04 20:38 ` [PATCH v3 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI Magnus Damm
2013-12-05 18:32 ` John Stultz
2013-12-04 20:38 ` [PATCH v3 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries Magnus Damm
2013-12-05 18:34 ` John Stultz
2013-12-04 20:38 ` [PATCH v2 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2 Magnus Damm
2013-12-05 18:35 ` John Stultz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).