summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/therm/therm_gp106.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/therm/therm_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/common/therm/therm_gp106.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/drivers/gpu/nvgpu/common/therm/therm_gp106.c b/drivers/gpu/nvgpu/common/therm/therm_gp106.c
index 1f82aa7a..cc3127d7 100644
--- a/drivers/gpu/nvgpu/common/therm/therm_gp106.c
+++ b/drivers/gpu/nvgpu/common/therm/therm_gp106.c
@@ -21,16 +21,12 @@
21 */ 21 */
22 22
23#include <nvgpu/io.h> 23#include <nvgpu/io.h>
24
24#include "gk20a/gk20a.h" 25#include "gk20a/gk20a.h"
25 26
26#include "therm_gp106.h" 27#include "therm_gp106.h"
27#include "therm/thrmpmu.h" 28#include "therm/thrmpmu.h"
28 29
29#ifdef CONFIG_DEBUG_FS
30#include <linux/debugfs.h>
31#include "os/linux/os_linux.h"
32#endif
33
34#include <nvgpu/hw/gp106/hw_therm_gp106.h> 30#include <nvgpu/hw/gp106/hw_therm_gp106.h>
35 31
36#include <nvgpu/utils.h> 32#include <nvgpu/utils.h>
@@ -66,33 +62,6 @@ int gp106_get_internal_sensor_curr_temp(struct gk20a *g, u32 *temp_f24_8)
66 return err; 62 return err;
67} 63}
68 64
69#ifdef CONFIG_DEBUG_FS
70static int therm_get_internal_sensor_curr_temp(void *data, u64 *val)
71{
72 struct gk20a *g = (struct gk20a *)data;
73 u32 readval;
74 int err;
75
76 err = gp106_get_internal_sensor_curr_temp(g, &readval);
77 if (!err)
78 *val = readval;
79
80 return err;
81}
82DEFINE_SIMPLE_ATTRIBUTE(therm_ctrl_fops, therm_get_internal_sensor_curr_temp, NULL, "%llu\n");
83
84void gp106_therm_debugfs_init(struct gk20a *g)
85{
86 struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
87 struct dentry *dbgentry;
88
89 dbgentry = debugfs_create_file(
90 "temp", S_IRUGO, l->debugfs, g, &therm_ctrl_fops);
91 if (!dbgentry)
92 nvgpu_err(g, "debugfs entry create failed for therm_curr_temp");
93}
94#endif
95
96int gp106_elcg_init_idle_filters(struct gk20a *g) 65int gp106_elcg_init_idle_filters(struct gk20a *g)
97{ 66{
98 u32 gate_ctrl, idle_filter; 67 u32 gate_ctrl, idle_filter;