diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2016-10-24 16:26:52 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-10-24 16:26:52 +0100 |
commit | 3f6e6a13c1a059d44b9a55ec7af8c01ef096ff7e (patch) | |
tree | e430d703c1b3a2234b94d95b75a73f276fb1b3c6 /include/hw/ptimer.h | |
parent | 516deb421afc6e4f6073d0de3f33867235eef3fd (diff) |
hw/ptimer: Add "no immediate reload" policy
Immediate counter re-load on setting (or on starting to run with)
counter = 0 is a wrong behaviour for some of the timers. Add "no
immediate reload" policy that provides correct behaviour for such timers.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Message-id: bf9385cd2550ca451d564fa46007688cee3f3d9d.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 911cc11bac..5455340187 100644 --- a/include/hw/ptimer.h +++ b/include/hw/ptimer.h @@ -47,6 +47,10 @@ * but after a one period for both oneshot and periodic modes. */ #define PTIMER_POLICY_NO_IMMEDIATE_TRIGGER (1 << 2) +/* Starting to run with/setting counter to "0" won't re-load counter + * immediately, but after a one period. */ +#define PTIMER_POLICY_NO_IMMEDIATE_RELOAD (1 << 3) + /* ptimer.c */ typedef struct ptimer_state ptimer_state; typedef void (*ptimer_cb)(void *opaque); |