Exemplo n.º 1
0
void __init pnx4008_init_irq(void)
{
	unsigned int i;

	/* configure IRQ's */
	for (i = 0; i < NR_IRQS; i++) {
		set_irq_flags(i, IRQF_VALID);
		irq_set_chip(i, &pnx4008_irq_chip);
		pnx4008_set_irq_type(irq_get_irq_data(i), pnx4008_irq_type[i]);
	}

	/* configure and enable IRQ 0,1,30,31 (cascade interrupts) */
	pnx4008_set_irq_type(irq_get_irq_data(SUB1_IRQ_N),
			     pnx4008_irq_type[SUB1_IRQ_N]);
	pnx4008_set_irq_type(irq_get_irq_data(SUB2_IRQ_N),
			     pnx4008_irq_type[SUB2_IRQ_N]);
	pnx4008_set_irq_type(irq_get_irq_data(SUB1_FIQ_N),
			     pnx4008_irq_type[SUB1_FIQ_N]);
	pnx4008_set_irq_type(irq_get_irq_data(SUB2_FIQ_N),
			     pnx4008_irq_type[SUB2_FIQ_N]);

	/* mask all others */
	__raw_writel((1 << SUB2_FIQ_N) | (1 << SUB1_FIQ_N) |
			(1 << SUB2_IRQ_N) | (1 << SUB1_IRQ_N),
		INTC_ER(MAIN_BASE_INT));
	__raw_writel(0, INTC_ER(SIC1_BASE_INT));
	__raw_writel(0, INTC_ER(SIC2_BASE_INT));
}
Exemplo n.º 2
0
static void pnx4008_mask_ack_irq(struct irq_data *d)
{
	__raw_writel(__raw_readl(INTC_ER(d->irq)) & ~INTC_BIT(d->irq), INTC_ER(d->irq));	/* mask interrupt */
	__raw_writel(INTC_BIT(d->irq), INTC_SR(d->irq));	/* clear interrupt status */
}
Exemplo n.º 3
0
static void pnx4008_mask_ack_irq(unsigned int irq)
{
	__raw_writel(__raw_readl(INTC_ER(irq)) & ~INTC_BIT(irq), INTC_ER(irq));	/* mask interrupt */
	__raw_writel(INTC_BIT(irq), INTC_SR(irq));	/* clear interrupt status */
}
Exemplo n.º 4
0
static void pnx4008_unmask_irq(struct irq_data *d)
{
	__raw_writel(__raw_readl(INTC_ER(d->irq)) | INTC_BIT(d->irq), INTC_ER(d->irq));	/* unmask interrupt */
}
Exemplo n.º 5
0
static void pnx4008_unmask_irq(unsigned int irq)
{
	__raw_writel(__raw_readl(INTC_ER(irq)) | INTC_BIT(irq), INTC_ER(irq));	/* unmask interrupt */
}