summary refs log tree commit diff stats
path: root/include/hw/clock.h
diff options
context:
space:
mode:
authorLuc Michel <luc@lmichel.fr>2020-10-10 15:57:45 +0200
committerPeter Maydell <peter.maydell@linaro.org>2020-10-27 11:10:44 +0000
commitf6f3c9b0f783d47ffab961ea18685e30a85f5818 (patch)
tree3771bfc3528651d30cd746ec07d2d9e0362003cb /include/hw/clock.h
parent43f828e155b443641765a1e933100a96f26be3dd (diff)
downloadfocaccia-qemu-f6f3c9b0f783d47ffab961ea18685e30a85f5818.tar.gz
focaccia-qemu-f6f3c9b0f783d47ffab961ea18685e30a85f5818.zip
hw/core/clock: provide the VMSTATE_ARRAY_CLOCK macro
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
Signed-off-by: Luc Michel <luc@lmichel.fr>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/clock.h')
-rw-r--r--include/hw/clock.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/hw/clock.h b/include/hw/clock.h
index cbc5e6ced1..81bcf3e505 100644
--- a/include/hw/clock.h
+++ b/include/hw/clock.h
@@ -81,6 +81,11 @@ extern const VMStateDescription vmstate_clock;
     VMSTATE_CLOCK_V(field, state, 0)
 #define VMSTATE_CLOCK_V(field, state, version) \
     VMSTATE_STRUCT_POINTER_V(field, state, version, vmstate_clock, Clock)
+#define VMSTATE_ARRAY_CLOCK(field, state, num) \
+    VMSTATE_ARRAY_CLOCK_V(field, state, num, 0)
+#define VMSTATE_ARRAY_CLOCK_V(field, state, num, version)          \
+    VMSTATE_ARRAY_OF_POINTER_TO_STRUCT(field, state, num, version, \
+                                       vmstate_clock, Clock)
 
 /**
  * clock_setup_canonical_path: