diff options
Diffstat (limited to 'include/volt/volt_rail.h')
-rw-r--r-- | include/volt/volt_rail.h | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/include/volt/volt_rail.h b/include/volt/volt_rail.h deleted file mode 100644 index 72bb254..0000000 --- a/include/volt/volt_rail.h +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | * DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | |||
24 | #ifndef NVGPU_VOLT_RAIL_H | ||
25 | #define NVGPU_VOLT_RAIL_H | ||
26 | |||
27 | #include "boardobj/boardobj.h" | ||
28 | #include "boardobj/boardobjgrp.h" | ||
29 | |||
30 | #define CTRL_VOLT_RAIL_VOLT_DELTA_MAX_ENTRIES 0x04U | ||
31 | #define CTRL_PMGR_PWR_EQUATION_INDEX_INVALID 0xFFU | ||
32 | |||
33 | #define VOLT_GET_VOLT_RAIL(pvolt, rail_idx) \ | ||
34 | ((struct voltage_rail *)BOARDOBJGRP_OBJ_GET_BY_IDX( \ | ||
35 | &((pvolt)->volt_rail_metadata.volt_rails.super), (rail_idx))) | ||
36 | |||
37 | #define VOLT_RAIL_INDEX_IS_VALID(pvolt, rail_idx) \ | ||
38 | (boardobjgrp_idxisvalid( \ | ||
39 | &((pvolt)->volt_rail_metadata.volt_rails.super), (rail_idx))) | ||
40 | |||
41 | #define VOLT_RAIL_VOLT_3X_SUPPORTED(pvolt) \ | ||
42 | (!BOARDOBJGRP_IS_EMPTY(&((pvolt)->volt_rail_metadata.volt_rails.super))) | ||
43 | |||
44 | /*! | ||
45 | * extends boardobj providing attributes common to all voltage_rails. | ||
46 | */ | ||
47 | struct voltage_rail { | ||
48 | struct boardobj super; | ||
49 | u32 boot_voltage_uv; | ||
50 | u8 rel_limit_vfe_equ_idx; | ||
51 | u8 alt_rel_limit_vfe_equ_idx; | ||
52 | u8 ov_limit_vfe_equ_idx; | ||
53 | u8 pwr_equ_idx; | ||
54 | u8 volt_scale_exp_pwr_equ_idx; | ||
55 | u8 volt_dev_idx_default; | ||
56 | u8 volt_dev_idx_ipc_vmin; | ||
57 | u8 boot_volt_vfe_equ_idx; | ||
58 | u8 vmin_limit_vfe_equ_idx; | ||
59 | u8 volt_margin_limit_vfe_equ_idx; | ||
60 | u32 volt_margin_limit_vfe_equ_mon_handle; | ||
61 | u32 rel_limit_vfe_equ_mon_handle; | ||
62 | u32 alt_rel_limit_vfe_equ_mon_handle; | ||
63 | u32 ov_limit_vfe_equ_mon_handle; | ||
64 | struct boardobjgrpmask_e32 volt_dev_mask; | ||
65 | s32 volt_delta_uv[CTRL_VOLT_RAIL_VOLT_DELTA_MAX_ENTRIES]; | ||
66 | }; | ||
67 | |||
68 | /*! | ||
69 | * metadata of voltage rail functionality. | ||
70 | */ | ||
71 | struct voltage_rail_metadata { | ||
72 | u8 volt_domain_hal; | ||
73 | u8 pct_delta; | ||
74 | u32 ext_rel_delta_uv[CTRL_VOLT_RAIL_VOLT_DELTA_MAX_ENTRIES]; | ||
75 | u8 logic_rail_idx; | ||
76 | u8 sram_rail_idx; | ||
77 | struct boardobjgrp_e32 volt_rails; | ||
78 | }; | ||
79 | |||
80 | u8 volt_rail_vbios_volt_domain_convert_to_internal | ||
81 | (struct gk20a *g, u8 vbios_volt_domain); | ||
82 | |||
83 | u32 volt_rail_volt_dev_register(struct gk20a *g, struct voltage_rail | ||
84 | *pvolt_rail, u8 volt_dev_idx, u8 operation_type); | ||
85 | |||
86 | u8 volt_rail_volt_domain_convert_to_idx(struct gk20a *g, u8 volt_domain); | ||
87 | |||
88 | int volt_rail_sw_setup(struct gk20a *g); | ||
89 | int volt_rail_pmu_setup(struct gk20a *g); | ||
90 | #endif /* NVGPU_VOLT_RAIL_H */ | ||