diff options
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_vin.h')
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_vin.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_vin.h b/drivers/gpu/nvgpu/clk/clk_vin.h new file mode 100644 index 00000000..1ffd7971 --- /dev/null +++ b/drivers/gpu/nvgpu/clk/clk_vin.h | |||
@@ -0,0 +1,56 @@ | |||
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 _CLKVIN_H_ | ||
15 | #define _CLKVIN_H_ | ||
16 | |||
17 | #include "boardobj/boardobj.h" | ||
18 | #include "boardobj/boardobjgrp.h" | ||
19 | #include "clk.h" | ||
20 | |||
21 | struct vin_device; | ||
22 | struct clk_pmupstate; | ||
23 | |||
24 | struct avfsvinobjs { | ||
25 | struct boardobjgrp_e32 super; | ||
26 | u8 calibration_rev_vbios; | ||
27 | u8 calibration_rev_fused; | ||
28 | bool vin_is_disable_allowed; | ||
29 | }; | ||
30 | typedef u32 vin_device_state_load(struct gk20a *g, | ||
31 | struct clk_pmupstate *clk, struct vin_device *pdev); | ||
32 | |||
33 | struct vin_device { | ||
34 | struct boardobj super; | ||
35 | u8 id; | ||
36 | u8 volt_domain; | ||
37 | u8 volt_domain_vbios; | ||
38 | u32 slope; | ||
39 | u32 intercept; | ||
40 | u32 flls_shared_mask; | ||
41 | |||
42 | vin_device_state_load *state_load; | ||
43 | }; | ||
44 | |||
45 | /* get vin device object from descriptor table index*/ | ||
46 | #define CLK_GET_VIN_DEVICE(pvinobjs, dev_index) \ | ||
47 | ((struct vin_device *)BOARDOBJGRP_OBJ_GET_BY_IDX( \ | ||
48 | ((struct boardobjgrp *)&(pvinobjs->super.super)), (dev_index))) | ||
49 | |||
50 | boardobj_construct construct_vindevice; | ||
51 | boardobj_pmudatainit vindeviceinit_pmudata_super; | ||
52 | |||
53 | u32 clk_vin_sw_setup(struct gk20a *g); | ||
54 | u32 clk_vin_pmu_setup(struct gk20a *g); | ||
55 | |||
56 | #endif | ||