20 #include <linux/kernel.h>
32 #define ICTLR_CPU_IEP_VFIQ 0x08
33 #define ICTLR_CPU_IEP_FIR 0x14
34 #define ICTLR_CPU_IEP_FIR_SET 0x18
35 #define ICTLR_CPU_IEP_FIR_CLR 0x1c
37 #define ICTLR_CPU_IER 0x20
38 #define ICTLR_CPU_IER_SET 0x24
39 #define ICTLR_CPU_IER_CLR 0x28
40 #define ICTLR_CPU_IEP_CLASS 0x2C
42 #define ICTLR_COP_IER 0x30
43 #define ICTLR_COP_IER_SET 0x34
44 #define ICTLR_COP_IER_CLR 0x38
45 #define ICTLR_COP_IEP_CLASS 0x3c
47 #define FIRST_LEGACY_IRQ 32
49 static int num_ictlrs;
51 static void __iomem *ictlr_reg_base[] = {
59 static inline void tegra_irq_write_mask(
unsigned int irq,
unsigned long reg)
73 static void tegra_mask(
struct irq_data *
d)
81 static void tegra_unmask(
struct irq_data *d)
89 static void tegra_ack(
struct irq_data *d)
97 static void tegra_eoi(
struct irq_data *d)
105 static int tegra_retrigger(
struct irq_data *d)
123 if (num_ictlrs >
ARRAY_SIZE(ictlr_reg_base)) {
124 WARN(1,
"Too many (%d) interrupt controllers found. Maximum is %d.",
129 for (i = 0; i < num_ictlrs; i++) {
130 void __iomem *ictlr = ictlr_reg_base[
i];
145 if (!of_have_populated_dt())