diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/clk_gp106.h')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/clk_gp106.h | 56 |
1 files changed, 56 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..7df4b974 --- /dev/null +++ b/drivers/gpu/nvgpu/gp106/clk_gp106.h | |||
@@ -0,0 +1,56 @@ | |||
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 27000 /* 1000usec at 27KHz XTAL */ | ||
30 | #define XTAL_CNTR_DELAY 1000 /* we need acuracy up to the ms */ | ||
31 | #define XTAL_SCALE_TO_KHZ 1 | ||
32 | |||
33 | |||
34 | |||
35 | struct 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 | u32 scale; | ||
51 | char name[24]; | ||
52 | }; | ||
53 | |||
54 | void gp106_init_clk_ops(struct gpu_ops *gops); | ||
55 | |||
56 | #endif /* CLK_GP106_H */ | ||