aboutsummaryrefslogtreecommitdiffstats
path: root/include/os/linux/vgpu/platform_vgpu_tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'include/os/linux/vgpu/platform_vgpu_tegra.c')
-rw-r--r--include/os/linux/vgpu/platform_vgpu_tegra.c97
1 files changed, 0 insertions, 97 deletions
diff --git a/include/os/linux/vgpu/platform_vgpu_tegra.c b/include/os/linux/vgpu/platform_vgpu_tegra.c
deleted file mode 100644
index 948323e..0000000
--- a/include/os/linux/vgpu/platform_vgpu_tegra.c
+++ /dev/null
@@ -1,97 +0,0 @@
1/*
2 * Tegra Virtualized GPU Platform Interface
3 *
4 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include <nvgpu/nvhost.h>
20#include <nvgpu/gk20a.h>
21
22#include "os/linux/platform_gk20a.h"
23#include "vgpu/clk_vgpu.h"
24#include "vgpu_linux.h"
25
26static int gk20a_tegra_probe(struct device *dev)
27{
28#ifdef CONFIG_TEGRA_GK20A_NVHOST
29 struct gk20a_platform *platform = dev_get_drvdata(dev);
30 int ret;
31
32 ret = nvgpu_get_nvhost_dev(platform->g);
33 if (ret)
34 return ret;
35
36 vgpu_init_clk_support(platform->g);
37 return 0;
38#else
39 return 0;
40#endif
41}
42
43long vgpu_plat_clk_round_rate(struct device *dev, unsigned long rate)
44{
45 /* server will handle frequency rounding */
46 return rate;
47}
48
49int vgpu_plat_clk_get_freqs(struct device *dev, unsigned long **freqs,
50 int *num_freqs)
51{
52 struct gk20a_platform *platform = gk20a_get_platform(dev);
53 struct gk20a *g = platform->g;
54
55 return vgpu_clk_get_freqs(g, freqs, num_freqs);
56}
57
58int vgpu_plat_clk_cap_rate(struct device *dev, unsigned long rate)
59{
60 struct gk20a_platform *platform = gk20a_get_platform(dev);
61 struct gk20a *g = platform->g;
62
63 return vgpu_clk_cap_rate(g, rate);
64}
65
66struct gk20a_platform vgpu_tegra_platform = {
67 .has_syncpoints = true,
68 .aggressive_sync_destroy_thresh = 64,
69
70 /* power management configuration */
71 .can_railgate_init = false,
72 .can_elpg_init = false,
73 .enable_slcg = false,
74 .enable_blcg = false,
75 .enable_elcg = false,
76 .enable_elpg = false,
77 .enable_aelpg = false,
78 .can_slcg = false,
79 .can_blcg = false,
80 .can_elcg = false,
81
82 .ch_wdt_timeout_ms = 5000,
83
84 .probe = gk20a_tegra_probe,
85
86 .clk_round_rate = vgpu_plat_clk_round_rate,
87 .get_clk_freqs = vgpu_plat_clk_get_freqs,
88
89 /* frequency scaling configuration */
90 .devfreq_governor = "userspace",
91
92 .virtual_dev = true,
93
94 /* power management callbacks */
95 .suspend = vgpu_tegra_suspend,
96 .resume = vgpu_tegra_resume,
97};