Lines Matching +full:timer +full:- +full:cannot +full:- +full:wake +full:- +full:cpu

1 // SPDX-License-Identifier: GPL-2.0
6 * All RISC-V systems have a timer attached to every hart. These timers can
11 #define pr_fmt(fmt) "riscv-timer: " fmt
16 #include <linux/cpu.h>
22 #include <linux/io-64-nonatomic-lo-hi.h>
26 #include <clocksource/timer-riscv.h>
107 static int riscv_timer_starting_cpu(unsigned int cpu) in riscv_timer_starting_cpu() argument
109 struct clock_event_device *ce = per_cpu_ptr(&riscv_clock_event, cpu); in riscv_timer_starting_cpu()
111 /* Clear timer interrupt */ in riscv_timer_starting_cpu()
114 ce->cpumask = cpumask_of(cpu); in riscv_timer_starting_cpu()
115 ce->irq = riscv_clock_event_irq; in riscv_timer_starting_cpu()
117 ce->features |= CLOCK_EVT_FEAT_C3STOP; in riscv_timer_starting_cpu()
119 ce->rating = 450; in riscv_timer_starting_cpu()
127 static int riscv_timer_dying_cpu(unsigned int cpu) in riscv_timer_dying_cpu() argument
140 /* called directly from the low-level interrupt handler */
146 evdev->event_handler(evdev); in riscv_timer_interrupt()
161 return -ENODEV; in riscv_timer_init_common()
166 pr_err("Failed to map timer interrupt for node [%pfwP]\n", intc_fwnode); in riscv_timer_init_common()
167 return -ENODEV; in riscv_timer_init_common()
172 pr_err("RISCV timer registration failed [%d]\n", error); in riscv_timer_init_common()
180 "riscv-timer", &riscv_clock_event); in riscv_timer_init_common()
187 pr_info("Timer interrupt in S-mode is available via sstc extension\n"); in riscv_timer_init_common()
192 "clockevents/riscv/timer:starting", in riscv_timer_init_common()
195 pr_err("cpu hp setup state failed for RISCV timer [%d]\n", in riscv_timer_init_common()
223 child = of_find_compatible_node(NULL, NULL, "riscv,timer"); in riscv_timer_init_dt()
226 "riscv,timer-cannot-wake-cpu"); in riscv_timer_init_dt()
240 riscv_timer_cannot_wake_cpu = rhct->flags & ACPI_RHCT_TIMER_CANNOT_WAKEUP_CPU; in riscv_timer_acpi_init()