]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
clocksource/timer-riscv: ACPI: Add timer_cannot_wakeup_cpu
authorSunil V L <sunilvl@ventanamicro.com>
Wed, 27 Sep 2023 17:00:15 +0000 (22:30 +0530)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 11 Oct 2023 10:06:41 +0000 (12:06 +0200)
The timer capability to wakeup the cpu irrespective of its idle state is
provided by the flag in RHCT. Update the timer code to set this flag.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230927170015.295232-5-sunilvl@ventanamicro.com
drivers/clocksource/timer-riscv.c

index da3071b387eb59f6c003fcd7e58062d114d5c54a..50198657230efdff93202597c1dcc2b45924b0e5 100644 (file)
@@ -212,6 +212,10 @@ TIMER_OF_DECLARE(riscv_timer, "riscv", riscv_timer_init_dt);
 #ifdef CONFIG_ACPI
 static int __init riscv_timer_acpi_init(struct acpi_table_header *table)
 {
+       struct acpi_table_rhct *rhct = (struct acpi_table_rhct *)table;
+
+       riscv_timer_cannot_wake_cpu = rhct->flags & ACPI_RHCT_TIMER_CANNOT_WAKEUP_CPU;
+
        return riscv_timer_init_common();
 }