summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/os_linux.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-06-20 15:18:47 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-06-21 20:34:49 -0400
commit92c43deefca150854193c6720717d56b61989c23 (patch)
tree2dbfdcdb3a0809b80d4fc50e1d882326e54c7d17 /drivers/gpu/nvgpu/common/linux/os_linux.h
parent2ffbdc50d884215ba043e8afd3c3bcbefd1e66f8 (diff)
gpu: nvgpu: Remove Linux devnode fields from gk20a
Move Linux devnode related fields to a new header file os_linux.h. The class structure is defined in module.c, so move its declaration to module.h. JIRA NVGPU-38 Change-Id: I5d8920169064f4289ff61004f7f81543a9aba221 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1505927 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/os_linux.h')
-rw-r--r--drivers/gpu/nvgpu/common/linux/os_linux.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/os_linux.h b/drivers/gpu/nvgpu/common/linux/os_linux.h
new file mode 100644
index 00000000..f23926b3
--- /dev/null
+++ b/drivers/gpu/nvgpu/common/linux/os_linux.h
@@ -0,0 +1,76 @@
1/*
2 * Copyright (c) 2017, 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#ifndef NVGPU_OS_LINUX_H
17#define NVGPU_OS_LINUX_H
18
19#include <linux/cdev.h>
20
21#include "gk20a/gk20a.h"
22
23struct nvgpu_os_linux {
24 struct gk20a g;
25
26 struct {
27 struct cdev cdev;
28 struct device *node;
29 } channel;
30
31 struct {
32 struct cdev cdev;
33 struct device *node;
34 } ctrl;
35
36 struct {
37 struct cdev cdev;
38 struct device *node;
39 } as_dev;
40
41 struct {
42 struct cdev cdev;
43 struct device *node;
44 } dbg;
45
46 struct {
47 struct cdev cdev;
48 struct device *node;
49 } prof;
50
51 struct {
52 struct cdev cdev;
53 struct device *node;
54 } tsg;
55
56 struct {
57 struct cdev cdev;
58 struct device *node;
59 } ctxsw;
60
61 struct {
62 struct cdev cdev;
63 struct device *node;
64 } sched;
65
66 dev_t cdev_region;
67};
68
69static inline struct nvgpu_os_linux *nvgpu_os_linux_from_gk20a(struct gk20a *g)
70{
71 return container_of(g, struct nvgpu_os_linux, g);
72}
73
74#define INTERFACE_NAME "nvhost%s-gpu"
75
76#endif