Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332225
b: refs/heads/master
c: c2c9c78
h: refs/heads/master
i:
  332223: 1dd6d3f
v: v3
  • Loading branch information
John Crispin committed Aug 22, 2012
1 parent e56fb2b commit 79a4337
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61fa969f27ec58296544bf94d058f3aa704cb8d9
refs/heads/master: c2c9c788b91218bccbb9ac31539ffa577fe502bf
19 changes: 16 additions & 3 deletions trunk/arch/mips/lantiq/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ static unsigned short ltq_eiu_irq[MAX_EIU] = {
static int exin_avail;
static void __iomem *ltq_icu_membase[MAX_IM];
static void __iomem *ltq_eiu_membase;
static struct irq_domain *ltq_domain;

void ltq_disable_irq(struct irq_data *d)
{
Expand Down Expand Up @@ -219,10 +220,14 @@ DEFINE_HWx_IRQDISPATCH(2)
DEFINE_HWx_IRQDISPATCH(3)
DEFINE_HWx_IRQDISPATCH(4)

#if MIPS_CPU_TIMER_IRQ == 7
static void ltq_hw5_irqdispatch(void)
{
do_IRQ(MIPS_CPU_TIMER_IRQ);
}
#else
DEFINE_HWx_IRQDISPATCH(5)
#endif

#ifdef CONFIG_MIPS_MT_SMP
void __init arch_init_ipiirq(int irq, struct irqaction *action)
Expand Down Expand Up @@ -270,7 +275,7 @@ asmlinkage void plat_irq_dispatch(void)
unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
unsigned int i;

if (pending & CAUSEF_IP7) {
if ((MIPS_CPU_TIMER_IRQ == 7) && (pending & CAUSEF_IP7)) {
do_IRQ(MIPS_CPU_TIMER_IRQ);
goto out;
} else {
Expand Down Expand Up @@ -376,7 +381,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)
set_vi_handler(7, ltq_hw5_irqdispatch);
}

irq_domain_add_linear(node,
ltq_domain = irq_domain_add_linear(node,
(MAX_IM * INT_NUM_IM_OFFSET) + MIPS_CPU_IRQ_CASCADE,
&irq_domain_ops, 0);

Expand All @@ -401,12 +406,20 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)

/* tell oprofile which irq to use */
cp0_perfcount_irq = LTQ_PERF_IRQ;

/*
* if the timer irq is not one of the mips irqs we need to
* create a mapping
*/
if (MIPS_CPU_TIMER_IRQ != 7)
irq_create_mapping(ltq_domain, MIPS_CPU_TIMER_IRQ);

return 0;
}

unsigned int __cpuinit get_c0_compare_int(void)
{
return CP0_LEGACY_COMPARE_IRQ;
return MIPS_CPU_TIMER_IRQ;
}

static struct of_device_id __initdata of_irq_ids[] = {
Expand Down

0 comments on commit 79a4337

Please sign in to comment.