Port-ofppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Interrupt interaction with OFW properties.



Hi. 

I am working on the MD code to make port-ofppc run on the Motorola
PowerStack II. PCI and ISA attachments are working, now I am on the
interrupt handling stuff. (See my post of a dmesg to port-prep
recently.) 

As Matt Thomas sugested I pulled pci_attach_hook() / fixpci() /
find_node_intr() from sys/arch/macppc/pci/pci_machdep.c and integrated
this into my sys/arch/ofppc/motorola/powerstackII_pci.c. The OFW on the
PowerStack II disables all PCI devices by default. This code sets
PCI_COMMAND_STATUS_REG and PCI_INTERRUPT_REG of each PCI device
according to the OFW properties, thus enabling the device. 

The code from macppc queries for the property "AAPL,interrupts". Is this
somthing special to macppc? The OFW on the PowerStack II has the
property "interrupts" and the OFW-PCI binding talks about "interrupts"
too. Or is there some special semantic behind the ","? 

The OFW "interrupts" property is allways 1 for all PCI devices, so the
PCI attach code gets "IRQ 1" for all PCI devices. If I don't use the
find_node_intr() function and leave PCI_INTERRUPT_REG untouched, the
devices get the correct interrupt. (I know the interrupt routing of that
machine from the Linux source linux/arch/ppc/kernel/prep_pci.c,
Utah_pci_IRQ_map[] and Utah_pci_IRQ_routes[]). So it looks to me like
the OFW initializes the PCI_INTERRUPT_REG correct, but doesn't supply a
correct "interrupts" property. Correct? Or is there somthing else I
don't know already. 
-- 


tschüß,
       Jochen

Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/




Home | Main Index | Thread Index | Old Index