git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
337bfdc
)
powerpc: mpc83xx: Fix timer value calculation
author
J. Neuschäfer
<j.ne@posteo.net>
Fri, 20 Dec 2024 10:37:51 +0000
(11:37 +0100)
committer
Tom Rini
<trini@konsulko.com>
Mon, 30 Dec 2024 21:55:27 +0000
(15:55 -0600)
TBU and TBL are specified as two 32-bit registers that form a 64-bit
value, but the calculation only shifted TBU by 16 bits.
Fix this by actually shifting 32 bits.
Reviewed-by: Sinan Akman <sinan@writeme.com>
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
drivers/timer/mpc83xx_timer.c
patch
|
blob
|
history
diff --git
a/drivers/timer/mpc83xx_timer.c
b/drivers/timer/mpc83xx_timer.c
index
9da7447
..
f92009e
100644
(file)
--- a/
drivers/timer/mpc83xx_timer.c
+++ b/
drivers/timer/mpc83xx_timer.c
@@
-206,7
+206,7
@@
static u64 mpc83xx_timer_get_count(struct udevice *dev)
tbl = mftb();
} while (tbu != mftbu());
- return (
tbu * 0x10000ULL) +
tbl;
+ return (
uint64_t)tbu << 32 |
tbl;
}
static int mpc83xx_timer_probe(struct udevice *dev)