Skip to content

Commit

Permalink
arm: omap: irq: introduce omap_nr_pending
Browse files Browse the repository at this point in the history
that variable will tell us how many INTC_PENDING_IRQn
registers we have. It'll be used on a following patch
to cleanup omap_intc_handle_irq() a bit.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Felipe Balbi authored and Tony Lindgren committed Sep 11, 2014
1 parent a74f0a1 commit 52b1e12
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion arch/arm/mach-omap2/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ static struct omap_intc_regs intc_context;

static struct irq_domain *domain;
static void __iomem *omap_irq_base;
static int omap_nr_pending = 3;
static int omap_nr_irqs = 96;

/* INTC bank register get/set */
Expand Down Expand Up @@ -276,20 +277,23 @@ omap_intc_handle_irq(struct pt_regs *regs)
void __init omap2_init_irq(void)
{
omap_nr_irqs = 96;
omap_nr_pending = 3;
omap_init_irq(OMAP24XX_IC_BASE, NULL);
set_handle_irq(omap_intc_handle_irq);
}

void __init omap3_init_irq(void)
{
omap_nr_irqs = 96;
omap_nr_pending = 3;
omap_init_irq(OMAP34XX_IC_BASE, NULL);
set_handle_irq(omap_intc_handle_irq);
}

void __init ti81xx_init_irq(void)
{
omap_nr_irqs = 96;
omap_nr_pending = 4;
omap_init_irq(OMAP34XX_IC_BASE, NULL);
set_handle_irq(omap_intc_handle_irq);
}
Expand All @@ -299,6 +303,7 @@ static int __init intc_of_init(struct device_node *node,
{
struct resource res;

omap_nr_pending = 3;
omap_nr_irqs = 96;

if (WARN_ON(!node))
Expand All @@ -309,8 +314,10 @@ static int __init intc_of_init(struct device_node *node,
return -EINVAL;
}

if (of_device_is_compatible(node, "ti,am33xx-intc"))
if (of_device_is_compatible(node, "ti,am33xx-intc")) {
omap_nr_irqs = 128;
omap_nr_pending = 4;
}

omap_init_irq(res.start, of_node_get(node));

Expand Down

0 comments on commit 52b1e12

Please sign in to comment.