LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-08-2009, 11:21 AM   #1
anshexp
LQ Newbie
 
Registered: Jul 2009
Posts: 14

Rep: Reputation: 0
share a irq between more than one devices


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.
 
Old 07-08-2009, 12:56 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by anshexp View Post
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.
 
Old 07-08-2009, 04:23 PM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
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.
 
Old 07-20-2009, 01:43 AM   #4
anshexp
LQ Newbie
 
Registered: Jul 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by David1357 View Post
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
 
Old 07-20-2009, 12:04 PM   #5
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by anshexp View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
system calls to devices?Talking to devices. kiruxa Linux - Hardware 6 12-09-2006 05:46 PM
what is the different btw raw devices and block devices yenonn Linux - General 2 02-10-2006 09:34 PM
SCSI Errors when IRQ Shared - How do I not share IRQ MQMan Linux - Hardware 2 01-08-2006 11:42 PM
mandrake 10.1 disables my irq 11 when i plug in usb devices! allsmilez Linux - Newbie 0 06-22-2005 11:07 AM
Share interrupts with /dev/rtc (IRQ 8) godOfThunder Linux - Software 1 08-03-2004 12:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration