summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk/clk_domain.h
diff options
context:
space:
mode:
authorVijayakumar Subbu <vsubbu@nvidia.com>2016-07-30 13:44:30 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:56:49 -0500
commit432017248e432df0619dc2df30f915a52634338f (patch)
tree40bb7a77983fb2753271bc46b346a44ebd6121cf /drivers/gpu/nvgpu/clk/clk_domain.h
parent38ad90b4840434df4650c617a236e1b01f8a43c6 (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_domain.h')
-rw-r--r--drivers/gpu/nvgpu/clk/clk_domain.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_domain.h b/drivers/gpu/nvgpu/clk/clk_domain.h
new file mode 100644
index 00000000..94d612a7
--- /dev/null
+++ b/drivers/gpu/nvgpu/clk/clk_domain.h
@@ -0,0 +1,94 @@
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 _CLKDOMAIN_H_
15#define _CLKDOMAIN_H_
16
17#include "ctrl/ctrlclk.h"
18#include "ctrl/ctrlboardobj.h"
19#include "pmuif/gpmuifclk.h"
20#include "boardobj/boardobjgrp_e32.h"
21#include "boardobj/boardobjgrpmask.h"
22
23struct clk_domains;
24struct clk_domain;
25
26/*data and function definition to talk to driver*/
27u32 clk_domain_sw_setup(struct gk20a *g);
28u32 clk_domain_pmu_setup(struct gk20a *g);
29typedef u32 clkproglink(struct gk20a *g, struct clk_pmupstate *pclk,
30 struct clk_domain *pdomain);
31struct clk_domains {
32 struct boardobjgrp_e32 super;
33 u8 n_num_entries;
34 u8 version;
35 bool b_enforce_vf_monotonicity;
36 u32 vbios_domains;
37 struct boardobjgrpmask_e32 prog_domains_mask;
38 struct boardobjgrpmask_e32 master_domains_mask;
39 u16 cntr_sampling_periodms;
40 struct ctrl_clk_clk_delta deltas;
41
42 struct clk_domain *ordered_noise_aware_list[CTRL_BOARDOBJ_MAX_BOARD_OBJECTS];
43
44 struct clk_domain *ordered_noise_unaware_list[CTRL_BOARDOBJ_MAX_BOARD_OBJECTS];
45};
46
47struct clk_domain {
48 struct boardobj super;
49 u32 api_domain;
50 u32 part_mask;
51 u8 domain;
52 u8 perf_domain_index;
53 u8 perf_domain_grp_idx;
54 u8 ratio_domain;
55 u8 usage;
56 clkproglink *clkdomainclkproglink;
57};
58
59struct clk_domain_3x {
60 struct clk_domain super;
61 bool b_noise_aware_capable;
62};
63
64struct clk_domain_3x_fixed {
65 struct clk_domain_3x super;
66 u16 freq_mhz;
67};
68
69struct clk_domain_3x_prog {
70 struct clk_domain_3x super;
71 u8 clk_prog_idx_first;
72 u8 clk_prog_idx_last;
73 u8 noise_unaware_ordering_index;
74 u8 noise_aware_ordering_index;
75 bool b_force_noise_unaware_ordering;
76 int factory_offset_khz;
77 short freq_delta_min_mhz;
78 short freq_delta_max_mhz;
79 struct ctrl_clk_clk_delta deltas;
80};
81
82struct clk_domain_3x_master {
83 struct clk_domain_3x_prog super;
84 u32 slave_idxs_mask;
85};
86
87struct clk_domain_3x_slave {
88 struct clk_domain_3x_prog super;
89 u8 master_idx;
90};
91
92u32 clk_domain_clk_prog_link(struct gk20a *g, struct clk_pmupstate *pclk);
93
94#endif