]> git.proxmox.com Git - qemu.git/commitdiff
hpet: add API to find it
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 24 Jul 2013 15:56:13 +0000 (18:56 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 14 Oct 2013 14:48:52 +0000 (17:48 +0300)
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>
hw/timer/hpet.c
include/hw/timer/hpet.h

index fcd22aea59d8193dbd16aaa1e02bfe8c85df08fc..2eb75ea945005b22148d2071211735bd0d703201 100644 (file)
@@ -757,6 +757,11 @@ static void hpet_device_class_init(ObjectClass *klass, void *data)
     dc->props = hpet_device_properties;
 }
 
+bool hpet_find(void)
+{
+    return object_resolve_path_type("", TYPE_HPET, NULL);
+}
+
 static const TypeInfo hpet_device_info = {
     .name          = TYPE_HPET,
     .parent        = TYPE_SYS_BUS_DEVICE,
index 757f79fdd2506bfeb7bc62ca81b2b6b504e884c7..ab44bd31fd4c9d7567d4f358f5a3a12e6c7a2f8b 100644 (file)
@@ -71,4 +71,6 @@ struct hpet_fw_config
 } QEMU_PACKED;
 
 extern struct hpet_fw_config hpet_cfg;
+
+bool hpet_find(void);
 #endif