mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-23 16:08:41 -07:00
hpet: add API to find it
Add API to find HPET using QOM. Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
309cd62d6b
commit
64e9df8d34
2 changed files with 7 additions and 0 deletions
|
|
@ -757,6 +757,11 @@ static void hpet_device_class_init(ObjectClass *klass, void *data)
|
||||||
dc->props = hpet_device_properties;
|
dc->props = hpet_device_properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hpet_find(void)
|
||||||
|
{
|
||||||
|
return object_resolve_path_type("", TYPE_HPET, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
static const TypeInfo hpet_device_info = {
|
static const TypeInfo hpet_device_info = {
|
||||||
.name = TYPE_HPET,
|
.name = TYPE_HPET,
|
||||||
.parent = TYPE_SYS_BUS_DEVICE,
|
.parent = TYPE_SYS_BUS_DEVICE,
|
||||||
|
|
|
||||||
|
|
@ -71,4 +71,6 @@ struct hpet_fw_config
|
||||||
} QEMU_PACKED;
|
} QEMU_PACKED;
|
||||||
|
|
||||||
extern struct hpet_fw_config hpet_cfg;
|
extern struct hpet_fw_config hpet_cfg;
|
||||||
|
|
||||||
|
bool hpet_find(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue