On second thought, the entire sw_irq_unmask is somewhat strange:

since SW_INT_IRQNO_ENMI == 32 it will never be that the following is reached:

static void sw_irq_unmask(struct irq_data *irqd)
{
        unsigned int irq = irqd->irq;

        if(irq < 32){
                writel(readl(SW_INT_ENABLE_REG0) | (1<<irq), 
SW_INT_ENABLE_REG0);
                writel(readl(SW_INT_MASK_REG0) & ~(1 << irq), SW_INT_MASK_REG0);
                if(irq == SW_INT_IRQNO_ENMI) /* must clear pending bit when 
enabled */ <--- (irq == 32) ?!
                        writel((1 << SW_INT_IRQNO_ENMI), 
SW_INT_IRQ_PENDING_REG0); <--------------------- unreachable
        } else if(irq < 64){
                // It would have to move to here.
                // Probably SW_INT_IRQ_PENDING_REG0 would be 
SW_INT_IRQ_PENDING_REG1 then.

Hmm...

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to