1 /*****************************************************************************
3 (c) Cambridge Silicon Radio Limited 2010
4 All rights reserved and confidential information of CSR
6 Refer to LICENSE.txt included with this source for details
9 *****************************************************************************/
11 #include <linux/kernel.h>
12 #include <linux/version.h>
14 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
15 #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
16 #include <linux/autoconf.h>
17 #include <linux/config.h>
20 #include <linux/time.h>
21 #include <linux/module.h>
25 CsrTime
CsrTimeGet(CsrTime
*high
)
31 ts
= current_kernel_time();
32 time
= (u64
) ts
.tv_sec
* 1000000 + ts
.tv_nsec
/ 1000;
36 *high
= (CsrTime
) ((time
>> 32) & 0xFFFFFFFF);
39 low
= (CsrTime
) (time
& 0xFFFFFFFF);
43 EXPORT_SYMBOL_GPL(CsrTimeGet
);