ipipe can't handle interrupt from ohci-s3c2410 well
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
Quoted 16 lines · Morning
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. */
Quoted 8 lines
...... } 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
Signature · 1 line
Gilles.