aboutsummaryrefslogtreecommitdiffstats
path: root/include/os/linux/vgpu/gv11b
diff options
context:
space:
mode:
authorJoshua Bakita <bakitajoshua@gmail.com>2024-09-25 16:09:09 -0400
committerJoshua Bakita <bakitajoshua@gmail.com>2024-09-25 16:09:09 -0400
commitf347fde22f1297e4f022600d201780d5ead78114 (patch)
tree76be305d6187003a1e0486ff6e91efb1062ae118 /include/os/linux/vgpu/gv11b
parent8340d234d78a7d0f46c11a584de538148b78b7cb (diff)
Delete no-longer-needed nvgpu headersHEADmasterjbakita-wip
The dependency on these was removed in commit 8340d234.
Diffstat (limited to 'include/os/linux/vgpu/gv11b')
-rw-r--r--include/os/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c103
1 files changed, 0 insertions, 103 deletions
diff --git a/include/os/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c b/include/os/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c
deleted file mode 100644
index 0304bcc..0000000
--- a/include/os/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c
+++ /dev/null
@@ -1,103 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, 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 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include <linux/platform_device.h>
18
19#include <nvgpu/nvhost.h>
20#include <nvgpu/gk20a.h>
21
22#include "vgpu/clk_vgpu.h"
23#include "os/linux/platform_gk20a.h"
24#include "os/linux/os_linux.h"
25#include "os/linux/vgpu/vgpu_linux.h"
26#include "os/linux/vgpu/platform_vgpu_tegra.h"
27
28static int gv11b_vgpu_probe(struct device *dev)
29{
30 struct platform_device *pdev = to_platform_device(dev);
31 struct gk20a_platform *platform = dev_get_drvdata(dev);
32 struct resource *r;
33 void __iomem *regs;
34 struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(platform->g);
35 struct gk20a *g = platform->g;
36 int ret;
37
38 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "usermode");
39 if (!r) {
40 nvgpu_err(g, "failed to get usermode regs");
41 return -ENXIO;
42 }
43 regs = devm_ioremap_resource(dev, r);
44 if (IS_ERR(regs)) {
45 nvgpu_err(g, "failed to map usermode regs");
46 return PTR_ERR(regs);
47 }
48 l->usermode_regs = regs;
49
50#ifdef CONFIG_TEGRA_GK20A_NVHOST
51 ret = nvgpu_get_nvhost_dev(g);
52 if (ret) {
53 l->usermode_regs = NULL;
54 return ret;
55 }
56
57 ret = nvgpu_nvhost_syncpt_unit_interface_get_aperture(g->nvhost_dev,
58 &g->syncpt_unit_base,
59 &g->syncpt_unit_size);
60 if (ret) {
61 nvgpu_err(g, "Failed to get syncpt interface");
62 return -ENOSYS;
63 }
64 g->syncpt_size = nvgpu_nvhost_syncpt_unit_interface_get_byte_offset(1);
65 nvgpu_info(g, "syncpt_unit_base %llx syncpt_unit_size %zx size %x\n",
66 g->syncpt_unit_base, g->syncpt_unit_size, g->syncpt_size);
67#endif
68 vgpu_init_clk_support(platform->g);
69
70 return 0;
71}
72
73struct gk20a_platform gv11b_vgpu_tegra_platform = {
74 .has_syncpoints = true,
75
76 /* power management configuration */
77 .can_railgate_init = false,
78 .can_elpg_init = false,
79 .enable_slcg = false,
80 .enable_blcg = false,
81 .enable_elcg = false,
82 .enable_elpg = false,
83 .enable_aelpg = false,
84 .can_slcg = false,
85 .can_blcg = false,
86 .can_elcg = false,
87
88 .ch_wdt_timeout_ms = 5000,
89
90 .probe = gv11b_vgpu_probe,
91
92 .clk_round_rate = vgpu_plat_clk_round_rate,
93 .get_clk_freqs = vgpu_plat_clk_get_freqs,
94
95 /* frequency scaling configuration */
96 .devfreq_governor = "userspace",
97
98 .virtual_dev = true,
99
100 /* power management callbacks */
101 .suspend = vgpu_tegra_suspend,
102 .resume = vgpu_tegra_resume,
103};