gpu: nvgpu: read effective frequency from counter

JIRA DNVGPU-164

Adding export functions to gk20a and gk20a_clk structure

Change-Id: Ia448f17a6c456139544c1d36a3e17ceec0edd2f6
Signed-off-by: David Nieto <dmartineznie@nvidia.com>
Reviewed-on: http://git-master/r/1239465
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1268000
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
This commit is contained in:
David Nieto
2016-10-12 15:00:16 -07:00
committed by mobile promotions
parent 5319bb4559
commit 866dafa484
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011 - 2014, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2011 - 2016, NVIDIA CORPORATION. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * under the terms and conditions of the GNU General Public License,
@@ -89,6 +89,7 @@ struct clk_gk20a {
struct mutex clk_mutex; struct mutex clk_mutex;
struct namemap_cfg *clk_namemap; struct namemap_cfg *clk_namemap;
u32 namemap_num; u32 namemap_num;
u32 *namemap_xlat_table;
bool sw_ready; bool sw_ready;
bool clk_hw_on; bool clk_hw_on;
bool debugfs_set; bool debugfs_set;

View File

@@ -633,6 +633,7 @@ struct gpu_ops {
int (*init_clk_support)(struct gk20a *g); int (*init_clk_support)(struct gk20a *g);
int (*suspend_clk_support)(struct gk20a *g); int (*suspend_clk_support)(struct gk20a *g);
u32 (*get_crystal_clk_hz)(struct gk20a *g); u32 (*get_crystal_clk_hz)(struct gk20a *g);
u16 (*get_rate)(struct gk20a *g, u32 api_domain);
} clk; } clk;
struct { struct {
u32 (*get_arbiter_clk_domains)(struct gk20a *g); u32 (*get_arbiter_clk_domains)(struct gk20a *g);