mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-11 07:24:46 +00:00
powerpc: mpc83xx: Fix timer value calculation
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>
This commit is contained in:
parent
337bfdce5a
commit
deb26b6c29
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue