aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.h
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-14 22:35:07 +0100
committerPaul Brook <paul@codesourcery.com>2009-05-14 22:35:07 +0100
commit6b1b92d35b247188139c3dd022fd9521882ef8a9 (patch)
treed87e076fb9bef97e9d61c2a16ab87002f06b65f8 /hw/pci.h
parent4d6ae6741e4fb3bf809466a5afaa7f5183dc6ffd (diff)
PCI qdev support
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/pci.h')
-rw-r--r--hw/pci.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/pci.h b/hw/pci.h
index 962894c8cc..0c26b65650 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -3,6 +3,8 @@
#include "qemu-common.h"
+#include "qdev.h"
+
/* PCI includes legacy ISA access. */
#include "isa.h"
@@ -138,6 +140,7 @@ typedef struct PCIIORegion {
#define PCI_COMMAND_RESERVED_MASK_HI (PCI_COMMAND_RESERVED >> 8)
struct PCIDevice {
+ DeviceState qdev;
/* PCI config space */
uint8_t config[256];
@@ -217,6 +220,11 @@ pci_config_set_class(uint8_t *pci_config, uint16_t val)
cpu_to_le16wu((uint16_t *)&pci_config[PCI_CLASS_DEVICE], val);
}
+typedef void (*pci_qdev_initfn)(PCIDevice *dev);
+void pci_qdev_register(const char *name, int size, pci_qdev_initfn init);
+
+PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name);
+
/* lsi53c895a.c */
#define LSI_MAX_DEVS 7
void lsi_scsi_attach(void *opaque, BlockDriverState *bd, int id);