projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59bf0e7
)
ARM: Fix timer calculations.
author
Ali Saidi
<Ali.Saidi@ARM.com>
Sat, 12 Feb 2011 00:29:35 +0000
(18:29 -0600)
committer
Ali Saidi
<Ali.Saidi@ARM.com>
Sat, 12 Feb 2011 00:29:35 +0000
(18:29 -0600)
The timer calculations were a bit off so time would run faster than
it otherwise should
src/dev/arm/timer_sp804.cc
patch
|
blob
|
history
diff --git
a/src/dev/arm/timer_sp804.cc
b/src/dev/arm/timer_sp804.cc
index 04668d26857f6300b9340690e42caa9c9bd28b85..e6d2657ea9124cb3014eb4e6534fcb98e4e07456 100644
(file)
--- a/
src/dev/arm/timer_sp804.cc
+++ b/
src/dev/arm/timer_sp804.cc
@@
-178,11
+178,11
@@
Sp804::Timer::restartCounter(uint32_t val)
if (!control.timerEnable)
return;
- Tick time = clock
<<
power(16, control.timerPrescale);
+ Tick time = clock
*
power(16, control.timerPrescale);
if (control.timerSize)
- time *= bits(val,15,0);
- else
time *= val;
+ else
+ time *= bits(val,15,0);
if (zeroEvent.scheduled()) {
DPRINTF(Timer, "-- Event was already schedule, de-scheduling\n");