blob: f99d4e9eb8abdd46a477db2f3bdf4302a7d53428 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/*
* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#ifndef _NVGPUGPMUCMDIF_H_
#define _NVGPUGPMUCMDIF_H_
#include "gk20a/pmu_api.h"
#include <nvgpu/flcnif_cmn.h>
#include "gpmuif_cmn.h"
#include "gpmuif_pmu.h"
#include "gpmuif_ap.h"
#include "gpmuif_pg.h"
#include "gpmuif_perfmon.h"
#include "gpmuifboardobj.h"
#include "gpmuifclk.h"
#include "gpmuifperf.h"
#include "gpmuifpmgr.h"
#include "gpmuifvolt.h"
#include "gpmuiftherm.h"
struct pmu_cmd {
struct pmu_hdr hdr;
union {
struct pmu_perfmon_cmd perfmon;
struct pmu_pg_cmd pg;
struct pmu_zbc_cmd zbc;
struct pmu_acr_cmd acr;
struct pmu_lrf_tex_ltc_dram_cmd lrf_tex_ltc_dram;
struct nv_pmu_boardobj_cmd boardobj;
struct nv_pmu_perf_cmd perf;
struct nv_pmu_volt_cmd volt;
struct nv_pmu_clk_cmd clk;
struct nv_pmu_pmgr_cmd pmgr;
struct nv_pmu_therm_cmd therm;
} cmd;
};
struct pmu_msg {
struct pmu_hdr hdr;
union {
struct pmu_init_msg init;
struct pmu_perfmon_msg perfmon;
struct pmu_pg_msg pg;
struct pmu_rc_msg rc;
struct pmu_acr_msg acr;
struct pmu_lrf_tex_ltc_dram_msg lrf_tex_ltc_dram;
struct nv_pmu_boardobj_msg boardobj;
struct nv_pmu_perf_msg perf;
struct nv_pmu_volt_msg volt;
struct nv_pmu_clk_msg clk;
struct nv_pmu_pmgr_msg pmgr;
struct nv_pmu_therm_msg therm;
} msg;
};
#define PMU_UNIT_REWIND (0x00)
#define PMU_UNIT_PG (0x03)
#define PMU_UNIT_INIT (0x07)
#define PMU_UNIT_ACR (0x0A)
#define PMU_UNIT_PERFMON_T18X (0x11)
#define PMU_UNIT_PERFMON (0x12)
#define PMU_UNIT_PERF (0x13)
#define PMU_UNIT_RC (0x1F)
#define PMU_UNIT_FECS_MEM_OVERRIDE (0x1E)
#define PMU_UNIT_CLK (0x0D)
#define PMU_UNIT_THERM (0x14)
#define PMU_UNIT_PMGR (0x18)
#define PMU_UNIT_VOLT (0x0E)
#define PMU_UNIT_END (0x23)
#define PMU_UNIT_TEST_START (0xFE)
#define PMU_UNIT_END_SIM (0xFF)
#define PMU_UNIT_TEST_END (0xFF)
#define PMU_UNIT_ID_IS_VALID(id) \
(((id) < PMU_UNIT_END) || ((id) >= PMU_UNIT_TEST_START))
#endif /* _NVGPUGPMUCMDIF_H_*/
|