Lines Matching +full:- +full:clint
1 // SPDX-License-Identifier: GPL-2.0
4 * Copyright (C) 2017-2018 SiFive
8 #define pr_fmt(fmt) "riscv-intc: " fmt
29 unsigned long cause = regs->cause & ~CAUSE_IRQ_FLAG; in riscv_intc_irq()
36 * On RISC-V systems local interrupts are masked or unmasked by writing
44 csr_clear(CSR_IE, BIT(d->hwirq)); in riscv_intc_irq_mask()
49 csr_set(CSR_IE, BIT(d->hwirq)); in riscv_intc_irq_unmask()
55 * Andes specific S-mode local interrupt causes (hwirq) in andes_intc_irq_mask()
56 * are defined as (256 + n) and controlled by n-th bit in andes_intc_irq_mask()
59 unsigned int mask = BIT(d->hwirq % BITS_PER_LONG); in andes_intc_irq_mask()
61 if (d->hwirq < ANDES_SLI_CAUSE_BASE) in andes_intc_irq_mask()
69 unsigned int mask = BIT(d->hwirq % BITS_PER_LONG); in andes_intc_irq_unmask()
71 if (d->hwirq < ANDES_SLI_CAUSE_BASE) in andes_intc_irq_unmask()
80 * The RISC-V INTC driver uses handle_percpu_devid_irq() flow in riscv_intc_irq_eoi()
81 * for the per-HART local interrupts and child irqchip drivers in riscv_intc_irq_eoi()
82 * (such as PLIC, SBI IPI, CLINT, APLIC, IMSIC, etc) implement in riscv_intc_irq_eoi()
83 * chained handlers for the per-HART local interrupts. in riscv_intc_irq_eoi()
87 * will do unnecessary mask/unmask of per-HART local interrupts in riscv_intc_irq_eoi()
89 * an empty irq_eoi() callback for RISC-V INTC irqchip. in riscv_intc_irq_eoi()
94 .name = "RISC-V INTC",
101 .name = "RISC-V INTC",
110 struct irq_chip *chip = d->host_data; in riscv_intc_domain_map()
138 return -EINVAL; in riscv_intc_domain_alloc()
157 return intc_domain->fwnode; in riscv_intc_hwnode()
168 return -ENXIO; in riscv_intc_init_common()
211 * direct-mode) so we should mark an INTC node as initialized in riscv_intc_init()
218 if (of_device_is_compatible(node, "andestech,cpu-intc")) { in riscv_intc_init()
227 IRQCHIP_DECLARE(riscv, "riscv,cpu-intc", riscv_intc_init);
228 IRQCHIP_DECLARE(andes, "andestech,cpu-intc", riscv_intc_init);
247 if (riscv_hartid_to_cpuid(rintc->hart_id) != smp_processor_id()) in riscv_intc_acpi_init()
250 fn = irq_domain_alloc_named_fwnode("RISCV-INTC"); in riscv_intc_acpi_init()
253 return -ENOMEM; in riscv_intc_acpi_init()