16 #include <linux/kernel.h>
17 #include <linux/module.h>
26 #include <asm/exception.h>
29 #define ARMADA_370_XP_INT_SET_MASK_OFFS (0x48)
30 #define ARMADA_370_XP_INT_CLEAR_MASK_OFFS (0x4C)
32 #define ARMADA_370_XP_INT_CONTROL (0x00)
33 #define ARMADA_370_XP_INT_SET_ENABLE_OFFS (0x30)
34 #define ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS (0x34)
36 #define ARMADA_370_XP_CPU_INTACK_OFFS (0x44)
38 static void __iomem *per_cpu_int_base;
39 static void __iomem *main_int_base;
40 static struct irq_domain *armada_370_xp_mpic_domain;
42 static void armada_370_xp_irq_mask(
struct irq_data *
d)
48 static void armada_370_xp_irq_unmask(
struct irq_data *
d)
54 static struct irq_chip armada_370_xp_irq_chip = {
55 .name =
"armada_370_xp_irq",
56 .irq_mask = armada_370_xp_irq_mask,
57 .irq_mask_ack = armada_370_xp_irq_mask,
58 .irq_unmask = armada_370_xp_irq_unmask,
61 static int armada_370_xp_mpic_irq_map(
struct irq_domain *
h,
67 irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip,
76 .map = armada_370_xp_mpic_irq_map,
86 per_cpu_int_base =
of_iomap(node, 1);
93 armada_370_xp_mpic_domain =
95 &armada_370_xp_mpic_irq_ops,
NULL);
97 if (!armada_370_xp_mpic_domain)
98 panic(
"Unable to add Armada_370_Xp MPIC irq domain (DT)\n");
112 irqnr = irqstat & 0x3FF;
126 {.compatible =
"marvell,mpic", .data = armada_370_xp_mpic_of_init},