uint16_t vendor_id, device_id;
uint64_t barsize;
- global_qtest = qtest_startf("-machine %s -device sdhci-pci",
- test->machine);
+ global_qtest = qtest_initf("-machine %s -device sdhci-pci",
+ test->machine);
- s->pci.bus = qpci_init_pc(NULL);
+ s->pci.bus = qpci_init_pc(global_qtest, NULL);
/* Find PCI device and verify it's the right one */
s->pci.dev = qpci_device_find(s->pci.bus, QPCI_DEVFN(4, 0));
qpci_device_enable(s->pci.dev);
} else {
/* SysBus */
- global_qtest = qtest_startf("-machine %s", test->machine);
+ global_qtest = qtest_initf("-machine %s", test->machine);
s->addr = test->sdhci.addr;
}
static void machine_stop(QSDHCI *s)
{
+ qpci_free_pc(s->pci.bus);
g_free(s->pci.dev);
qtest_quit(global_qtest);
+ g_free(s);
}
static void test_machine(const void *data)