mirror of
https://github.com/xemu-project/xemu.git
synced 2025-02-07 04:26:22 +00:00
arm_timer: fix oneshot mode
In oneshot mode, the delta needs to come from the TimerLoad register, not the maximum limit. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
d6759902cb
commit
a9cf98d939
@ -71,7 +71,7 @@ static void arm_timer_recalibrate(arm_timer_state *s, int reload)
|
||||
{
|
||||
uint32_t limit;
|
||||
|
||||
if ((s->control & TIMER_CTRL_PERIODIC) == 0) {
|
||||
if ((s->control & (TIMER_CTRL_PERIODIC | TIMER_CTRL_ONESHOT)) == 0) {
|
||||
/* Free running. */
|
||||
if (s->control & TIMER_CTRL_32BIT)
|
||||
limit = 0xffffffff;
|
||||
|
Loading…
x
Reference in New Issue
Block a user