Commit 923c221b authored by anzhou's avatar anzhou Committed by Varun Wadekar
Browse files

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: default avataranzhou <anzhou@nvidia.com>
Change-Id: I60490bdcaf0b66bf4553a6de3f4e4e32109017f4
parent 3ff448f9
......@@ -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());
}
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment