diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/linux/nvlink.h | 31 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/nvlink.h | 11 |
2 files changed, 40 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/nvlink.h b/drivers/gpu/nvgpu/include/nvgpu/linux/nvlink.h new file mode 100644 index 00000000..550a897a --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/nvlink.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | * DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #ifndef __NVGPU_LINUX_NVLINK_H__ | ||
24 | #define __NVGPU_LINUX_NVLINK_H__ | ||
25 | |||
26 | #ifdef CONFIG_TEGRA_NVLINK | ||
27 | #include <linux/mutex.h> | ||
28 | #include <linux/platform/tegra/tegra-nvlink.h> | ||
29 | #endif | ||
30 | |||
31 | #endif | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvlink.h b/drivers/gpu/nvgpu/include/nvgpu/nvlink.h index dfa3be3f..00f0eda9 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvlink.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvlink.h | |||
@@ -25,6 +25,12 @@ | |||
25 | 25 | ||
26 | #include <nvgpu/types.h> | 26 | #include <nvgpu/types.h> |
27 | 27 | ||
28 | #ifdef __KERNEL__ | ||
29 | #include <nvgpu/linux/nvlink.h> | ||
30 | #else | ||
31 | #include <nvgpu_rmos/include/nvlink.h> | ||
32 | #endif | ||
33 | |||
28 | struct gk20a; | 34 | struct gk20a; |
29 | 35 | ||
30 | struct nvgpu_nvlink_ioctrl_list { | 36 | struct nvgpu_nvlink_ioctrl_list { |
@@ -207,11 +213,12 @@ struct nvgpu_nvlink_dev { | |||
207 | void *priv; | 213 | void *priv; |
208 | }; | 214 | }; |
209 | 215 | ||
210 | |||
211 | int nvgpu_nvlink_enumerate(struct gk20a *g); | 216 | int nvgpu_nvlink_enumerate(struct gk20a *g); |
212 | int nvgpu_nvlink_train(struct gk20a *g, u32 link_id, bool from_off); | 217 | int nvgpu_nvlink_train(struct gk20a *g, u32 link_id, bool from_off); |
218 | int nvgpu_nvlink_read_dt_props(struct gk20a *g); | ||
219 | |||
213 | int nvgpu_nvlink_probe(struct gk20a *g); | 220 | int nvgpu_nvlink_probe(struct gk20a *g); |
214 | 221 | ||
215 | void nvgpu_mss_nvlink_init_credits(struct gk20a *g); | 222 | void nvgpu_mss_nvlink_init_credits(struct gk20a *g); |
216 | 223 | ||
217 | #endif | 224 | #endif /* __NVGPU_NVLINK_H__ */ |