summary refs log tree commit diff stats
path: root/include/hw/clock.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-02-19 14:45:35 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-03-08 17:20:01 +0000
commite4341623a3b87e7eca87d42b7b88da967cd21c49 (patch)
tree302b7562c81f41d7d93b5d1eadc6986742b2390f /include/hw/clock.h
parent5ee0abed51231949ef91d7f8e1115be69ed91e93 (diff)
downloadfocaccia-qemu-e4341623a3b87e7eca87d42b7b88da967cd21c49.tar.gz
focaccia-qemu-e4341623a3b87e7eca87d42b7b88da967cd21c49.zip
clock: Add ClockPreUpdate callback event type
Add a new callback event type ClockPreUpdate, which is called on
period changes before the period is updated.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Luc Michel <luc@lmichel.fr>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20210219144617.4782-3-peter.maydell@linaro.org
Diffstat (limited to 'include/hw/clock.h')
-rw-r--r--include/hw/clock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/clock.h b/include/hw/clock.h
index 282a37f7c5..2ba44e1442 100644
--- a/include/hw/clock.h
+++ b/include/hw/clock.h
@@ -30,6 +30,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(Clock, CLOCK)
  */
 typedef enum ClockEvent {
     ClockUpdate = 1, /* Clock period has just updated */
+    ClockPreUpdate = 2, /* Clock period is about to update */
 } ClockEvent;
 
 typedef void ClockCallback(void *opaque, ClockEvent event);