diff options
author | Vijayakumar Subbu <vsubbu@nvidia.com> | 2016-07-30 13:44:30 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:49 -0500 |
commit | 432017248e432df0619dc2df30f915a52634338f (patch) | |
tree | 40bb7a77983fb2753271bc46b346a44ebd6121cf /drivers/gpu/nvgpu/clk/clk_vin.h | |
parent | 38ad90b4840434df4650c617a236e1b01f8a43c6 (diff) |
gpu: nvgpu: Add dGPU clocks support
JIRA DNVGPU-42
Change-Id: Ic2fca9d0cf82f2823654ac5e8f0772a1eec7b3b5
Signed-off-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1205850
(cherry picked from commit b9f5c6bc4e649162d63e33d65b725872340ca114)
Reviewed-on: http://git-master/r/1227257
GVS: Gerrit_Virtual_Submit
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 | ||