-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
irqchip/riscv-intc: Introduce Andes hart-level interrupt controller
Add support for the Andes hart-level interrupt controller. This controller provides interrupt mask/unmask functions to access the custom register (SLIE) where the non-standard S-mode local interrupt enable bits are located. The base of custom interrupt number is set to 256. To share the riscv_intc_domain_map() with the generic RISC-V INTC and ACPI, add a chip parameter to riscv_intc_init_common(), so it can be passed to the irq_domain_set_info() as a private data. Andes hart-level interrupt controller requires the "andestech,cpu-intc" compatible string to be present in interrupt-controller of cpu node to enable the use of custom local interrupt source. e.g., cpu0: cpu@0 { compatible = "andestech,ax45mp", "riscv"; ... cpu0-intc: interrupt-controller { #interrupt-cells = <0x01>; compatible = "andestech,cpu-intc", "riscv,cpu-intc"; interrupt-controller; }; }; Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Randolph <randolph@andestech.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20240222083946.3977135-4-peterlin@andestech.com
- Loading branch information
Yu Chien Peter Lin
authored and
Thomas Gleixner
committed
Feb 23, 2024
1 parent
96303bc
commit f4cc33e
Showing
2 changed files
with
69 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
/* | ||
* Copyright (C) 2023 Andes Technology Corporation | ||
*/ | ||
#ifndef __ANDES_IRQ_H | ||
#define __ANDES_IRQ_H | ||
|
||
/* Andes PMU irq number */ | ||
#define ANDES_RV_IRQ_PMOVI 18 | ||
#define ANDES_RV_IRQ_LAST ANDES_RV_IRQ_PMOVI | ||
#define ANDES_SLI_CAUSE_BASE 256 | ||
|
||
/* Andes PMU related registers */ | ||
#define ANDES_CSR_SLIE 0x9c4 | ||
#define ANDES_CSR_SLIP 0x9c5 | ||
#define ANDES_CSR_SCOUNTEROF 0x9d4 | ||
|
||
#endif /* __ANDES_IRQ_H */ |