From 1431b6a17e6546569e09bcf8fb7773c925658d8f Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Fri, 5 Jun 2009 15:52:04 +0100 Subject: 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 --- hw/sysbus.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hw/sysbus.h') 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, -- cgit v1.2.3