Skip to content
Snippets Groups Projects
Commit aadcfc17 authored by John Rigby's avatar John Rigby Committed by Albert ARIBAUD
Browse files

OMAP[34]: fix broken timer


As implemented now the timer used to implement __udelay counts
to 0xffffffff and then gets stuck there because the the programmed
reload value is 0xffffffff.  This value is not only wrong but
illegal according to the reference manual.

One can reproduce the bug by leaving a board at the u-boot prompt
for sometime then issuing a sleep command.  The sleep will hang
forever.

The timer is a count up timer that reloads as it rolls over
from 0xffffffff so the correct load value is 0.

Change TIMER_LOAD_VAL from 0xffffffff to 0 and introduce
a new constant called TIMER_OVERFLOW_VAL set to 0xffffffff.

Signed-off-by: default avatarJohn Rigby <john.rigby@linaro.org>
Tested-by: default avatarIgor Grinberg <grinberg@compulab.co.il>
parent f84d64db
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment