* [PATCH v5 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
2013-12-17 10:12 [PATCH v5 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits Magnus Damm
@ 2013-12-17 10:12 ` Magnus Damm
2013-12-17 10:12 ` [PATCH v5 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries Magnus Damm
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Magnus Damm @ 2013-12-17 10:12 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-17 18:50:30.000000000 +0900
@@ -135,3 +135,47 @@ config VF_PIT_TIMER
bool
help
Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
+
+config SYS_SUPPORTS_SH_CMT
+ bool
+
+config SYS_SUPPORTS_SH_MTU2
+ bool
+
+config SYS_SUPPORTS_SH_TMU
+ bool
+
+config SYS_SUPPORTS_EM_STI
+ bool
+
+config SH_TIMER_CMT
+ bool "Renesas CMT timer driver" if COMPILE_TEST
+ default SYS_SUPPORTS_SH_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_SH_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_SH_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_EM_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] 6+ messages in thread* [PATCH v5 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries
2013-12-17 10:12 [PATCH v5 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits Magnus Damm
2013-12-17 10:12 ` [PATCH v5 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI Magnus Damm
@ 2013-12-17 10:12 ` Magnus Damm
2013-12-17 10:13 ` [PATCH v5 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2 Magnus Damm
2013-12-18 15:38 ` [PATCH v5 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits Daniel Lezcano
3 siblings, 0 replies; 6+ messages in thread
From: Magnus Damm @ 2013-12-17 10:12 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-17 18:52:58.000000000 +0900
@@ -24,13 +24,16 @@ comment "Renesas ARM SoCs System Type"
config ARCH_EMEV2
bool "Emma Mobile EV2"
+ select SYS_SUPPORTS_EM_STI
config ARCH_R7S72100
bool "RZ/A1H (R7S72100)"
+ select SYS_SUPPORTS_SH_MTU2
config ARCH_R8A7791
bool "R-Car M2 (R8A77910)"
select RENESAS_IRQC
+ select SYS_SUPPORTS_SH_CMT
comment "Renesas ARM SoCs Board Type"
@@ -60,6 +63,8 @@ config ARCH_SH7372
select ARM_CPU_SUSPEND if PM || CPU_IDLE
select CPU_V7
select SH_CLK_CPG
+ select SYS_SUPPORTS_SH_CMT
+ select SYS_SUPPORTS_SH_TMU
config ARCH_SH73A0
bool "SH-Mobile AG5 (R8A73A00)"
@@ -69,6 +74,8 @@ config ARCH_SH73A0
select I2C
select SH_CLK_CPG
select RENESAS_INTC_IRQPIN
+ select SYS_SUPPORTS_SH_CMT
+ select SYS_SUPPORTS_SH_TMU
config ARCH_R8A73A4
bool "R-Mobile APE6 (R8A73A40)"
@@ -79,6 +86,8 @@ config ARCH_R8A73A4
select RENESAS_IRQC
select ARCH_HAS_CPUFREQ
select ARCH_HAS_OPP
+ select SYS_SUPPORTS_SH_CMT
+ select SYS_SUPPORTS_SH_TMU
config ARCH_R8A7740
bool "R-Mobile A1 (R8A77400)"
@@ -87,6 +96,8 @@ config ARCH_R8A7740
select CPU_V7
select SH_CLK_CPG
select RENESAS_INTC_IRQPIN
+ select SYS_SUPPORTS_SH_CMT
+ select SYS_SUPPORTS_SH_TMU
config ARCH_R8A7778
bool "R-Car M1A (R8A77781)"
@@ -96,6 +107,7 @@ config ARCH_R8A7778
select ARM_GIC
select USB_ARCH_HAS_EHCI
select USB_ARCH_HAS_OHCI
+ select SYS_SUPPORTS_SH_TMU
config ARCH_R8A7779
bool "R-Car H1 (R8A77790)"
@@ -106,6 +118,7 @@ config ARCH_R8A7779
select USB_ARCH_HAS_EHCI
select USB_ARCH_HAS_OHCI
select RENESAS_INTC_IRQPIN
+ select SYS_SUPPORTS_SH_TMU
config ARCH_R8A7790
bool "R-Car H2 (R8A77900)"
@@ -115,6 +128,7 @@ config ARCH_R8A7790
select MIGHT_HAVE_PCI
select SH_CLK_CPG
select RENESAS_IRQC
+ select SYS_SUPPORTS_SH_CMT
config ARCH_R8A7791
bool "R-Car M2 (R8A77910)"
@@ -124,6 +138,7 @@ config ARCH_R8A7791
select MIGHT_HAVE_PCI
select SH_CLK_CPG
select RENESAS_IRQC
+ select SYS_SUPPORTS_SH_CMT
config ARCH_EMEV2
bool "Emma Mobile EV2"
@@ -133,6 +148,7 @@ config ARCH_EMEV2
select MIGHT_HAVE_PCI
select USE_OF
select AUTO_ZRELADDR
+ select SYS_SUPPORTS_EM_STI
config ARCH_R7S72100
bool "RZ/A1H (R7S72100)"
@@ -140,6 +156,7 @@ config ARCH_R7S72100
select ARM_GIC
select CPU_V7
select SH_CLK_CPG
+ select SYS_SUPPORTS_SH_MTU2
comment "Renesas ARM SoCs Board Type"
@@ -334,24 +351,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] 6+ messages in thread
* [PATCH v5 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2
2013-12-17 10:12 [PATCH v5 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits Magnus Damm
2013-12-17 10:12 ` [PATCH v5 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI Magnus Damm
2013-12-17 10:12 ` [PATCH v5 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries Magnus Damm
@ 2013-12-17 10:13 ` Magnus Damm
2013-12-18 15:38 ` [PATCH v5 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits Daniel Lezcano
3 siblings, 0 replies; 6+ messages in thread
From: Magnus Damm @ 2013-12-17 10:13 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 | 76 ++++++++++++++++---------------------------------------
1 file changed, 23 insertions(+), 53 deletions(-)
--- 0001/arch/sh/Kconfig
+++ work/arch/sh/Kconfig 2013-12-17 18:56:15.000000000 +0900
@@ -122,15 +122,6 @@ config SYS_SUPPORTS_NUMA
config SYS_SUPPORTS_PCI
bool
-config SYS_SUPPORTS_CMT
- bool
-
-config SYS_SUPPORTS_MTU2
- bool
-
-config SYS_SUPPORTS_TMU
- bool
-
config STACKTRACE_SUPPORT
def_bool y
@@ -190,14 +181,14 @@ config CPU_SH3
bool
select CPU_HAS_INTEVT
select CPU_HAS_SR_RB
- select SYS_SUPPORTS_TMU
+ select SYS_SUPPORTS_SH_TMU
config CPU_SH4
bool
select CPU_HAS_INTEVT
select CPU_HAS_SR_RB
select CPU_HAS_FPU if !CPU_SH4AL_DSP
- select SYS_SUPPORTS_TMU
+ select SYS_SUPPORTS_SH_TMU
select SYS_SUPPORTS_HUGETLBFS if MMU
config CPU_SH4A
@@ -212,7 +203,7 @@ config CPU_SH4AL_DSP
config CPU_SH5
bool
select CPU_HAS_FPU
- select SYS_SUPPORTS_TMU
+ select SYS_SUPPORTS_SH_TMU
select SYS_SUPPORTS_HUGETLBFS if MMU
config CPU_SHX2
@@ -249,7 +240,7 @@ choice
config CPU_SUBTYPE_SH7619
bool "Support SH7619 processor"
select CPU_SH2
- select SYS_SUPPORTS_CMT
+ select SYS_SUPPORTS_SH_CMT
# SH-2A Processor Support
@@ -257,50 +248,50 @@ config CPU_SUBTYPE_SH7201
bool "Support SH7201 processor"
select CPU_SH2A
select CPU_HAS_FPU
- select SYS_SUPPORTS_MTU2
+ select SYS_SUPPORTS_SH_MTU2
config CPU_SUBTYPE_SH7203
bool "Support SH7203 processor"
select CPU_SH2A
select CPU_HAS_FPU
- select SYS_SUPPORTS_CMT
- select SYS_SUPPORTS_MTU2
+ select SYS_SUPPORTS_SH_CMT
+ select SYS_SUPPORTS_SH_MTU2
select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
config CPU_SUBTYPE_SH7206
bool "Support SH7206 processor"
select CPU_SH2A
- select SYS_SUPPORTS_CMT
- select SYS_SUPPORTS_MTU2
+ select SYS_SUPPORTS_SH_CMT
+ select SYS_SUPPORTS_SH_MTU2
config CPU_SUBTYPE_SH7263
bool "Support SH7263 processor"
select CPU_SH2A
select CPU_HAS_FPU
- select SYS_SUPPORTS_CMT
- select SYS_SUPPORTS_MTU2
+ select SYS_SUPPORTS_SH_CMT
+ select SYS_SUPPORTS_SH_MTU2
config CPU_SUBTYPE_SH7264
bool "Support SH7264 processor"
select CPU_SH2A
select CPU_HAS_FPU
- select SYS_SUPPORTS_CMT
- select SYS_SUPPORTS_MTU2
+ select SYS_SUPPORTS_SH_CMT
+ select SYS_SUPPORTS_SH_MTU2
select PINCTRL
config CPU_SUBTYPE_SH7269
bool "Support SH7269 processor"
select CPU_SH2A
select CPU_HAS_FPU
- select SYS_SUPPORTS_CMT
- select SYS_SUPPORTS_MTU2
+ select SYS_SUPPORTS_SH_CMT
+ select SYS_SUPPORTS_SH_MTU2
select PINCTRL
config CPU_SUBTYPE_MXG
bool "Support MX-G processor"
select CPU_SH2A
- select SYS_SUPPORTS_MTU2
+ select SYS_SUPPORTS_SH_MTU2
help
Select MX-G if running on an R8A03022BG part.
@@ -353,7 +344,7 @@ config CPU_SUBTYPE_SH7720
bool "Support SH7720 processor"
select CPU_SH3
select CPU_HAS_DSP
- select SYS_SUPPORTS_CMT
+ select SYS_SUPPORTS_SH_CMT
select ARCH_WANT_OPTIONAL_GPIOLIB
select USB_ARCH_HAS_OHCI
select USB_OHCI_SH if USB_OHCI_HCD
@@ -365,7 +356,7 @@ config CPU_SUBTYPE_SH7721
bool "Support SH7721 processor"
select CPU_SH3
select CPU_HAS_DSP
- select SYS_SUPPORTS_CMT
+ select SYS_SUPPORTS_SH_CMT
select USB_ARCH_HAS_OHCI
select USB_OHCI_SH if USB_OHCI_HCD
help
@@ -421,7 +412,7 @@ config CPU_SUBTYPE_SH7723
select CPU_SHX2
select ARCH_SHMOBILE
select ARCH_SPARSEMEM_ENABLE
- select SYS_SUPPORTS_CMT
+ select SYS_SUPPORTS_SH_CMT
select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
help
@@ -433,7 +424,7 @@ config CPU_SUBTYPE_SH7724
select CPU_SHX2
select ARCH_SHMOBILE
select ARCH_SPARSEMEM_ENABLE
- select SYS_SUPPORTS_CMT
+ select SYS_SUPPORTS_SH_CMT
select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
help
@@ -513,7 +504,7 @@ config CPU_SUBTYPE_SH7343
bool "Support SH7343 processor"
select CPU_SH4AL_DSP
select ARCH_SHMOBILE
- select SYS_SUPPORTS_CMT
+ select SYS_SUPPORTS_SH_CMT
config CPU_SUBTYPE_SH7722
bool "Support SH7722 processor"
@@ -522,7 +513,7 @@ config CPU_SUBTYPE_SH7722
select ARCH_SHMOBILE
select ARCH_SPARSEMEM_ENABLE
select SYS_SUPPORTS_NUMA
- select SYS_SUPPORTS_CMT
+ select SYS_SUPPORTS_SH_CMT
select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
@@ -533,7 +524,7 @@ config CPU_SUBTYPE_SH7366
select ARCH_SHMOBILE
select ARCH_SPARSEMEM_ENABLE
select SYS_SUPPORTS_NUMA
- select SYS_SUPPORTS_CMT
+ select SYS_SUPPORTS_SH_CMT
endchoice
@@ -566,27 +557,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] 6+ messages in thread
* Re: [PATCH v5 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits
2013-12-17 10:12 [PATCH v5 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits Magnus Damm
` (2 preceding siblings ...)
2013-12-17 10:13 ` [PATCH v5 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2 Magnus Damm
@ 2013-12-18 15:38 ` Daniel Lezcano
2013-12-18 22:24 ` Magnus Damm
3 siblings, 1 reply; 6+ messages in thread
From: Daniel Lezcano @ 2013-12-18 15:38 UTC (permalink / raw)
To: Magnus Damm, linux-kernel
Cc: khilman, arnd, linux-sh, horms, john.stultz, olof, tglx
On 12/17/2013 11:12 AM, Magnus Damm wrote:
> clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits (v5)
>
> [PATCH v5 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
> [PATCH v5 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries
> [PATCH v5 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2
>
> This is V5 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 Olof, John, Daniel and Arnd for feedback!
>
> Changes since V4:
> - Use SYS_SUPPORTS_SH/EM to avoid name space pollution, thanks Olof!
> - Remove old SH entries for SYS_SUPPORTS_xxx, use above SH prefix instead
>
> 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-rc3-20131214v2
Do you want me to take the patchset ? If so, could you respin it against
timers/core ?
Thanks
-- Daniel
>
> arch/arm/mach-shmobile/Kconfig | 35 ++++++++----------
> arch/sh/Kconfig | 76 ++++++++++++----------------------------
> drivers/clocksource/Kconfig | 44 +++++++++++++++++++++++
> 3 files changed, 84 insertions(+), 71 deletions(-)
>
--
<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] 6+ messages in thread* Re: [PATCH v5 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits
2013-12-18 15:38 ` [PATCH v5 00/03] clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits Daniel Lezcano
@ 2013-12-18 22:24 ` Magnus Damm
0 siblings, 0 replies; 6+ messages in thread
From: Magnus Damm @ 2013-12-18 22:24 UTC (permalink / raw)
To: Daniel Lezcano
Cc: linux-kernel, Kevin Hilman, Arnd Bergmann, SH-Linux,
Simon Horman [Horms], John Stultz, Olof Johansson,
Thomas Gleixner
Hi Daniel,
On Thu, Dec 19, 2013 at 12:38 AM, Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
> On 12/17/2013 11:12 AM, Magnus Damm wrote:
>>
>> clocksource: Consolidate SH and ARM mach-shmobile Kconfig bits (v5)
>>
>> [PATCH v5 01/03] clocksource: Add Kconfig entries for CMT, MTU2, TMU and
>> STI
>> [PATCH v5 02/03] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries
>> [PATCH v5 03/03] sh: Remove Kconfig entries for TMU, CMT and MTU2
>>
>> This is V5 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 Olof, John, Daniel and Arnd for feedback!
>>
>> Changes since V4:
>> - Use SYS_SUPPORTS_SH/EM to avoid name space pollution, thanks Olof!
>> - Remove old SH entries for SYS_SUPPORTS_xxx, use above SH prefix
>> instead
>>
>> 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-rc3-20131214v2
>
>
> Do you want me to take the patchset ? If so, could you respin it against
> timers/core ?
That would be great, thanks! I will respin it!
Cheers,
/ magnus
^ permalink raw reply [flat|nested] 6+ messages in thread