MLK-14748 clocksource: imx-tpm: Increase the min_delta
authorShenwei Wang <shenwei.wang@nxp.com>
Mon, 24 Apr 2017 18:24:32 +0000 (13:24 -0500)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:22:34 +0000 (15:22 -0500)
commitda97e32641c9c4e99a8aaa24b7afb3b762e39dbe
tree8c9823e339dc65ed718372c8213b33260dd596e3
parentdc459b3515c1a08550c1a11083291efe44be386c
MLK-14748 clocksource: imx-tpm: Increase the min_delta

The current min_delta for TPM clock event is 2 ticks which
is too small. As the TPM is running at 3MHz, 2 ticks equal
2/3 us. According to our testing, the interrupt latency will
be longer than this min_delta, especially when GPU is running.

This patch changed the min_delta to 300 which give the system
around 100us for interrupt handling in case the "set_next_event"
call is interrupted by other signals.

Also a simple validation code is added before the function returns.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 4f882165cc31672f3c98de74ab02b757cb96ad26)
drivers/clocksource/timer-imx-tpm.c