From b8d38bd5256362355cbc115889213e4892e16ea9 Mon Sep 17 00:00:00 2001 From: Damien Hedde Date: Mon, 6 Apr 2020 15:52:44 +0200 Subject: hw/core/clock-vmstate: define a vmstate entry for clock state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Damien Hedde Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Message-id: 20200406135251.157596-3-damien.hedde@greensocs.com Signed-off-by: Peter Maydell --- include/hw/clock.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/hw') 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 -- cgit v1.2.3