Commit 421b090c authored by Felipe Balbi's avatar Felipe Balbi Committed by Tony Lindgren

arm: omap: irq: add a global omap_nr_irqs variable

this will cache number of irqs. Also in preparation
for removal of irq_banks array.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 71be00c9
......@@ -70,6 +70,7 @@ static struct omap_irq_bank {
static struct irq_domain *domain;
static void __iomem *omap_irq_base;
static int omap_nr_irqs = 96;
/* Structure to save interrupt controller context */
struct omap3_intc_regs {
......@@ -170,6 +171,8 @@ static void __init omap_init_irq(u32 base, int nr_irqs,
if (WARN_ON(!omap_irq_base))
return;
omap_nr_irqs = nr_irqs;
irq_base = irq_alloc_descs(-1, 0, nr_irqs, 0);
if (irq_base < 0) {
pr_warn("Couldn't allocate IRQ numbers\n");
......
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