RTDM PCI development framework
hi
how are you?
This is my first attempt at writing a linux device driver. After reading through some of the "Linux Device Drivers 3rd edition", and through Xenomai RTDM, i thought a good place to start was a generic framework which detects and allocates PCI resources with the necessary error handling. It makes available callback functions as well as the allocated resources. The aim is to expand it to provide a framework for a standard linux char device driver. Thereafter update the framework to be RTDM compatible. I've spoken with Jan Kiska with regards to this and it may useful to others. There is still much work to be done on, especially to bring it up to the Xenomai/RTDM coding standard but attached please find a first attempt.
Comments and constructive criticism would be greatly appreciated! [The Xenomai GPL file headers are included, hope you don't mind]
Jan, i went away for a long weekend at the sea to visit my parents. Apologies for not replying earlier
Keep well
Vicki
*******************************************************************************************************
Disclaimer: The information contained in this communication is confidential and may be legally privileged.
It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it.
Any review, retransmission, dissemination, copying, disclosure or other use of, or taking of any action in reliance upon, this information by person or entities other then the intended recipient is prohibited. If you have received this message in error, please notify the sender immediately by e-mail, facsimile or telephone and return and/or destroy the original message and all copies from any computer.
Denel (Pty) Ltd exercises no editorial control over e-mail messages originating in the organisation and does not accept any responsibility for either the contents of the message or any copyright laws that may have been violated by the person sending this message. Denel (Pty) Ltd is neither liable for the proper and complete transmission of the information contained in this communication nor any delay in its receipt.
This message should not be copied or used for any purpose other than intended, nor should it be disclosed to any other person.
*******************************************************************************************************
Quoted 15 lines · ramv
hi
how are you?This is my first attempt at writing a linux device driver. After reading through some of the "Linux Device Drivers 3rd edition", and through Xenomai RTDM, i thought a good place to start was a generic framework which detects and allocates PCI resources with the necessary error handling. It makes available callback functions as well as the allocated resources. The aim is to expand it to provide a framework for a standard linux char device driver. Thereafter update the framework to be RTDM compatible. I've spoken with Jan Kiska with regards to this and it may useful to others. There is still much work to be done on, especially to bring it up to the Xenomai/RTDM coding standard but attached please find a first attempt.
Quoted 2 lines
Comments and constructive criticism would be greatly appreciated! [The Xenomai GPL file headers are included, hope you don't mind]
The idea to provide some template for (PCI) driver development is definitely a good one. Your approach already look quite nice, but it is generally wise to apply such templates at least on two different drivers to see what may be missing, what needs refinement, or what is not required.
A few comments already: it would be nice to add kernel 2.4 support to your Makefile. Keep an eye on potential "over-design", i.e. avoid wrapping trivial things, rather concentrate on providing templates the user can fill in stuff directly.
Quoted 3 lines
Jan, i went away for a long weekend at the sea to visit my parents. Apologies for not replying earlier
There is life offline? ;)
(No need to apologise, we are all busy with various stuff.)
Quoted 3 lines
*******************************************************************************************************
Disclaimer: The information contained in this communication is confidential and may be legally privileged.
Mmm, was it illegal then to read your mail? Or the attachment?? ;)
Jan
Hi
Thanx for the feedback thus far.
Quoted 10 lines · Jan Kiszka
The idea to provide some template for (PCI) driver development is definitely a good one. Your approach already look quite nice, but it is generally wise to apply such templates at least on two different drivers to see what may be missing, what needs refinement, or what is not required
A few comments already: it would be nice to add kernel 2.4 support to your
Makefile. Keep an eye on potential "over-design", i.e. avoid wrapping trivial things, rather concentrate on providing templates the user can fill in stuff directly.
Yup, those are good suggestions. That's one of the reasons i posted to this list. I'm still too new at device drivers to know the various application scenarios, so suggestions from others would help greatly.
Is there an alternative preferred method to make code available for review ?
Will put the suggestions on the TODO list.
Quoted 7 lines
Quoted 2 lines
*******************************************************************************************************
Disclaimer: The information contained in this communication is confidential and may be legally privileged.Mmm, was it illegal then to read your mail? Or the attachment?? ;)
Jan
PS. The disclaimer gets attached automatically by our mail server. Have applied for a gmail account and will start a thread from there later.
Keep well
Vicki
*******************************************************************************************************
Disclaimer: The information contained in this communication is confidential and may be legally privileged.
It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it.
Any review, retransmission, dissemination, copying, disclosure or other use of, or taking of any action in reliance upon, this information by person or entities other then the intended recipient is prohibited. If you have received this message in error, please notify the sender immediately by e-mail, facsimile or telephone and return and/or destroy the original message and all copies from any computer.
Denel (Pty) Ltd exercises no editorial control over e-mail messages originating in the organisation and does not accept any responsibility for either the contents of the message or any copyright laws that may have been violated by the person sending this message. Denel (Pty) Ltd is neither liable for the proper and complete transmission of the information contained in this communication nor any delay in its receipt.
This message should not be copied or used for any purpose other than intended, nor should it be disclosed to any other person.
*******************************************************************************************************