3 Jun 2003 21:59
Interrupt interaction with OFW properties.
Jochen Kunz <jkunz <at> unixag-kl.fh-kl.de>
2003-06-03 19:59:34 GMT
2003-06-03 19:59:34 GMT
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. -- --(Continue reading)
RSS Feed