mirror of https://github.com/xqemu/xqemu.git
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;
|
uint32_t limit;
|
||||||
|
|
||||||
if ((s->control & TIMER_CTRL_PERIODIC) == 0) {
|
if ((s->control & (TIMER_CTRL_PERIODIC | TIMER_CTRL_ONESHOT)) == 0) {
|
||||||
/* Free running. */
|
/* Free running. */
|
||||||
if (s->control & TIMER_CTRL_32BIT)
|
if (s->control & TIMER_CTRL_32BIT)
|
||||||
limit = 0xffffffff;
|
limit = 0xffffffff;
|
||||||
|
|
Loading…
Reference in New Issue