diff mbox

[v5,7/9] pci: set multifunction property for normal device.

Message ID b2a0d8321aacd650e624d1a4036fe2b55923e3d5.1277277076.git.yamahata@valinux.co.jp
State New
Headers show

Commit Message

Isaku Yamahata June 23, 2010, 7:15 a.m. UTC
use pci_create_simple_multifunction() for normal device which sets
multifunction bit.
At the moment, only pc_piix.c and mips_malta.c uses multifunction
devices with piix3/4 pci-isa bridge.
And other boards don't populate those devices.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>

---
changes v4 -> v5:
- uint8_t mf -> bool multifunction
---
 hw/piix4.c    |    2 +-
 hw/piix_pci.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/hw/piix4.c b/hw/piix4.c
index f75951b..2298074 100644
--- a/hw/piix4.c
+++ b/hw/piix4.c
@@ -105,7 +105,7 @@  int piix4_init(PCIBus *bus, int devfn)
 {
     PCIDevice *d;
 
-    d = pci_create_simple(bus, devfn, "PIIX4");
+    d = pci_create_simple_multifunction(bus, devfn, true, "PIIX4");
     return d->devfn;
 }
 
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 7917ae0..a3185f7 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -234,7 +234,7 @@  PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix3_devfn, qemu_irq *
     *pi440fx_state = DO_UPCAST(PCII440FXState, dev, d);
 
     piix3 = DO_UPCAST(PIIX3State, dev,
-                                 pci_create_simple(b, -1, "PIIX3"));
+                      pci_create_simple_multifunction(b, -1, true, "PIIX3"));
     piix3->pic = pic;
     pci_bus_irqs(b, piix3_set_irq, pci_slot_get_pirq, piix3, 4);
     (*pi440fx_state)->piix3 = piix3;