Re: [PATCH v2 2/2] clocksource: Add Realtek systimer as tick broadcast driver
From: Krzysztof Kozlowski
Date: Fri Nov 14 2025 - 04:12:59 EST
On 14/11/2025 10:04, Hao-Wen Ting wrote:
> Add a tick broadcast timer driver for Realtek SoCs.
>
> On Realtek platforms, CPUs can enter deep idle states (C-states) where
> the local timer is stopped and powered off. Without a global tick
> broadcast timer, one CPU must remain awake to wake up the others,
> preventing all CPUs from entering deep idle simultaneously.
>
> This driver provides a tick broadcast timer which remains active
> during deep idle states. This allows all CPUs to enter power-cut
> idle states simultaneously, significantly reducing overall power
> consumption.
>
> The timer operates at 1MHz and supports oneshot mode.
>
> Signed-off-by: Hao-Wen Ting <haowen.ting@xxxxxxxxxxx>
> ---
> MAINTAINERS | 5 +
> drivers/clocksource/Kconfig | 10 ++
> drivers/clocksource/Makefile | 1 +
> drivers/clocksource/timer-realtek.c | 172 ++++++++++++++++++++++++++++
> 4 files changed, 188 insertions(+)
> create mode 100644 drivers/clocksource/timer-realtek.c
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c7a116b795d5..90f511bb4982 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -21670,6 +21670,11 @@ S: Maintained
> F: Documentation/devicetree/bindings/spi/realtek,rtl9301-snand.yaml
> F: drivers/spi/spi-realtek-rtl-snand.c
>
> +REALTEK SYSTIMER DRIVER
> +M: Hao-Wen Ting <haowen.ting@xxxxxxxxxxx>
> +S: Maintained
> +F: drivers/clocksource/timer-realtek.c
> +
> REALTEK WIRELESS DRIVER (rtlwifi family)
> M: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
> L: linux-wireless@xxxxxxxxxxxxxxx
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index ffcd23668763..0c1835b48a18 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -782,4 +782,14 @@ config NXP_STM_TIMER
> Enables the support for NXP System Timer Module found in the
> s32g NXP platform series.
>
> +config RTK_SYSTIMER
> + bool "Realtek SYSTIMER support"
> + depends on ARM || ARM64
No, I asked to depend on specific SoC ARCH. Not top level architecture.
Also, each such dependency must have compile test, just look at other code.
Best regards,
Krzysztof