[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] microblaze interrupts



hi
 This also seems to fix a problem with the clock running 2x faster. The
timer is a level interrupt so handling as an edge should be causing 2
interrupts instead of one.
 At the moment I'm not working from TOT so here's the changes I made.

 to: include/asm-microblaze/microblaze_intc.h
/* Test if an IRQ is edge or level sensitive */
#define IRQ_LEVEL_SENSITIVE(irq,IRQ_KINDOFINTR)			\
        (!((1 << irq) & IRQ_KINDOFINTR))

#define IRQ_EDGE_SENSITIVE(irq,IRQ_KINDOFINTR)			\
        (((1 << irq) & IRQ_KINDOFINTR))

 to: arch/microblaze/microblaze_intc.c
void microblaze_intc_end(unsigned irq)
{
  if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
    /* Level sensitive interrupts are acked after handling */
    if(IRQ_LEVEL_SENSITIVE(irq,CONFIG_XILINX_INTC_0_KIND_OF_INTR))
      microblaze_intc_ack_irq(irq);

    microblaze_intc_enable_irq(irq);
  }
}


On Thu, 2005-09-29 at 21:34, John Williams wrote:
> Hi George,
> 
> George Smith wrote:
> 
> >  Seems that the macro's in microblaze_intc.h are incorrect:
> [snip]
> 
>  > Also the interrupt end routine:
> > 
> [snip]
> 
> >  Shouldn't one ack the existing interrupt before enabling the irq's
> > again. 
> >  Thoughts???
> 
> I think you are onto something here.  I've just had an email exchange on
> this same matter with someone soon to pop up on the list.  Between the
> two of you it seems that this problem might be licked once and for all.
> 
> Can I ask that you combine your efforts to produce a patch against
> current CVS head, so we can distribute it for testing?
> 
> Thanks for your efforts, it's greatly appreciated.
> 
> Regards,
> 
> John
> 
> 
> 
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@itee.uq.edu.au
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
-- 
George Smith
VP Engineering
Linear Acoustic, Inc

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/