summaryrefslogtreecommitdiff
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2022-12-05 13:45:11 +0300
committerMarc Zyngier <maz@kernel.org>2022-12-05 13:45:11 +0300
commitdc7f1c295f829c0dd40fed8e799a37a05bec6892 (patch)
tree2abd72abfec2273a49f8d90f22df670d25e99f59 /drivers/irqchip
parent63ab33c08c41130ad82155515803e90d0e71e8ef (diff)
parent065abd13a63f40318162eeca6c0215fc5cbb9b0a (diff)
downloadlinux-dc7f1c295f829c0dd40fed8e799a37a05bec6892.tar.xz
Merge branch irq/loongarch-of into irq/irqchip-next
* irq/loongarch-of: : . : Initial OF support for LoongArch. Funny how it only took : *one* release from plumbing ACPI into an unsuspecting : architecture to start enabling OF on it. Oh well... : . irqchip/loongarch-cpu: Fix a missing prototype warning dt-bindings: interrupt-controller: add yaml for LoongArch CPU interrupt controller irqchip: loongarch-cpu: add DT support Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-loongarch-cpu.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-loongarch-cpu.c b/drivers/irqchip/irq-loongarch-cpu.c
index fdec3e9cfacf..9d8f2c406043 100644
--- a/drivers/irqchip/irq-loongarch-cpu.c
+++ b/drivers/irqchip/irq-loongarch-cpu.c
@@ -92,6 +92,24 @@ static const struct irq_domain_ops loongarch_cpu_intc_irq_domain_ops = {
.xlate = irq_domain_xlate_onecell,
};
+#ifdef CONFIG_OF
+static int __init cpuintc_of_init(struct device_node *of_node,
+ struct device_node *parent)
+{
+ cpuintc_handle = of_node_to_fwnode(of_node);
+
+ irq_domain = irq_domain_create_linear(cpuintc_handle, EXCCODE_INT_NUM,
+ &loongarch_cpu_intc_irq_domain_ops, NULL);
+ if (!irq_domain)
+ panic("Failed to add irqdomain for loongarch CPU");
+
+ set_handle_irq(&handle_cpu_irq);
+
+ return 0;
+}
+IRQCHIP_DECLARE(cpu_intc, "loongson,cpu-interrupt-controller", cpuintc_of_init);
+#endif
+
static int __init liointc_parse_madt(union acpi_subtable_headers *header,
const unsigned long end)
{