Commit 1d50d2ce authored by Nishanth Menon's avatar Nishanth Menon Committed by Jason Cooper

irqchip: crossbar: Dont use '0' to mark reserved interrupts

Today '0' is actually reserved, but may not be the same in the future.

So, use a flag to mark the GIC interrupts that are reserved.
Signed-off-by: default avatarNishanth Menon <nm@ti.com>
Signed-off-by: default avatarSricharan R <r.sricharan@ti.com>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Link: https://lkml.kernel.org/r/1403766634-18543-2-git-send-email-r.sricharan@ti.comSigned-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent 7171511e
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#define IRQ_FREE -1 #define IRQ_FREE -1
#define IRQ_RESERVED -2
#define GIC_IRQ_START 32 #define GIC_IRQ_START 32
/* /*
...@@ -139,7 +140,7 @@ static int __init crossbar_of_init(struct device_node *node) ...@@ -139,7 +140,7 @@ static int __init crossbar_of_init(struct device_node *node)
pr_err("Invalid reserved entry\n"); pr_err("Invalid reserved entry\n");
goto err3; goto err3;
} }
cb->irq_map[entry] = 0; cb->irq_map[entry] = IRQ_RESERVED;
} }
} }
...@@ -170,7 +171,7 @@ static int __init crossbar_of_init(struct device_node *node) ...@@ -170,7 +171,7 @@ static int __init crossbar_of_init(struct device_node *node)
* reserved irqs. so find and store the offsets once. * reserved irqs. so find and store the offsets once.
*/ */
for (i = 0; i < max; i++) { for (i = 0; i < max; i++) {
if (!cb->irq_map[i]) if (cb->irq_map[i] == IRQ_RESERVED)
continue; continue;
cb->register_offsets[i] = reserved; cb->register_offsets[i] = reserved;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment