All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] gpio irq always set to level sensitive with Xenomai on Blackfin
@ 2011-08-30  8:40 realmz6
  2011-08-30 10:07 ` [Xenomai-help] [Adeos-main] " Philippe Gerum
  0 siblings, 1 reply; 4+ messages in thread
From: realmz6 @ 2011-08-30  8:40 UTC (permalink / raw)
  To: xenomai, uclinux-dist-devel, adeos-main

Hi Guys,

in adeos patch bfin_set_irq_handler(), this will set irq handle to
handle_level_irq even it is a edge gpio irq, is it true?

 #ifdef CONFIG_IPIPE
-       _set_irq_handler(irq, handle_level_irq);
-#else
-       struct irq_desc *desc = irq_desc + irq;
+       handle = __fixup_irq_handler(desc, handle_level_irq, 0);
+#endif

should it like the follows, it just fixup original handle and will not
always set it to handle_level_irq.

#ifdef CONFIG_IPIPE
-       _set_irq_handler(irq, handle_level_irq);
-#else
-       struct irq_desc *desc = irq_desc + irq;
+       handle = __fixup_irq_handler(desc, handle, 0);
+#endif

-steven


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai-help] [Adeos-main] gpio irq always set to level sensitive with Xenomai on Blackfin
  2011-08-30  8:40 [Xenomai-help] gpio irq always set to level sensitive with Xenomai on Blackfin realmz6
@ 2011-08-30 10:07 ` Philippe Gerum
  2011-08-30 10:59   ` realmz6
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Gerum @ 2011-08-30 10:07 UTC (permalink / raw)
  To: realmz6; +Cc: xenomai, adeos-main, uclinux-dist-devel

On Tue, 2011-08-30 at 16:40 +0800, realmz6 wrote:
> Hi Guys,
> 
> in adeos patch bfin_set_irq_handler(), this will set irq handle to
> handle_level_irq even it is a edge gpio irq, is it true?
> 
>  #ifdef CONFIG_IPIPE
> -       _set_irq_handler(irq, handle_level_irq);
> -#else
> -       struct irq_desc *desc = irq_desc + irq;
> +       handle = __fixup_irq_handler(desc, handle_level_irq, 0);
> +#endif
> 
> should it like the follows, it just fixup original handle and will not
> always set it to handle_level_irq.

No, this code is correct Adeos-wise. See there for an explanation, and a
pending fix for a related issue:
https://mail.gna.org/public/xenomai-help/2011-08/msg00081.html

> 
> #ifdef CONFIG_IPIPE
> -       _set_irq_handler(irq, handle_level_irq);
> -#else
> -       struct irq_desc *desc = irq_desc + irq;
> +       handle = __fixup_irq_handler(desc, handle, 0);
> +#endif
> 
> -steven
> 
> _______________________________________________
> Adeos-main mailing list
> Adeos-main@domain.hid
> https://mail.gna.org/listinfo/adeos-main

-- 
Philippe.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai-help] [Adeos-main] gpio irq always set to level sensitive with Xenomai on Blackfin
  2011-08-30 10:07 ` [Xenomai-help] [Adeos-main] " Philippe Gerum
@ 2011-08-30 10:59   ` realmz6
  2011-09-01  1:38     ` realmz6
  0 siblings, 1 reply; 4+ messages in thread
From: realmz6 @ 2011-08-30 10:59 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai, adeos-main, uclinux-dist-devel

Hi Philippe,

Thanks for your quick response. I have a few questions.

On Tue, Aug 30, 2011 at 6:07 PM, Philippe Gerum <rpm@xenomai.org> wrote:
> On Tue, 2011-08-30 at 16:40 +0800, realmz6 wrote:
>> Hi Guys,
>>
>> in adeos patch bfin_set_irq_handler(), this will set irq handle to
>> handle_level_irq even it is a edge gpio irq, is it true?
>>
>>  #ifdef CONFIG_IPIPE
>> -       _set_irq_handler(irq, handle_level_irq);
>> -#else
>> -       struct irq_desc *desc = irq_desc + irq;
>> +       handle = __fixup_irq_handler(desc, handle_level_irq, 0);
>> +#endif
>>
>> should it like the follows, it just fixup original handle and will not
>> always set it to handle_level_irq.
>
> No, this code is correct Adeos-wise. See there for an explanation, and a
> pending fix for a related issue:
> https://mail.gna.org/public/xenomai-help/2011-08/msg00081.html
why adeos is designed to use handle_level_irq for all interrupts even
it is a edge interrupt in hardware?
you means it should be fixed in the ipipe fixup_handler for
handle_level_irq to deal with a edge interrupt.
on blackfin edge irq need a ack to clear sticky but level irq needn't,
if i fixed it in ipipe_ack_level_irq maybe
the level irq will be broken.

>
>>
>> #ifdef CONFIG_IPIPE
>> -       _set_irq_handler(irq, handle_level_irq);
>> -#else
>> -       struct irq_desc *desc = irq_desc + irq;
>> +       handle = __fixup_irq_handler(desc, handle, 0);
>> +#endif
>>
>> -steven
>>
>> _______________________________________________
>> Adeos-main mailing list
>> Adeos-main@domain.hid
>> https://mail.gna.org/listinfo/adeos-main
>
> --
> Philippe.
>
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai-help] [Adeos-main] gpio irq always set to level sensitive with Xenomai on Blackfin
  2011-08-30 10:59   ` realmz6
@ 2011-09-01  1:38     ` realmz6
  0 siblings, 0 replies; 4+ messages in thread
From: realmz6 @ 2011-09-01  1:38 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai, adeos-main, uclinux-dist-devel

any update?

On Tue, Aug 30, 2011 at 6:59 PM, realmz6 <realmz6@domain.hid> wrote:
> Hi Philippe,
>
> Thanks for your quick response. I have a few questions.
>
> On Tue, Aug 30, 2011 at 6:07 PM, Philippe Gerum <rpm@xenomai.org> wrote:
>> On Tue, 2011-08-30 at 16:40 +0800, realmz6 wrote:
>>> Hi Guys,
>>>
>>> in adeos patch bfin_set_irq_handler(), this will set irq handle to
>>> handle_level_irq even it is a edge gpio irq, is it true?
>>>
>>>  #ifdef CONFIG_IPIPE
>>> -       _set_irq_handler(irq, handle_level_irq);
>>> -#else
>>> -       struct irq_desc *desc = irq_desc + irq;
>>> +       handle = __fixup_irq_handler(desc, handle_level_irq, 0);
>>> +#endif
>>>
>>> should it like the follows, it just fixup original handle and will not
>>> always set it to handle_level_irq.
>>
>> No, this code is correct Adeos-wise. See there for an explanation, and a
>> pending fix for a related issue:
>> https://mail.gna.org/public/xenomai-help/2011-08/msg00081.html
> why adeos is designed to use handle_level_irq for all interrupts even
> it is a edge interrupt in hardware?
> you means it should be fixed in the ipipe fixup_handler for
> handle_level_irq to deal with a edge interrupt.
> on blackfin edge irq need a ack to clear sticky but level irq needn't,
> if i fixed it in ipipe_ack_level_irq maybe
> the level irq will be broken.
>
>>
>>>
>>> #ifdef CONFIG_IPIPE
>>> -       _set_irq_handler(irq, handle_level_irq);
>>> -#else
>>> -       struct irq_desc *desc = irq_desc + irq;
>>> +       handle = __fixup_irq_handler(desc, handle, 0);
>>> +#endif
>>>
>>> -steven
>>>
>>> _______________________________________________
>>> Adeos-main mailing list
>>> Adeos-main@domain.hid
>>> https://mail.gna.org/listinfo/adeos-main
>>
>> --
>> Philippe.
>>
>>
>>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-01  1:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-30  8:40 [Xenomai-help] gpio irq always set to level sensitive with Xenomai on Blackfin realmz6
2011-08-30 10:07 ` [Xenomai-help] [Adeos-main] " Philippe Gerum
2011-08-30 10:59   ` realmz6
2011-09-01  1:38     ` realmz6

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.