summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/clk_gp106.h
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2016-08-08 06:13:37 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:56:49 -0500
commitd2b67f1ad606733a63d8261e36068e5bd1f96cdc (patch)
treeff04e59f649ac9fddafc16832f088670440660bc /drivers/gpu/nvgpu/gp106/clk_gp106.h
parent432017248e432df0619dc2df30f915a52634338f (diff)
gpu: nvgpu: add debugfs to dump clocks
* Removed unused registers from headers * Added counter based MCLK * Removed hardcoding JIRA DNVGPU-98 Change-Id: Idffcd7fc17024582b41c29371a2295df8f0c206b Signed-off-by: David Nieto <dmartineznie@nvidia.com> Reviewed-on: http://git-master/r/1204019 (cherry picked from commit 48dfa41a641c3adbc4d25a35f418cf73b08d5e8c) Reviewed-on: http://git-master/r/1227264 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/clk_gp106.h')
-rw-r--r--drivers/gpu/nvgpu/gp106/clk_gp106.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp106/clk_gp106.h b/drivers/gpu/nvgpu/gp106/clk_gp106.h
new file mode 100644
index 00000000..a50819aa
--- /dev/null
+++ b/drivers/gpu/nvgpu/gp106/clk_gp106.h
@@ -0,0 +1,55 @@
1/*
2 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#ifndef CLK_GP106_H
17#define CLK_GP106_H
18
19#include <linux/mutex.h>
20
21#define CLK_NAMEMAP_INDEX_GPC2CLK 0x00
22#define CLK_NAMEMAP_INDEX_XBAR2CLK 0x02
23#define CLK_NAMEMAP_INDEX_SYS2CLK 0x07 /* SYSPLL */
24#define CLK_NAMEMAP_INDEX_DRAMCLK 0x20 /* DRAMPLL */
25
26#define CLK_DEFAULT_CNTRL_SETTLE_RETRIES 10
27#define CLK_DEFAULT_CNTRL_SETTLE_USECS 5
28
29#define XTAL_CNTR_CLKS 2700 /* 100usec at 27KHz XTAL */
30#define XTAL_CNTR_DELAY 110 /* leave 10 extra usec */
31#define XTAL_SCALE_TO_KHZ 10
32
33
34
35struct namemap_cfg {
36 u32 namemap;
37 u32 is_enable; /* Namemap enabled */
38 u32 is_counter; /* Using cntr */
39 struct gk20a *g;
40 union {
41 struct {
42 u32 reg_ctrl_addr;
43 u32 reg_ctrl_idx;
44 u32 reg_cntr_addr;
45 } cntr;
46 struct {
47 /* Todo */
48 } pll;
49 };
50 char name[24];
51};
52
53void gp106_init_clk_ops(struct gpu_ops *gops);
54
55#endif /* CLK_GP106_H */