mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
ARM:PXA: Correct tick_to_time / us_to_tick to use lldiv
Cc: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Tom Rini <trini@ti.com> Acked-by: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
e83bab8403
commit
49a90e2975
1 changed files with 2 additions and 2 deletions
|
@ -28,12 +28,12 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||
|
||||
static unsigned long long tick_to_time(unsigned long long tick)
|
||||
{
|
||||
return tick * CONFIG_SYS_HZ / TIMER_FREQ_HZ;
|
||||
return lldiv(tick * CONFIG_SYS_HZ, TIMER_FREQ_HZ);
|
||||
}
|
||||
|
||||
static unsigned long long us_to_tick(unsigned long long us)
|
||||
{
|
||||
return (us * TIMER_FREQ_HZ) / 1000000;
|
||||
return lldiv(us * TIMER_FREQ_HZ, 1000000);
|
||||
}
|
||||
|
||||
int timer_init(void)
|
||||
|
|
Loading…
Add table
Reference in a new issue