diff mbox

[API,NEXT,v5,04/17] api: sysinfo: move CPU Hz API to cpu.h

Message ID 1442325342-13806-5-git-send-email-hongbo.zhang@freescale.com
State New
Headers show

Commit Message

hongbo.zhang@freescale.com Sept. 15, 2015, 1:55 p.m. UTC
From: Hongbo Zhang <hongbo.zhang@linaro.org>

All CPU related APIs should be moved to cpu.h, this patch moves
odp_sys_cpu_hz(), all the calling functions will be also updated
in later patch.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
---
 include/odp/api/cpu.h                    | 9 +++++++++
 include/odp/api/system_info.h            | 7 -------
 platform/linux-generic/odp_system_info.c | 2 +-
 3 files changed, 10 insertions(+), 8 deletions(-)
diff mbox

Patch

diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h
index 78c3ffc..b63a2e9 100644
--- a/include/odp/api/cpu.h
+++ b/include/odp/api/cpu.h
@@ -53,6 +53,15 @@  int odp_cpu_count(void);
 const char *odp_cpu_model_str(void);
 
 /**
+ * Current CPU frequency in Hz
+ *
+ * Returns current frequency of this CPU
+ *
+ * @return CPU frequency in Hz
+ */
+uint64_t odp_cpu_hz(void);
+
+/**
  * @}
  */
 
diff --git a/include/odp/api/system_info.h b/include/odp/api/system_info.h
index 1cd883f..bde3a60 100644
--- a/include/odp/api/system_info.h
+++ b/include/odp/api/system_info.h
@@ -24,13 +24,6 @@  extern "C" {
  */
 
 /**
- * CPU frequency in Hz
- *
- * @return CPU frequency in Hz
- */
-uint64_t odp_sys_cpu_hz(void);
-
-/**
  * Huge page size in bytes
  *
  * @return Huge page size in bytes
diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c
index ed6b515..8e903b0 100644
--- a/platform/linux-generic/odp_system_info.c
+++ b/platform/linux-generic/odp_system_info.c
@@ -374,7 +374,7 @@  int odp_system_info_init(void)
  * Public access functions
  *************************
  */
-uint64_t odp_sys_cpu_hz(void)
+uint64_t odp_cpu_hz(void)
 {
 	return odp_global_data.system_info.cpu_hz[0];
 }