mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-17 23:37:01 +00:00
armv8: define usec2ticks function
usec2ticks() function has been defined for ARMv8 which will be used by SEC Driver. Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
This commit is contained in:
parent
beedbc2ea0
commit
b644d3e932
1 changed files with 11 additions and 0 deletions
|
@ -40,3 +40,14 @@ unsigned long timer_read_counter(void)
|
|||
#endif
|
||||
return cntpct;
|
||||
}
|
||||
|
||||
unsigned long usec2ticks(unsigned long usec)
|
||||
{
|
||||
ulong ticks;
|
||||
if (usec < 1000)
|
||||
ticks = ((usec * (get_tbclk()/1000)) + 500) / 1000;
|
||||
else
|
||||
ticks = ((usec / 10) * (get_tbclk() / 100000));
|
||||
|
||||
return ticks;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue