arm64: enable CMT/TMU support for Renesas SoC
diff mbox series

Message ID ebd7d1f7-d99b-f0a1-f05e-d822254b2e86@cogentembedded.com
State Accepted
Commit c1801ad028456267dde2111e470ac43f7882debf
Delegated to: Simon Horman
Headers show
Series
  • arm64: enable CMT/TMU support for Renesas SoC
Related show

Commit Message

Sergei Shtylyov Aug. 31, 2018, 7:54 p.m. UTC
Renesas R-Car gen3 SoCs have both CMT and TMU timers, so we have to enable
building them in Kconfig.platforms (as they don't normally have the prompts
in Kconfig).

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
The patch is against the ARM64 repo's 'for-next/core' branch.

 arch/arm64/Kconfig.platforms |    2 ++
 1 file changed, 2 insertions(+)

Comments

Simon Horman Sept. 3, 2018, 7:17 a.m. UTC | #1
On Fri, Aug 31, 2018 at 10:54:42PM +0300, Sergei Shtylyov wrote:
> Renesas R-Car gen3 SoCs have both CMT and TMU timers, so we have to enable
> building them in Kconfig.platforms (as they don't normally have the prompts
> in Kconfig).
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Thank Sergei,

this looks fine to me and I'd be happy to take it through the renesas tree,
after others have been given time for review, if that is the appropriate
path for this patch.

> 
> ---
> The patch is against the ARM64 repo's 'for-next/core' branch.
> 
>  arch/arm64/Kconfig.platforms |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: linux/arch/arm64/Kconfig.platforms
> ===================================================================
> --- linux.orig/arch/arm64/Kconfig.platforms
> +++ linux/arch/arm64/Kconfig.platforms
> @@ -175,6 +175,8 @@ config ARCH_RENESAS
>  	select PM_GENERIC_DOMAINS
>  	select RENESAS_IRQC
>  	select SOC_BUS
> +	select SYS_SUPPORTS_SH_CMT
> +	select SYS_SUPPORTS_SH_TMU
>  	help
>  	  This enables support for the ARMv8 based Renesas SoCs.
>  
>
Simon Horman Sept. 6, 2018, 9:28 a.m. UTC | #2
On Mon, Sep 03, 2018 at 09:17:15AM +0200, Simon Horman wrote:
> On Fri, Aug 31, 2018 at 10:54:42PM +0300, Sergei Shtylyov wrote:
> > Renesas R-Car gen3 SoCs have both CMT and TMU timers, so we have to enable
> > building them in Kconfig.platforms (as they don't normally have the prompts
> > in Kconfig).
> > 
> > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> Thank Sergei,
> 
> this looks fine to me and I'd be happy to take it through the renesas tree,
> after others have been given time for review, if that is the appropriate
> path for this patch.

Thanks again, I have applied this to the renesas tree for v4.20.
Geert Uytterhoeven Sept. 6, 2018, 9:47 a.m. UTC | #3
Hi Sergei,

On Fri, Aug 31, 2018 at 9:54 PM Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Renesas R-Car gen3 SoCs have both CMT and TMU timers, so we have to enable
> building them in Kconfig.platforms (as they don't normally have the prompts
> in Kconfig).
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> The patch is against the ARM64 repo's 'for-next/core' branch.
>
>  arch/arm64/Kconfig.platforms |    2 ++
>  1 file changed, 2 insertions(+)
>
> Index: linux/arch/arm64/Kconfig.platforms
> ===================================================================
> --- linux.orig/arch/arm64/Kconfig.platforms
> +++ linux/arch/arm64/Kconfig.platforms
> @@ -175,6 +175,8 @@ config ARCH_RENESAS
>         select PM_GENERIC_DOMAINS
>         select RENESAS_IRQC
>         select SOC_BUS
> +       select SYS_SUPPORTS_SH_CMT
> +       select SYS_SUPPORTS_SH_TMU

Perhaps the CONFIG_SH_TIMER_CMT and _TMU logic should be reworked instead,
to allow the user to choose if he wants to enable the driver or not on platforms
that do not select these two symbls?

Hardcoding this to y depending on SYS_SUPPORTS_SH_* may be needed on
SuperH and older Renesas ARM SoCs, but R-Car Gen2+ and RZ/G now use the
ARM architectured timer by default.

Gr{oetje,eeting}s,

                        Geert

Patch
diff mbox series

Index: linux/arch/arm64/Kconfig.platforms
===================================================================
--- linux.orig/arch/arm64/Kconfig.platforms
+++ linux/arch/arm64/Kconfig.platforms
@@ -175,6 +175,8 @@  config ARCH_RENESAS
 	select PM_GENERIC_DOMAINS
 	select RENESAS_IRQC
 	select SOC_BUS
+	select SYS_SUPPORTS_SH_CMT
+	select SYS_SUPPORTS_SH_TMU
 	help
 	  This enables support for the ARMv8 based Renesas SoCs.