Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
i am having a problem i want to program 6 serial comm port(in a mulcom board) but board is having single IRQ how can i share this irq between these devices.
In the interrupt service routine (ISR) you will have to check the status of each COM port to determine which one caused the interrupt. Then you will have to schedule the bottom half for the specific COM port.
Frequently, multiple COM ports will assert the IRQ simultaneously. This is easily handled by scheduling the bottom half for each COM port that needs to be serviced.
You have to remember that the point is that you need to get data out before it gets overwritten.
To know how long it will be before it gets overwritten you have to understand the application, the data rates, flow control and the buffering in your board/chip.
Obviously, only you know whether data can come in simultaneously, in the worst case, and ensure that you handle that case.
In the interrupt service routine (ISR) you will have to check the status of each COM port to determine which one caused the interrupt. Then you will have to schedule the bottom half for the specific COM port.
Frequently, multiple COM ports will assert the IRQ simultaneously. This is easily handled by scheduling the bottom half for each COM port that needs to be serviced.
hi,
as u suggest me to check the status of Each Com port. i implement the Single ISR for six Com port (Mulcom Board). checking data availabilty on
each com port and scheduling the bottom halves.
but it is single isr handling all six com port.
can i implement seprate isr for al six comport sharing a IRQ
can i implement seprate isr for al six comport sharing a IRQ
You probably want to look at the code in "linux/drivers/serial" where "linux" is the directory where the source for your kernel is located. There are lots of examples of the various methods for handling interrupts. There are examples for ISA and PCI. You should find what you need there.
You should also look in "linux/Documentation" for more information.
When all else fails, "Linux Device Drivers, 3rd. Ed.", by Corbet et al. and "Essential Linux Device Drivers", by Venkateswaran are both invaluable references for writing device drivers.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.