diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/therm_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/therm_gp10b.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/therm_gp10b.c b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c new file mode 100644 index 00000000..471edb87 --- /dev/null +++ b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * drivers/gpu/nvgpu/gm20b/therm_gk20a.c | ||
3 | * | ||
4 | * GP10B Therm | ||
5 | * | ||
6 | * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms and conditions of the GNU General Public License, | ||
10 | * version 2, as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
15 | * more details. | ||
16 | */ | ||
17 | |||
18 | #include "gk20a/gk20a.h" | ||
19 | #include "hw_therm_gp10b.h" | ||
20 | |||
21 | static int gp10b_init_therm_setup_hw(struct gk20a *g) | ||
22 | { | ||
23 | gk20a_dbg_fn(""); | ||
24 | |||
25 | /* program NV_THERM registers */ | ||
26 | gk20a_writel(g, therm_use_a_r(), therm_use_a_ext_therm_0_enable_f() | | ||
27 | therm_use_a_ext_therm_1_enable_f() | | ||
28 | therm_use_a_ext_therm_2_enable_f()); | ||
29 | gk20a_writel(g, therm_evt_ext_therm_0_r(), | ||
30 | therm_evt_ext_therm_0_slow_factor_f( | ||
31 | therm_evt_ext_therm_0_slow_factor_init_v())); | ||
32 | gk20a_writel(g, therm_evt_ext_therm_1_r(), | ||
33 | therm_evt_ext_therm_1_slow_factor_f( | ||
34 | therm_evt_ext_therm_1_slow_factor_init_v())); | ||
35 | gk20a_writel(g, therm_evt_ext_therm_2_r(), | ||
36 | therm_evt_ext_therm_2_slow_factor_f( | ||
37 | therm_evt_ext_therm_2_slow_factor_init_v())); | ||
38 | |||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | void gp10b_init_therm_ops(struct gpu_ops *gops) | ||
43 | { | ||
44 | gops->therm.init_therm_setup_hw = gp10b_init_therm_setup_hw; | ||
45 | |||
46 | } | ||