summaryrefslogtreecommitdiff
path: root/hw/sysbus.h
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-06-05 15:52:04 +0100
committerPaul Brook <paul@codesourcery.com>2009-06-05 15:52:04 +0100
commit1431b6a17e6546569e09bcf8fb7773c925658d8f (patch)
tree83669665d82278a27b12d34d2fc1847944e784de /hw/sysbus.h
parentfd93a79999c728dd1f30bb2e726ce12bdf704e6d (diff)
downloadqemu-1431b6a17e6546569e09bcf8fb7773c925658d8f.zip
Record device property types
Record device property types, and provide a list of properties at device registration time. Add a "device" property type that holds a reference to annother device. Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/sysbus.h')
-rw-r--r--hw/sysbus.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/sysbus.h b/hw/sysbus.h
index 44ed792d2d..2973661667 100644
--- a/hw/sysbus.h
+++ b/hw/sysbus.h
@@ -31,7 +31,14 @@ typedef void (*sysbus_initfn)(SysBusDevice *dev);
#define sysbus_from_qdev(dev) ((SysBusDevice *)(dev))
#define FROM_SYSBUS(type, dev) DO_UPCAST(type, busdev, dev)
+typedef struct {
+ DeviceInfo qdev;
+ sysbus_initfn init;
+} SysBusDeviceInfo;
+
void sysbus_register_dev(const char *name, size_t size, sysbus_initfn init);
+void sysbus_register_withprop(const char *name, size_t size,
+ SysBusDeviceInfo *info);
void *sysbus_new(void);
void sysbus_init_mmio(SysBusDevice *dev, target_phys_addr_t size, int iofunc);
void sysbus_init_mmio_cb(SysBusDevice *dev, target_phys_addr_t size,