mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 06:10:53 +07:00
6d4e1fed18
commit b14d72ac731753708a7c1a6b3657b9312b6f0042 upstream.
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:
|
||
---|---|---|
.. | ||
104-quad-8.c | ||
counter.c | ||
ftm-quaddec.c | ||
Kconfig | ||
Makefile | ||
microchip-tcb-capture.c | ||
stm32-lptimer-cnt.c | ||
stm32-timer-cnt.c | ||
ti-eqep.c |