* [Xenomai-help] IRQ reservation and config
@ 2009-02-03 17:40 Mike McTernan
2009-02-03 17:46 ` Philippe Gerum
0 siblings, 1 reply; 6+ messages in thread
From: Mike McTernan @ 2009-02-03 17:40 UTC (permalink / raw)
To: xenomai
Hi,
I'm porting a simple driver to be under the Xenomai. RTDM The driver
simply blocks on read calls until an interrupt arrives, and returns a
count. This is on Blackfin uClinux.
I think I've understood how to make the driver, the only thing I'm
missing is how to reserve and configure the irq source.
Should I be using the standard Linux request_irq() to do this in the
RTDM prior to calling rtdm_irq_request()?
Regards,
Mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] IRQ reservation and config
2009-02-03 17:40 [Xenomai-help] IRQ reservation and config Mike McTernan
@ 2009-02-03 17:46 ` Philippe Gerum
2009-02-03 17:49 ` Mike McTernan
0 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2009-02-03 17:46 UTC (permalink / raw)
To: Mike McTernan; +Cc: xenomai
Mike McTernan wrote:
> Hi,
>
> I'm porting a simple driver to be under the Xenomai. RTDM The driver
> simply blocks on read calls until an interrupt arrives, and returns a
> count. This is on Blackfin uClinux.
>
> I think I've understood how to make the driver, the only thing I'm
> missing is how to reserve and configure the irq source.
>
> Should I be using the standard Linux request_irq() to do this in the
> RTDM prior to calling rtdm_irq_request()?
>
If you want your interrupt source to be controlled by the Xenomai core, i.e.
with real-time guarantees, then rtdm_irq_request() is what you want. I guess
this is why you need an RTDM driver anyway.
> Regards,
>
> Mike
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>
--
Philippe.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] IRQ reservation and config
2009-02-03 17:46 ` Philippe Gerum
@ 2009-02-03 17:49 ` Mike McTernan
2009-02-05 15:54 ` Philippe Gerum
0 siblings, 1 reply; 6+ messages in thread
From: Mike McTernan @ 2009-02-03 17:49 UTC (permalink / raw)
To: rpm; +Cc: xenomai
Hi,
Right - I want the interrupt to be handled in realtime.
Is there a way to configure the interrupt as level sensitive under
Xenomai? I can't see how to do it, hence the thought of using
request_irq(), which can do that.
Regards,
Mike
-----Original Message-----
From: Philippe Gerum [mailto:rpm@xenomai.org
Sent: 03 February 2009 17:47
To: Mike McTernan
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] IRQ reservation and config
Mike McTernan wrote:
> Hi,
>
> I'm porting a simple driver to be under the Xenomai. RTDM The driver
> simply blocks on read calls until an interrupt arrives, and returns a
> count. This is on Blackfin uClinux.
>
> I think I've understood how to make the driver, the only thing I'm
> missing is how to reserve and configure the irq source.
>
> Should I be using the standard Linux request_irq() to do this in the
> RTDM prior to calling rtdm_irq_request()?
>
If you want your interrupt source to be controlled by the Xenomai core,
i.e.
with real-time guarantees, then rtdm_irq_request() is what you want. I
guess
this is why you need an RTDM driver anyway.
> Regards,
>
> Mike
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>
--
Philippe.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] IRQ reservation and config
2009-02-03 17:49 ` Mike McTernan
@ 2009-02-05 15:54 ` Philippe Gerum
2009-02-05 16:10 ` Mike McTernan
0 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2009-02-05 15:54 UTC (permalink / raw)
To: Mike McTernan; +Cc: xenomai
Mike McTernan wrote:
> Hi,
>
> Right - I want the interrupt to be handled in realtime.
>
> Is there a way to configure the interrupt as level sensitive under
> Xenomai? I can't see how to do it, hence the thought of using
> request_irq(), which can do that.
>
rtdm_irq_request() assumes that the platform-dependent code did set the
correct IRQ type/sense already.
> Regards,
>
> Mike
>
> -----Original Message-----
> From: Philippe Gerum [mailto:rpm@xenomai.org]
> Sent: 03 February 2009 17:47
> To: Mike McTernan
> Cc: xenomai@xenomai.org
> Subject: Re: [Xenomai-help] IRQ reservation and config
>
> Mike McTernan wrote:
>> Hi,
>>
>> I'm porting a simple driver to be under the Xenomai. RTDM The driver
>> simply blocks on read calls until an interrupt arrives, and returns a
>> count. This is on Blackfin uClinux.
>>
>> I think I've understood how to make the driver, the only thing I'm
>> missing is how to reserve and configure the irq source.
>>
>> Should I be using the standard Linux request_irq() to do this in the
>> RTDM prior to calling rtdm_irq_request()?
>>
>
> If you want your interrupt source to be controlled by the Xenomai core,
> i.e.
> with real-time guarantees, then rtdm_irq_request() is what you want. I
> guess
> this is why you need an RTDM driver anyway.
>
>> Regards,
>>
>> Mike
>>
>> _______________________________________________
>> Xenomai-help mailing list
>> Xenomai-help@domain.hid
>> https://mail.gna.org/listinfo/xenomai-help
>>
>
>
--
Philippe.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] IRQ reservation and config
2009-02-05 15:54 ` Philippe Gerum
@ 2009-02-05 16:10 ` Mike McTernan
2009-02-05 16:25 ` Philippe Gerum
0 siblings, 1 reply; 6+ messages in thread
From: Mike McTernan @ 2009-02-05 16:10 UTC (permalink / raw)
To: rpm; +Cc: xenomai
> Mike McTernan wrote:
> > Hi,
> >
> > Right - I want the interrupt to be handled in realtime.
> >
> > Is there a way to configure the interrupt as level sensitive under
> > Xenomai? I can't see how to do it, hence the thought of using
> > request_irq(), which can do that.
> >
>
> rtdm_irq_request() assumes that the platform-dependent code did set
the
> correct IRQ type/sense already.
Cool. So I think you are saying it is valid to first request_irq() to
setup and config the interrupt, then hook it with rtdm_irq_request() for
the realtime handler afterwards.
I was unsure about mixing calls to the rtdm with the normal APIs, but it
sounds like in this case it is not a problem and the recommended method.
Many Thanks,
Mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] IRQ reservation and config
2009-02-05 16:10 ` Mike McTernan
@ 2009-02-05 16:25 ` Philippe Gerum
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Gerum @ 2009-02-05 16:25 UTC (permalink / raw)
To: Mike McTernan; +Cc: xenomai
Mike McTernan wrote:
>> Mike McTernan wrote:
>>> Hi,
>>>
>>> Right - I want the interrupt to be handled in realtime.
>>>
>>> Is there a way to configure the interrupt as level sensitive under
>>> Xenomai? I can't see how to do it, hence the thought of using
>>> request_irq(), which can do that.
>>>
>> rtdm_irq_request() assumes that the platform-dependent code did set
> the
>> correct IRQ type/sense already.
>
> Cool. So I think you are saying it is valid to first request_irq() to
> setup and config the interrupt, then hook it with rtdm_irq_request() for
> the realtime handler afterwards.
>
Yes; the IRQ could even be freed right away, since you only want request_irq()
to set the IRQ sense, and free_irq() won't undo anything.
> I was unsure about mixing calls to the rtdm with the normal APIs, but it
> sounds like in this case it is not a problem and the recommended method.
>
I would say that the recommended method is rather to have the BSP code do
whatever is needed to set the damn thing properly, but if it does not, plan B
may be to count on request_irq() to call the set_type() callback of the related
interrupt chip for the IRQ in question. That should work (Famous Last Words).
> Many Thanks,
>
> Mike
>
>
--
Philippe.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-02-05 16:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-03 17:40 [Xenomai-help] IRQ reservation and config Mike McTernan
2009-02-03 17:46 ` Philippe Gerum
2009-02-03 17:49 ` Mike McTernan
2009-02-05 15:54 ` Philippe Gerum
2009-02-05 16:10 ` Mike McTernan
2009-02-05 16:25 ` Philippe Gerum
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.