aboutsummaryrefslogtreecommitdiff
path: root/include/hw/clock.h
diff options
context:
space:
mode:
authorDamien Hedde <damien.hedde@greensocs.com>2020-04-06 15:52:44 +0200
committerPeter Maydell <peter.maydell@linaro.org>2020-04-30 15:35:40 +0100
commitb8d38bd5256362355cbc115889213e4892e16ea9 (patch)
treea69b04e30b6e6440afd403e07e5d56ada0b4f3b8 /include/hw/clock.h
parent4cba075efedde66f0a8658001da7fc09a09024e1 (diff)
hw/core/clock-vmstate: define a vmstate entry for clock state
Signed-off-by: Damien Hedde <damien.hedde@greensocs.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 20200406135251.157596-3-damien.hedde@greensocs.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/clock.h')
-rw-r--r--include/hw/clock.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/hw/clock.h b/include/hw/clock.h
index e0e19db9bd..f822a94220 100644
--- a/include/hw/clock.h
+++ b/include/hw/clock.h
@@ -74,6 +74,15 @@ struct Clock {
QLIST_ENTRY(Clock) sibling;
};
+/*
+ * vmstate description entry to be added in device vmsd.
+ */
+extern const VMStateDescription vmstate_clock;
+#define VMSTATE_CLOCK(field, state) \
+ VMSTATE_CLOCK_V(field, state, 0)
+#define VMSTATE_CLOCK_V(field, state, version) \
+ VMSTATE_STRUCT_POINTER_V(field, state, version, vmstate_clock, Clock)
+
/**
* clock_setup_canonical_path:
* @clk: clock