mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +00:00
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:
parent
3ff448f9a7
commit
923c221b6d
1 changed files with 2 additions and 4 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue