Lines Matching +full:rc +full:- +full:map +full:- +full:name

1 // SPDX-License-Identifier: GPL-2.0
5 * Most of the M-mode (i.e. NoMMU) RISC-V systems usually have a
18 #include <linux/io-64-nonatomic-lo-hi.h>
35 /* CLINT manages IPI and Timer for RISC-V M-mode */
104 .name = "clint_clocksource",
123 .name = "clint_clockevent",
133 ce->cpumask = cpumask_of(cpu); in clint_timer_starting_cpu()
149 * via generic IPI-Mux in clint_timer_dying_cpu()
159 evdev->event_handler(evdev); in clint_timer_interrupt()
166 int rc; in clint_timer_init_dt() local
187 return -ENODEV; in clint_timer_init_dt()
190 /* Find parent irq domain and map ipi irq */ in clint_timer_init_dt()
196 /* Find parent irq domain and map timer irq */ in clint_timer_init_dt()
206 return -ENODEV; in clint_timer_init_dt()
211 pr_err("%pOFP: could not map registers\n", np); in clint_timer_init_dt()
212 return -ENODEV; in clint_timer_init_dt()
230 rc = clocksource_register_hz(&clint_clocksource, clint_timer_freq); in clint_timer_init_dt()
231 if (rc) { in clint_timer_init_dt()
232 pr_err("%pOFP: clocksource register failed [%d]\n", np, rc); in clint_timer_init_dt()
238 rc = request_percpu_irq(clint_timer_irq, clint_timer_interrupt, in clint_timer_init_dt()
239 "clint-timer", &clint_clock_event); in clint_timer_init_dt()
240 if (rc) { in clint_timer_init_dt()
241 pr_err("registering percpu irq failed [%d]\n", rc); in clint_timer_init_dt()
246 rc = ipi_mux_create(BITS_PER_BYTE, clint_send_ipi); in clint_timer_init_dt()
247 if (rc <= 0) { in clint_timer_init_dt()
249 rc = (rc < 0) ? rc : -ENODEV; in clint_timer_init_dt()
254 riscv_ipi_set_virq_range(rc, BITS_PER_BYTE); in clint_timer_init_dt()
258 rc = cpuhp_setup_state(CPUHP_AP_CLINT_TIMER_STARTING, in clint_timer_init_dt()
262 if (rc) { in clint_timer_init_dt()
263 pr_err("%pOFP: cpuhp setup state failed [%d]\n", np, rc); in clint_timer_init_dt()
273 return rc; in clint_timer_init_dt()