diff options
| author | Isaku Yamahata <yamahata@valinux.co.jp> | 2012-10-19 16:43:28 -0400 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2012-10-29 17:59:06 +0200 |
| commit | 91e5615984c1fd5674caad343e750bb5ecd17995 (patch) | |
| tree | f15f776dbf1e8e21000a9b4b519b5a90187e6f6b /hw/pci.h | |
| parent | 9e38f56183c52e06fc29c64691f59a46d246eec5 (diff) | |
| download | focaccia-qemu-91e5615984c1fd5674caad343e750bb5ecd17995.tar.gz focaccia-qemu-91e5615984c1fd5674caad343e750bb5ecd17995.zip | |
pci: introduce pci_swizzle_map_irq_fn() for standardized interrupt pin swizzle
Introduce pci_swizzle_map_irq_fn() for interrupt pin swizzle which is standardized. PCI bridge swizzle is common logic, by introducing this function duplicated swizzle logic will be avoided later. [jbaron@redhat.com: drop opaque argument] Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci.h')
| -rw-r--r-- | hw/pci.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/pci.h b/hw/pci.h index a852941a5c..241c1d8905 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -318,6 +318,8 @@ void pci_bus_irqs(PCIBus *bus, pci_set_irq_fn set_irq, pci_map_irq_fn map_irq, void *irq_opaque, int nirq); int pci_bus_get_irq_level(PCIBus *bus, int irq_num); void pci_bus_hotplug(PCIBus *bus, pci_hotplug_fn hotplug, DeviceState *dev); +/* 0 <= pin <= 3 0 = INTA, 1 = INTB, 2 = INTC, 3 = INTD */ +int pci_swizzle_map_irq_fn(PCIDevice *pci_dev, int pin); PCIBus *pci_register_bus(DeviceState *parent, const char *name, pci_set_irq_fn set_irq, pci_map_irq_fn map_irq, void *irq_opaque, |