Re: [PATCH v2] sh: sh7305: add TMU0 clock support

From: Geert Uytterhoeven

Date: Mon Nov 02 2026 - 03:55:16 EST


Hi Artem,

On Sat, 31 Oct 2026 at 00:07, Artem Novak <artem122novak@xxxxxxxxx> wrote:
> Register the SH7305 master, peripheral, bus and CPU clocks using
> the SuperH clock framework. Add the TMU0 module clock gate using
> MSTPCR0 bit 15.
>
> Keeping SH7305 clock initialization independent of the legacy CPG
> initialization framework, which relies on arch_init_clk_ops().
> Disable SH_CLK_CPG_LEGACY for SH7305.

Thanks for your patch!

> update: SH7305 TMU device tree node will use the
> renesas,tmu-sh7305 compatible.

I don't think this correction should be part of this patch?

> Signed-off-by: Artem Novak <artem122novak@xxxxxxxxx>
> ---
> arch/sh/Kconfig | 2 +-
> arch/sh/boot/dts/sh7305.dtsi | 2 +-
> arch/sh/kernel/cpu/sh4a/clock-sh7305.c | 78 +++++++++++++++++++-------
> 3 files changed, 60 insertions(+), 22 deletions(-)
>
> diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
> index 5ce7df11c3ec..315a1d6ee452 100644
> --- a/arch/sh/Kconfig
> +++ b/arch/sh/Kconfig
> @@ -532,7 +532,7 @@ config SH_CLK_CPG
> def_bool y
>
> config SH_CLK_CPG_LEGACY
> - depends on SH_CLK_CPG
> + depends on SH_CLK_CPG && !CPU_SUBTYPE_SH7305

Why not add !CPU_SUBTYPE_SH7305 to the existing list below?

> def_bool y if !CPU_SUBTYPE_SH7785 && !ARCH_SHMOBILE && \
> !CPU_SHX3 && !CPU_SUBTYPE_SH7757 && \
> !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds