Thread (10 messages) flat view 10 messages, 5 authors, 2000-03-09

Re: Grabbing an Interrupt for a Brain-dead PCI Device

From: Geert Uytterhoeven <hidden>
Date: 2000-03-08 08:31:42

On Tue, 7 Mar 2000, Michel Lanners wrote:
If this is in a PowerMac (at least those previous to UMA), then there
is a fixed IRQ per physical slot. All 4 PCI interrupt lines are OR'ed
together per slot.

However, there are other IRQ routing schemes as well... the above being
the easiest one, because the IRQ value can be hardcoded based on the
slot, which you can determine by software.
The most popular routing scheme looks like this:

    #INTA(slot_nr) -> pci_int(slot_nr % 4)
    #INTB(slot_nr) -> pci_int((slot_nr+1) % 4)
    #INTC(slot_nr) -> pci_int((slot_nr+2) % 4)
    #INTD(slot_nr) -> pci_int((slot_nr+3) % 4)

where

    pci_int(0) = #INTW
    pci_int(1) = #INTX
    pci_int(2) = #INTY
    pci_int(3) = #INTZ

Hence if all boards use one interrupt (the first interrupt on a board _must_ be
#INTA), they're evenly spread across the available interrupt sources.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven ------------- Sony Software Development Center Europe (SDCE)
Geert.Uytterhoeven@sonycom.com ------------------- Sint-Stevens-Woluwestraat 55
Voice +32-2-7248638 Fax +32-2-7262686 ---------------- B-1130 Brussels, Belgium


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help