mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
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>
This commit is contained in:
parent
fd93a79999
commit
1431b6a17e
5 changed files with 77 additions and 19 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue