Merge branch irq/loongarch-of into irq/irqchip-next
authorMarc Zyngier <maz@kernel.org>
Mon, 5 Dec 2022 10:45:11 +0000 (10:45 +0000)
committerMarc Zyngier <maz@kernel.org>
Mon, 5 Dec 2022 10:45:11 +0000 (10:45 +0000)
* 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>
1  2 
drivers/irqchip/irq-loongarch-cpu.c

index fdec3e9cfacfb5dbd151d6fee31b33712f41c168,738d69c4d4a33b98d28e6f8704995f09f8faa64d..9d8f2c40604310d6d92fdea667c2ea0322ece015
@@@ -92,8 -92,27 +92,26 @@@ static const struct irq_domain_ops loon
        .xlate = irq_domain_xlate_onecell,
  };
  
 -static int __init
 -liointc_parse_madt(union acpi_subtable_headers *header,
 -                     const unsigned long end)
+ #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)
  {
        struct acpi_madt_lio_pic *liointc_entry = (struct acpi_madt_lio_pic *)header;