Skip to content
Snippets Groups Projects
Commit b644d3e9 authored by Aneesh Bansal's avatar Aneesh Bansal Committed by York Sun
Browse files

armv8: define usec2ticks function


usec2ticks() function has been defined for ARMv8 which will
be used by SEC Driver.

Signed-off-by: default avatarAneesh Bansal <aneesh.bansal@freescale.com>
Reviewed-by: default avatarYork Sun <yorksun@freescale.com>
parent beedbc2e
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment