diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2016-10-24 16:26:51 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-10-24 16:26:51 +0100 |
commit | ef0a9984aa0c3c8f440bbf488f2c14ccddd241ea (patch) | |
tree | 82a30cc8742b41e65be6f13edc8b23205b0c9efc /include/hw/ptimer.h | |
parent | 293130aa91e9fc319beca1d8b1a9ac8c0cb33f75 (diff) |
hw/ptimer: Add "continuous trigger" policy
Currently, periodic timer that has load = delta = 0 performs trigger
on timer reload and stops, printing a "period zero" error message.
Introduce new policy that makes periodic timer to continuously trigger
with a period interval in case of load = 0.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Message-id: 632b23dd11055d9bd5e338d66b38fac0bd51462e.1475421224.git.digetx@gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/ptimer.h')
-rw-r--r-- | include/hw/ptimer.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/ptimer.h b/include/hw/ptimer.h index 03441cbc22..b2fb4f9864 100644 --- a/include/hw/ptimer.h +++ b/include/hw/ptimer.h @@ -39,6 +39,10 @@ * around. */ #define PTIMER_POLICY_WRAP_AFTER_ONE_PERIOD (1 << 0) +/* Running periodic timer that has counter = limit = 0 would continuously + * re-trigger every period. */ +#define PTIMER_POLICY_CONTINUOUS_TRIGGER (1 << 1) + /* ptimer.c */ typedef struct ptimer_state ptimer_state; typedef void (*ptimer_cb)(void *opaque); |