aboutsummaryrefslogtreecommitdiff
path: root/hw/core/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/core/clock.c')
-rw-r--r--hw/core/clock.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/core/clock.c b/hw/core/clock.c
index 8c6af223e7..76b5f468b6 100644
--- a/hw/core/clock.c
+++ b/hw/core/clock.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/cutils.h"
#include "hw/clock.h"
#include "trace.h"
@@ -111,6 +112,11 @@ static void clock_disconnect(Clock *clk)
QLIST_REMOVE(clk, sibling);
}
+char *clock_display_freq(Clock *clk)
+{
+ return freq_to_str(clock_get_hz(clk));
+}
+
static void clock_initfn(Object *obj)
{
Clock *clk = CLOCK(obj);