aboutsummaryrefslogtreecommitdiff
path: root/hw/mips/fuloong2e.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/mips/fuloong2e.c')
-rw-r--r--hw/mips/fuloong2e.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index 7a65166cf0..8ca31e5162 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -297,6 +297,7 @@ static void mips_fuloong2e_init(MachineState *machine)
long bios_size;
uint8_t *spd_data;
int64_t kernel_entry;
+ PCIDevice *pci_dev;
PCIBus *pci_bus;
ISABus *isa_bus;
I2CBus *smbus;
@@ -367,10 +368,11 @@ static void mips_fuloong2e_init(MachineState *machine)
/* GPU */
if (vga_interface_type != VGA_NONE) {
- dev = DEVICE(pci_create(pci_bus, -1, "ati-vga"));
+ pci_dev = pci_new(-1, "ati-vga");
+ dev = DEVICE(pci_dev);
qdev_prop_set_uint32(dev, "vgamem_mb", 16);
qdev_prop_set_uint16(dev, "x-device-id", 0x5159);
- qdev_init_nofail(dev);
+ pci_realize_and_unref(pci_dev, pci_bus, &error_fatal);
}
/* Populate SPD eeprom data */