Tegra: fixup CNTPS_TVAL_EL1 delay timer reads

The delay_timer driver for Tegra uses the CNTPS_TVAL_EL1 secure, physical,
decrementing timer as the source. The current logic incorrectly marks this
as an incrementing timer, by negating the timer value.

This patch fixes the anomaly and updates the driver to remove this logic.

Signed-off-by: anzhou <anzhou@nvidia.com>
Change-Id: I60490bdcaf0b66bf4553a6de3f4e4e32109017f4
This commit is contained in:
anzhou 2020-06-26 15:21:10 +08:00 committed by Varun Wadekar
parent 3ff448f9a7
commit 923c221b6d
1 changed files with 2 additions and 4 deletions

View File

@ -22,11 +22,9 @@ static uint32_t tegra_timer_get_value(void)
/*
* Generic delay timer implementation expects the timer to be a down
* counter. We apply bitwise NOT operator to the tick values returned
* by read_cntps_tval_el1() to simulate the down counter. The value is
* clipped from 64 to 32 bits.
* counter. The value is clipped from 64 to 32 bits.
*/
return (uint32_t)(~read_cntps_tval_el1());
return (uint32_t)(read_cntps_tval_el1());
}
/*