[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] why intr->ack() is null?
At Wed, 02 Jun 2004 16:30:21 +1000,
John Williams wrote:
>
> John Williams wrote:
> >
> > I looked at the V2Pro/PPC source as well, and their driver for the
> > XINTC, and it shows the same uncertainty about the behaviour of the
> > XINTC. Their source is available (via bitkeeper) from penguinppc.org. I
> > can send you the specific source file if you want to look into it.
> >
>
> I just checked again, they've updated the source. Grab the PPC
> xilinx_intc driver into your current working dir with this command:
>
> rsync -avz --delete
> source.mvista.com::linuxppc_2_4_devel/arch/ppc/kernel/xilinx_pic.c .
>
> and see what they've done. Basically if it's a level sensitive
> interrupt they ack after, else they ack immediately. Smells like a hack
> to me.
ok here is the portion of it (just as a record):
static void
xilinx_intc_disable_and_ack(unsigned int irq)
{
unsigned long mask = (0x80000000 >> (irq & 31));
// printk(KERN_INFO "disable_and_ack: %d\n", irq);
intc_out_be32(intc + CIE, mask);
if (xilinx_intc_kind_of_intr(mask) != 0)
intc_out_be32(intc + IAR, mask); /* ack edge triggered intr */
}
static void
xilinx_intc_end(unsigned int irq)
{
unsigned long mask = (0x80000000 >> (irq & 31));
// printk(KERN_INFO "end: %d\n", irq);
if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
intc_out_be32(intc + SIE, mask);
/* ack level sensitive intr */
if(xilinx_intc_kind_of_intr(mask) == 0)
intc_out_be32(intc + IAR, mask);
}
}
as you said, this smells like a hack. I'll pound my head a bit more
about this ;)
Thanks for the info, John.
regards,
--
yashi
___________________________
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/