Esempio n. 1
0
void mx31ads_demux_expio(u32 irq, struct pt_regs *regs)
{
        u32 imr_val;
        u32 int_valid;
        u32 expio_irq;

        imr_val = __raw_readw(PBC_INTMASK_SET_REG);
        int_valid = __raw_readw(PBC_INTSTATUS_REG) & imr_val;

        expio_irq = MXC_EXP_IO_BASE;
        for (; int_valid != 0; int_valid >>= 1, expio_irq++) {
                if ((int_valid & 1) == 0)
                        continue;
                __ipipe_handle_irq(expio_irq, regs);
        }
}
Esempio n. 2
0
/*
 * ipipe_trigger_irq() -- Push the interrupt at front of the pipeline
 * just like if it has been actually received from a hw source. Also
 * works for virtual interrupts.
 */
int ipipe_trigger_irq(unsigned irq)
{
    unsigned long flags;

#ifdef CONFIG_IPIPE_DEBUG
    if (irq >= IPIPE_NR_IRQS ||
            (ipipe_virtual_irq_p(irq)
             && !test_bit(irq - IPIPE_VIRQ_BASE, &__ipipe_virtual_irq_map)))
        return -EINVAL;
#endif

    flags = hard_local_irq_save();
    __ipipe_handle_irq(irq, NULL);
    hard_local_irq_restore(flags);

    return 1;
}
Esempio n. 3
0
/*
 * ipipe_trigger_irq() -- Push the interrupt at front of the pipeline
 * just like if it has been actually received from a hw source. Also
 * works for virtual interrupts.
 */
int ipipe_trigger_irq(unsigned int irq)
{
	struct pt_regs regs;
	unsigned long flags;

#ifdef CONFIG_IPIPE_DEBUG
	if (irq >= IPIPE_NR_IRQS)
		return -EINVAL;
	if (ipipe_virtual_irq_p(irq)) {
		if (!test_bit(irq - IPIPE_VIRQ_BASE,
			      &__ipipe_virtual_irq_map))
			return -EINVAL;
	} else if (irq_to_desc(irq) == NULL)
		return -EINVAL;
#endif
	local_irq_save_hw(flags);
	regs.flags = flags;
	regs.orig_ax = irq;	/* Positive value - IRQ won't be acked */
	regs.cs = __KERNEL_CS;
	__ipipe_handle_irq(&regs);
	local_irq_restore_hw(flags);

	return 1;
}