diff options
author | Fabrice Gasnier <[email protected]> | 2021-03-03 18:49:49 +0100 |
---|---|---|
committer | Jonathan Cameron <[email protected]> | 2021-03-06 16:48:09 +0000 |
commit | b14d72ac731753708a7c1a6b3657b9312b6f0042 (patch) | |
tree | 4b34480fb8a3ad348c8f6450a8b1e6c5b1c8fe7b /tools/perf/scripts/python/export-to-sqlite.py | |
parent | e4c3e133294c0a292d21073899b05ebf530169bd (diff) |
counter: stm32-timer-cnt: fix ceiling miss-alignment with reload register
Ceiling value may be miss-aligned with what's actually configured into the
ARR register. This is seen after probe as currently the ARR value is zero,
whereas ceiling value is set to the maximum. So:
- reading ceiling reports zero
- in case the counter gets enabled without any prior configuration,
it won't count.
- in case the function gets set by the user 1st, (priv->ceiling) is used.
Fix it by getting rid of the cached "priv->ceiling" variable. Rather use
the ARR register value directly by using regmap read or write when needed.
There should be no drawback on performance as priv->ceiling isn't used in
performance critical path.
There's also no point in writing ARR while setting function (sms), so
it can be safely removed.
Fixes: ad29937e206f ("counter: Add STM32 Timer quadrature encoder")
Suggested-by: William Breathitt Gray <[email protected]>
Signed-off-by: Fabrice Gasnier <[email protected]>
Acked-by: William Breathitt Gray <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions