summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pmuif
diff options
context:
space:
mode:
authorLakshmanan M <lm@nvidia.com>2016-10-21 07:30:50 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-11-03 12:15:30 -0400
commit8531eb6df14ac0a92d3ed44a4dedd5d283f24c5b (patch)
treedb0677e5b063cd99d7496533867c0a3fae308177 /drivers/gpu/nvgpu/pmuif
parentd37a573c4536c153877b201e7b98f5247a16cfed (diff)
gpu: nvgpu: Add thermal module support
The following CL contains the following VBIOS thermal table parsing and PMU interface support. 1) Thermal device table 2) Thermal channel table JIRA DNVGPU-130 Change-Id: I3c1baca3fec2727b6d20aa6c007096372a6a3efe Signed-off-by: Lakshmanan M <lm@nvidia.com> Reviewed-on: http://git-master/r/1240631 (cherry picked from commit 1d6fa9ab49b1c84e7f845de206821d879cbda356) Reviewed-on: http://git-master/r/1246204 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/pmuif')
-rw-r--r--drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h b/drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h
new file mode 100644
index 00000000..498661b3
--- /dev/null
+++ b/drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h
@@ -0,0 +1,77 @@
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
14#ifndef _GPMUIFTHERMSENSOR_H_
15#define _GPMUIFTHERMSENSOR_H_
16
17#include "gk20a/gk20a.h"
18#include "gk20a/pmu_gk20a.h"
19#include "ctrl/ctrltherm.h"
20#include "pmuif/gpmuifboardobj.h"
21#include "gk20a/pmu_common.h"
22
23#define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_DEVICE 0x00
24#define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_CHANNEL 0x01
25
26#define NV_PMU_THERM_CMD_ID_BOARDOBJ_GRP_SET 0x0000000B
27#define NV_PMU_THERM_MSG_ID_BOARDOBJ_GRP_SET 0x00000008
28
29struct nv_pmu_therm_therm_device_boardobjgrp_set_header {
30 struct nv_pmu_boardobjgrp_e32 super;
31};
32
33struct nv_pmu_therm_therm_device_boardobj_set {
34 struct nv_pmu_boardobj super;
35};
36
37struct nv_pmu_therm_therm_device_i2c_boardobj_set {
38 struct nv_pmu_therm_therm_device_boardobj_set super;
39 u8 i2c_dev_idx;
40};
41
42union nv_pmu_therm_therm_device_boardobj_set_union {
43 struct nv_pmu_boardobj board_obj;
44 struct nv_pmu_therm_therm_device_boardobj_set therm_device;
45 struct nv_pmu_therm_therm_device_i2c_boardobj_set i2c;
46};
47
48NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(therm, therm_device);
49
50struct nv_pmu_therm_therm_channel_boardobjgrp_set_header {
51 struct nv_pmu_boardobjgrp_e32 super;
52};
53
54struct nv_pmu_therm_therm_channel_boardobj_set {
55 struct nv_pmu_boardobj super;
56 s16 scaling;
57 s16 offset;
58 s32 temp_min;
59 s32 temp_max;
60};
61
62struct nv_pmu_therm_therm_channel_device_boardobj_set {
63 struct nv_pmu_therm_therm_channel_boardobj_set super;
64 u8 therm_dev_idx;
65 u8 therm_dev_prov_idx;
66};
67
68union nv_pmu_therm_therm_channel_boardobj_set_union {
69 struct nv_pmu_boardobj board_obj;
70 struct nv_pmu_therm_therm_channel_boardobj_set therm_channel;
71 struct nv_pmu_therm_therm_channel_device_boardobj_set device;
72};
73
74NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(therm, therm_channel);
75
76#endif
77