qcacmn: Get monotonic boottime from kernel in nano sec

qcacld-2.0 to qca-wifi-host-cmn propogation

Add support to get the boot time from kernel in nano seconds.

Change-Id: Iaa512248a5e56d77cff39da562e0c9ee4eaeeefd
CRs-Fixed: 1107219
This commit is contained in:
Arunk Khandavalli
2017-01-03 20:04:22 +05:30
committed by qcabuildsw
parent 9b18ff1e56
commit cae132b6a9
2 changed files with 18 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
* *
* Previously licensed under the ISC license by Qualcomm Atheros, Inc. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
* *
@@ -249,6 +249,13 @@ unsigned long qdf_mc_timer_get_system_ticks(void);
*/ */
unsigned long qdf_mc_timer_get_system_time(void); unsigned long qdf_mc_timer_get_system_time(void);
/**
* qdf_get_monotonic_boottime_ns() - Get kernel boottime in ns
*
* Return: kernel boottime in nano sec
*/
s64 qdf_get_monotonic_boottime_ns(void);
/** /**
* qdf_timer_module_init() - initializes a QDF timer module. * qdf_timer_module_init() - initializes a QDF timer module.
* *

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
* *
* Previously licensed under the ISC license by Qualcomm Atheros, Inc. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
* *
@@ -703,6 +703,15 @@ unsigned long qdf_mc_timer_get_system_time(void)
} }
EXPORT_SYMBOL(qdf_mc_timer_get_system_time); EXPORT_SYMBOL(qdf_mc_timer_get_system_time);
s64 qdf_get_monotonic_boottime_ns(void)
{
struct timespec ts;
ktime_get_ts(&ts);
return timespec_to_ns(&ts);
}
EXPORT_SYMBOL(qdf_get_monotonic_boottime_ns);
/** /**
* qdf_timer_module_deinit() - Deinitializes a QDF timer module. * qdf_timer_module_deinit() - Deinitializes a QDF timer module.
* *