Skip to content

Commit 64e0f8b

Browse files
nmenonJason Cooper
authored and
Jason Cooper
committed
irqchip: crossbar: Introduce ti, irqs-skip to skip irqs that bypass crossbar
When, in the system due to varied reasons, interrupts might be unusable due to hardware behavior, but register maps do exist, then those interrupts should be skipped while mapping irq to crossbars. Signed-off-by: Nishanth Menon <[email protected]> Signed-off-by: Sricharan R <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Jason Cooper <[email protected]>
1 parent 6f16fc8 commit 64e0f8b

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Documentation/devicetree/bindings/arm/omap/crossbar.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,17 @@ Required properties:
1717
so crossbar bar driver should not consider them as free
1818
lines.
1919

20+
Optional properties:
21+
- ti,irqs-skip: This is similar to "ti,irqs-reserved", but these are for
22+
SOC-specific hard-wiring of those irqs which unexpectedly bypasses the
23+
crossbar. These irqs have a crossbar register, but still cannot be used.
24+
2025
Examples:
2126
crossbar_mpu: @4a020000 {
2227
compatible = "ti,irq-crossbar";
2328
reg = <0x4a002a48 0x130>;
2429
ti,max-irqs = <160>;
2530
ti,reg-size = <2>;
2631
ti,irqs-reserved = <0 1 2 3 5 6 131 132 139 140>;
32+
ti,irqs-skip = <10 133 139 140>;
2733
};

drivers/irqchip/irq-crossbar.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#define IRQ_FREE -1
2020
#define IRQ_RESERVED -2
21+
#define IRQ_SKIP -3
2122
#define GIC_IRQ_START 32
2223

2324
/*
@@ -160,6 +161,25 @@ static int __init crossbar_of_init(struct device_node *node)
160161
}
161162
}
162163

164+
/* Skip irqs hardwired to bypass the crossbar */
165+
irqsr = of_get_property(node, "ti,irqs-skip", &size);
166+
if (irqsr) {
167+
size /= sizeof(__be32);
168+
169+
for (i = 0; i < size; i++) {
170+
of_property_read_u32_index(node,
171+
"ti,irqs-skip",
172+
i, &entry);
173+
if (entry > max) {
174+
pr_err("Invalid skip entry\n");
175+
ret = -EINVAL;
176+
goto err3;
177+
}
178+
cb->irq_map[entry] = IRQ_SKIP;
179+
}
180+
}
181+
182+
163183
cb->register_offsets = kzalloc(max * sizeof(int), GFP_KERNEL);
164184
if (!cb->register_offsets)
165185
goto err3;

0 commit comments

Comments
 (0)