summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h')
-rw-r--r--drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h b/drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h
new file mode 100644
index 00000000..b21b3981
--- /dev/null
+++ b/drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h
@@ -0,0 +1,85 @@
1/*
2 * Copyright (c) 2017, 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#ifndef _NVGPUGPMUCMDIF_H_
14#define _NVGPUGPMUCMDIF_H_
15
16#include "gk20a/pmu_api.h"
17#include "gk20a/pmu_common.h"
18#include "gpmuif_cmn.h"
19#include "gpmuif_pmu.h"
20#include "gpmuifboardobj.h"
21#include "gpmuifclk.h"
22#include "gpmuifperf.h"
23#include "gpmuifpmgr.h"
24#include "gpmuifvolt.h"
25#include "gpmuiftherm.h"
26
27struct pmu_cmd {
28 struct pmu_hdr hdr;
29 union {
30 struct pmu_perfmon_cmd perfmon;
31 struct pmu_pg_cmd pg;
32 struct pmu_zbc_cmd zbc;
33 struct pmu_acr_cmd acr;
34 struct pmu_lrf_tex_ltc_dram_cmd lrf_tex_ltc_dram;
35 struct nv_pmu_boardobj_cmd boardobj;
36 struct nv_pmu_perf_cmd perf;
37 struct nv_pmu_volt_cmd volt;
38 struct nv_pmu_clk_cmd clk;
39 struct nv_pmu_pmgr_cmd pmgr;
40 struct nv_pmu_therm_cmd therm;
41 } cmd;
42};
43
44struct pmu_msg {
45 struct pmu_hdr hdr;
46 union {
47 struct pmu_init_msg init;
48 struct pmu_perfmon_msg perfmon;
49 struct pmu_pg_msg pg;
50 struct pmu_rc_msg rc;
51 struct pmu_acr_msg acr;
52 struct pmu_lrf_tex_ltc_dram_msg lrf_tex_ltc_dram;
53 struct nv_pmu_boardobj_msg boardobj;
54 struct nv_pmu_perf_msg perf;
55 struct nv_pmu_volt_msg volt;
56 struct nv_pmu_clk_msg clk;
57 struct nv_pmu_pmgr_msg pmgr;
58 struct nv_pmu_therm_msg therm;
59 } msg;
60};
61
62#define PMU_UNIT_REWIND (0x00)
63#define PMU_UNIT_PG (0x03)
64#define PMU_UNIT_INIT (0x07)
65#define PMU_UNIT_ACR (0x0A)
66#define PMU_UNIT_PERFMON_T18X (0x11)
67#define PMU_UNIT_PERFMON (0x12)
68#define PMU_UNIT_PERF (0x13)
69#define PMU_UNIT_RC (0x1F)
70#define PMU_UNIT_FECS_MEM_OVERRIDE (0x1E)
71#define PMU_UNIT_CLK (0x0D)
72#define PMU_UNIT_THERM (0x14)
73#define PMU_UNIT_PMGR (0x18)
74#define PMU_UNIT_VOLT (0x0E)
75
76#define PMU_UNIT_END (0x23)
77
78#define PMU_UNIT_TEST_START (0xFE)
79#define PMU_UNIT_END_SIM (0xFF)
80#define PMU_UNIT_TEST_END (0xFF)
81
82#define PMU_UNIT_ID_IS_VALID(id) \
83 (((id) < PMU_UNIT_END) || ((id) >= PMU_UNIT_TEST_START))
84
85#endif /* _NVGPUGPMUCMDIF_H_*/