Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f248ef1c authored by Jonas Bonn's avatar Jonas Bonn
Browse files

openrisc: PIC should act on domain-local irqs



Now that IRQ domains are in use, we should be acting on domain-local
IRQ numbers (hwirq) instead of 'global' ones.

Signed-off-by: default avatarJonas Bonn <jonas@southpole.se>
parent 9b76beb0
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -46,12 +46,12 @@ EXPORT_SYMBOL(arch_local_irq_restore);

static void or1k_pic_mask(struct irq_data *data)
{
	mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->irq));
	mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->hwirq));
}

static void or1k_pic_unmask(struct irq_data *data)
{
	mtspr(SPR_PICMR, mfspr(SPR_PICMR) | (1UL << data->irq));
	mtspr(SPR_PICMR, mfspr(SPR_PICMR) | (1UL << data->hwirq));
}

static void or1k_pic_ack(struct irq_data *data)
@@ -75,10 +75,10 @@ static void or1k_pic_ack(struct irq_data *data)
	 *     as opposed to a 1 as mandated by the spec
	 */

	mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->irq));
	mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq));
#else
	WARN(1, "Interrupt handling possibily broken\n");
	mtspr(SPR_PICSR, (1UL << irq));
	mtspr(SPR_PICSR, (1UL << data->hwirq));
#endif
}

@@ -87,10 +87,10 @@ static void or1k_pic_mask_ack(struct irq_data *data)
	/* Comments for pic_ack apply here, too */

#ifdef CONFIG_OR1K_1200
	mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->irq));
	mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq));
#else
	WARN(1, "Interrupt handling possibily broken\n");
	mtspr(SPR_PICSR, (1UL << irq));
	mtspr(SPR_PICSR, (1UL << data->hwirq));
#endif
}