aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/kernel/setup.c')
-rw-r--r--arch/blackfin/kernel/setup.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index 6b85145f8488..0e746449c29b 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -459,7 +459,7 @@ static u_long get_vco(void)
459 return vco; 459 return vco;
460} 460}
461 461
462/*Get the Core clock*/ 462/* Get the Core clock */
463u_long get_cclk(void) 463u_long get_cclk(void)
464{ 464{
465 u_long csel, ssel; 465 u_long csel, ssel;
@@ -493,6 +493,18 @@ u_long get_sclk(void)
493} 493}
494EXPORT_SYMBOL(get_sclk); 494EXPORT_SYMBOL(get_sclk);
495 495
496unsigned long sclk_to_usecs(unsigned long sclk)
497{
498 return (USEC_PER_SEC * (u64)sclk) / get_sclk();
499}
500EXPORT_SYMBOL(sclk_to_usecs);
501
502unsigned long usecs_to_sclk(unsigned long usecs)
503{
504 return get_sclk() / (USEC_PER_SEC * (u64)usecs);
505}
506EXPORT_SYMBOL(usecs_to_sclk);
507
496/* 508/*
497 * Get CPU information for use by the procfs. 509 * Get CPU information for use by the procfs.
498 */ 510 */