summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/xve_gp106.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-08-09 15:38:53 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-10 01:28:32 -0400
commit6e746a97cc7ee2bc5a3adee04dd9c65b3921eee5 (patch)
tree71b9fe0f38f604a4cf21e8b163d221b8a1064a2f /drivers/gpu/nvgpu/gp106/xve_gp106.h
parent6b26d233499f9d447f06e8e72c72ed6728762e37 (diff)
gpu: nvgpu: Move xve HAL to common
Move implementation of xve HAL to common/xve. JIRA NVGPU-959 Change-Id: I27dba43253e3aa8fd11229a9c4fad97aa5cf0b59 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1796147 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/xve_gp106.h')
-rw-r--r--drivers/gpu/nvgpu/gp106/xve_gp106.h72
1 files changed, 0 insertions, 72 deletions
diff --git a/drivers/gpu/nvgpu/gp106/xve_gp106.h b/drivers/gpu/nvgpu/gp106/xve_gp106.h
deleted file mode 100644
index e0be35ac..00000000
--- a/drivers/gpu/nvgpu/gp106/xve_gp106.h
+++ /dev/null
@@ -1,72 +0,0 @@
1/*
2 * Copyright (c) 2016-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 __XVE_GP106_H__
24#define __XVE_GP106_H__
25
26#include "gk20a/gk20a.h"
27
28#include <nvgpu/log2.h>
29#include <nvgpu/types.h>
30
31int gp106_init_xve_ops(struct gpu_ops *gops);
32
33/*
34 * Best guess for a reasonable timeout.
35 */
36#define GPU_XVE_TIMEOUT_MS 500
37
38/*
39 * Debugging for the speed change.
40 */
41enum xv_speed_change_steps {
42 PRE_CHANGE = 0,
43 DISABLE_ASPM,
44 DL_SAFE_MODE,
45 CHECK_LINK,
46 LINK_SETTINGS,
47 EXEC_CHANGE,
48 EXEC_VERIF,
49 CLEANUP
50};
51
52#define xv_dbg(g, fmt, args...) \
53 nvgpu_log(g, gpu_dbg_xv, fmt, ##args)
54
55#define xv_sc_dbg(g, step, fmt, args...) \
56 xv_dbg(g, "[%d] %15s | " fmt, step, __stringify(step), ##args)
57
58void xve_xve_writel_gp106(struct gk20a *g, u32 reg, u32 val);
59u32 xve_xve_readl_gp106(struct gk20a *g, u32 reg);
60void xve_reset_gpu_gp106(struct gk20a *g);
61int xve_get_speed_gp106(struct gk20a *g, u32 *xve_link_speed);
62void xve_disable_aspm_gp106(struct gk20a *g);
63int xve_set_speed_gp106(struct gk20a *g, u32 next_link_speed);
64void xve_available_speeds_gp106(struct gk20a *g, u32 *speed_mask);
65u32 xve_get_link_control_status(struct gk20a *g);
66#if defined(CONFIG_PCI_MSI)
67void xve_rearm_msi_gp106(struct gk20a *g);
68#endif
69void xve_enable_shadow_rom_gp106(struct gk20a *g);
70void xve_disable_shadow_rom_gp106(struct gk20a *g);
71
72#endif