Lines Matching +full:riscv +full:- +full:sbi

1 // SPDX-License-Identifier: GPL-2.0
6 * All RISC-V systems have a timer attached to every hart. These timers can
7 * either be read from the "time" and "timeh" CSRs, and can use the SBI to
11 #define pr_fmt(fmt) "riscv-timer: " fmt
22 #include <linux/io-64-nonatomic-lo-hi.h>
26 #include <clocksource/timer-riscv.h>
29 #include <asm/sbi.h>
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()
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()
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()
233 TIMER_OF_DECLARE(riscv_timer, "riscv", riscv_timer_init_dt);
240 riscv_timer_cannot_wake_cpu = rhct->flags & ACPI_RHCT_TIMER_CANNOT_WAKEUP_CPU; in riscv_timer_acpi_init()