how to assign IRQ for devices..
Chan Kim
ckim at etri.re.kr
Sat Mar 29 03:33:52 EDT 2014
Hi,
In our system, I assigned Ethernet, SD card and USB interrupts to sparc processor's IRQ pin 7, 10 and 8 at my choice.
As far as the interrupt is concerned, they worked fine so far.
But I found in arch/sparc/kernel/head_32.S that some H/W interrupts have their supposed IRQ pins.
t_irq1: TRAP_ENTRY_INTERRUPT(1) /* IRQ Software/SBUS Level 1 */
t_irq2: TRAP_ENTRY_INTERRUPT(2) /* IRQ SBUS Level 2 */
t_irq3: TRAP_ENTRY_INTERRUPT(3) /* IRQ SCSI/DMA/SBUS Level 3 */
t_irq4: TRAP_ENTRY_INTERRUPT(4) /* IRQ Software Level 4 */
t_irq5: TRAP_ENTRY_INTERRUPT(5) /* IRQ SBUS/Ethernet Level 5 */
t_irq6: TRAP_ENTRY_INTERRUPT(6) /* IRQ Software Level 6 */
t_irq7: TRAP_ENTRY_INTERRUPT(7) /* IRQ Video/SBUS Level 5 */
t_irq8: TRAP_ENTRY_INTERRUPT(8) /* IRQ SBUS Level 6 */
t_irq9: TRAP_ENTRY_INTERRUPT(9) /* IRQ SBUS Level 7 */
t_irq10:TRAP_ENTRY_INTERRUPT(10) /* IRQ Timer #1 (one we use) */
t_irq11:TRAP_ENTRY_INTERRUPT(11) /* IRQ Floppy Intr. */
t_irq12:TRAP_ENTRY_INTERRUPT(12) /* IRQ Zilog serial chip */
t_irq13:TRAP_ENTRY_INTERRUPT(13) /* IRQ Audio Intr. */
t_irq14:TRAP_ENTRY_INTERRUPT(14) /* IRQ Timer #2 */
Connecting external interrupt to one of processor's IRQ pin is my job so I did it, but I explicitly assigned the IRQ number (at my choice) in the
platform device resource structure and passed it to request_irq() during the driver initialization. This way I could use whatever number .
Is this what people usually do? (besides, above code doesn't have USB or SD card anyway) or do I have to change Ethernet IRQ to 5 as above?
If so, what about SD or USB?
Thanks.
regards,
Chan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140329/f609b66c/attachment.html
More information about the Kernelnewbies
mailing list