summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2018-03-12 17:44:00 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-04-05 14:24:13 -0400
commitceb0ecb7668d6b32ead207b8d93a5646dd86ab0b (patch)
treed74348a9412acf6cbebb0540a709171996e97663
parent43861331c5c9832a1f7c9ae6c96895a4253f250c (diff)
gpu: nvgpu: gp106: Reduce usage of os_linux.h
In clk_gp106 the Linux platform specific data is only referenced if debugfs is being used. Thus only include the Linux OS stuff if debugfs is enabled. This allows us to compile the rest of the clk code in non- Linux kernel environments. Also delete os_linux.h from xve_gp106.c since that header is unused in the XVE code (and also do a minor cleanup by deleting the pr_warn()). JIRA NVGPU-525 Signed-off-by: Alex Waterman <alexw@nvidia.com> Change-Id: I5a20ba3b02eb2d8741c73ef2ded9276f6aebb957 Reviewed-on: https://git-master.nvidia.com/r/1687090 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/gp106/clk_gp106.c5
-rw-r--r--drivers/gpu/nvgpu/gp106/xve_gp106.c5
2 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gp106/clk_gp106.c b/drivers/gpu/nvgpu/gp106/clk_gp106.c
index 2ac2ce5a..9a94a7b9 100644
--- a/drivers/gpu/nvgpu/gp106/clk_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/clk_gp106.c
@@ -24,17 +24,16 @@
24 24
25#ifdef CONFIG_DEBUG_FS 25#ifdef CONFIG_DEBUG_FS
26#include <linux/debugfs.h> 26#include <linux/debugfs.h>
27#include "common/linux/os_linux.h"
27#endif 28#endif
28 29
29#include <nvgpu/kmem.h> 30#include <nvgpu/kmem.h>
30 31
31#include "gk20a/gk20a.h" 32#include "gk20a/gk20a.h"
32#include "common/linux/os_linux.h" 33#include "gp106/mclk_gp106.h"
33 34
34#include "clk_gp106.h" 35#include "clk_gp106.h"
35 36
36#include "gp106/mclk_gp106.h"
37
38#include <nvgpu/hw/gp106/hw_trim_gp106.h> 37#include <nvgpu/hw/gp106/hw_trim_gp106.h>
39 38
40#define gk20a_dbg_clk(fmt, arg...) \ 39#define gk20a_dbg_clk(fmt, arg...) \
diff --git a/drivers/gpu/nvgpu/gp106/xve_gp106.c b/drivers/gpu/nvgpu/gp106/xve_gp106.c
index ac6684a5..9becd0f2 100644
--- a/drivers/gpu/nvgpu/gp106/xve_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/xve_gp106.c
@@ -23,7 +23,6 @@
23#include "gk20a/gk20a.h" 23#include "gk20a/gk20a.h"
24#include "gp106/bios_gp106.h" 24#include "gp106/bios_gp106.h"
25#include "gp106/xve_gp106.h" 25#include "gp106/xve_gp106.h"
26#include "common/linux/os_linux.h"
27 26
28#include <nvgpu/bug.h> 27#include <nvgpu/bug.h>
29#include <nvgpu/xve.h> 28#include <nvgpu/xve.h>
@@ -108,10 +107,8 @@ int xve_get_speed_gp106(struct gk20a *g, u32 *xve_link_speed)
108 if (link_speed == xve_link_control_status_link_speed_link_speed_8p0_v()) 107 if (link_speed == xve_link_control_status_link_speed_link_speed_8p0_v())
109 real_link_speed = GPU_XVE_SPEED_8P0; 108 real_link_speed = GPU_XVE_SPEED_8P0;
110 109
111 if (!real_link_speed) { 110 if (!real_link_speed)
112 pr_warn("%s: Unknown PCIe bus speed!\n", __func__);
113 return -ENODEV; 111 return -ENODEV;
114 }
115 112
116 *xve_link_speed = real_link_speed; 113 *xve_link_speed = real_link_speed;
117 return 0; 114 return 0;