Thank you for your suggestion ! The related code in s3c24xx_init_irq() was as
followed :
switch (irqno) {
/* deal with the special IRQs (cascaded) */
case IRQ_EINT4t7:
case IRQ_EINT8t23:
case IRQ_UART0:
case IRQ_UART1:
case IRQ_UART2:
case IRQ_ADCPARENT:
set_irq_chip(irqno, &s3c_irq_level_chip);
set_irq_handler(irqno, handle_level_irq);
break;
case IRQ_RESERVED6:
case IRQ_RESERVED24:
/* no IRQ here */
break;
default:
//irqdbf("registering irq %d (s3c irq)\n", irqno);
set_irq_chip(irqno, &s3c_irq_chip);
set_irq_handler(irqno, handle_edge_irq);
set_irq_flags(irqno, IRQF_VALID);
Should I just add a case IRQ_USBH before set_irq_chip(irqno,
&s3c_irq_level_chip) so the code was like :
case IRQ_UART2:
case IRQ_ADCPARENT:
case IRQ_USBH:
set_irq_chip(irqno, &s3c_irq_level_chip);
set_irq_handler(irqno, handle_level_irq);
break;
Or should I only changed the set_irq_handler and the code was like :
break;
case IRQ_USBH:
set_irq_chip(irqno, &s3c_irq_chip);
set_irq_handler(irqno, handle_edge_irq);
set_irq_flags(irqno, IRQF_VALID);
break;
Thank you for reading this message , I really appreciate your answer!
GongChen
------------------ ???????? ------------------
??????: "Gilles Chanteperdrix"<[email protected]>;
????????: 2012??9??14??(??????) ????1:03
??????: "Morning"<[email protected]>;
????: "xenomai"<[email protected]>;
????: Re: [Xenomai] ipipe can't handle interrupt from ohci-s3c2410 well
On 09/13/2012 06:57 PM, Morning wrote:
> Hello,I use linux kernel 2.6.33 and xenomai 2.5.3 to build my
> rt-embedded system based on S3c2440,but i found the ipipe can't
> handle interrupt from the usb host controller well .I tried
> adeos-ipipe-2.6.33-arm-1.16-01.patch which xenomai contains and
> adeos-ipipe-2.6.33-arm-1.18-03.patch which is the newest patch for
> kernel 2.6.33, but both didn't work. I traced the code and found that
> the ipipe can handle the first few interrupts from ohci well but from
> then on the interrupts start to destroy the system as ohci interrputs
> the system over and over again .The system didn't crash but was busy
> handling the interrupts and couldn't respond to anything else. I
> found that the interrupts from ohci can't be handled because the root
> domain is always stalled as it failed the test below all the time :
> void __ipipe_walk_pipeline(struct list_head *pos){ ...... if
> (test_bit(IPIPE_STALL_FLAG, &np->status)) break; /* Stalled stage --
> do not go further. */
>
> ...... } I also found that the interrupt source on ohci was not
> cleared as I found that there was no use clearing the USBH bit on
> INTPND and SRCPND regs . The ipipe handled level interrupt with ack
> and mask but handled edge interrupt with only ack , so how did ipipe
> work when it was handling an edge interrupt and another edge
> interrupt came at the same time ? Was it the reason of ohci kept
> interrupting S3C2440 over and over again? Thank you for reading this
> message , I really appreciate your answer . GongChen
Have you tried the suggestion at the end of this paragraph?
http://www.xenomai.org/index.php/I-pipe-core:ArmPorting#flow_handler
--
Gilles.
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai