summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm206
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-10 16:55:04 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-13 16:44:41 -0400
commita32ec94eb49a5ee9b6fa7479da3ed1e39ea7406d (patch)
tree692890f84b0131a1269924f65c6e9114b7a949d0 /drivers/gpu/nvgpu/gm206
parent947a23606351f1c81072cedcd4ab686d34042912 (diff)
gpu: nvgpu: gm206: Use new delay APIs
Use platform agnostic delay functions instead of Linux kernel APIs. This allows removing dependency to Linux header linux/delay.h. At the same time remove #include lines for other unused Linux headers. JIRA NVGPU-16 Change-Id: I4099070fecde3f55ee1c99ee1b991e67742e2629 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1460115 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gm206')
-rw-r--r--drivers/gpu/nvgpu/gm206/bios_gm206.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gm206/bios_gm206.c b/drivers/gpu/nvgpu/gm206/bios_gm206.c
index 0c4d3e4f..cf737fed 100644
--- a/drivers/gpu/nvgpu/gm206/bios_gm206.c
+++ b/drivers/gpu/nvgpu/gm206/bios_gm206.c
@@ -11,8 +11,6 @@
11 * more details. 11 * more details.
12 */ 12 */
13 13
14#include <linux/delay.h>
15#include <linux/types.h>
16#include <linux/firmware.h> 14#include <linux/firmware.h>
17#include <linux/pci.h> 15#include <linux/pci.h>
18 16
@@ -118,7 +116,7 @@ static int gm206_bios_devinit(struct gk20a *g)
118 gk20a_dbg_fn("done"); 116 gk20a_dbg_fn("done");
119 break; 117 break;
120 } 118 }
121 udelay(PMU_BOOT_TIMEOUT_DEFAULT); 119 nvgpu_udelay(PMU_BOOT_TIMEOUT_DEFAULT);
122 } while (!nvgpu_timeout_expired(&timeout)); 120 } while (!nvgpu_timeout_expired(&timeout));
123 121
124 if (nvgpu_timeout_peek_expired(&timeout)) { 122 if (nvgpu_timeout_peek_expired(&timeout)) {
@@ -161,7 +159,7 @@ static int gm206_bios_devinit(struct gk20a *g)
161 gk20a_readl(g, pwr_falcon_cpuctl_r())) && 159 gk20a_readl(g, pwr_falcon_cpuctl_r())) &&
162 top_scratch1_devinit_completed_v( 160 top_scratch1_devinit_completed_v(
163 gk20a_readl(g, top_scratch1_r())); 161 gk20a_readl(g, top_scratch1_r()));
164 udelay(PMU_BOOT_TIMEOUT_DEFAULT); 162 nvgpu_udelay(PMU_BOOT_TIMEOUT_DEFAULT);
165 } while (!devinit_completed && !nvgpu_timeout_expired(&timeout)); 163 } while (!devinit_completed && !nvgpu_timeout_expired(&timeout));
166 164
167 if (nvgpu_timeout_peek_expired(&timeout)) 165 if (nvgpu_timeout_peek_expired(&timeout))
@@ -196,7 +194,7 @@ static int gm206_bios_preos(struct gk20a *g)
196 gk20a_dbg_fn("done"); 194 gk20a_dbg_fn("done");
197 break; 195 break;
198 } 196 }
199 udelay(PMU_BOOT_TIMEOUT_DEFAULT); 197 nvgpu_udelay(PMU_BOOT_TIMEOUT_DEFAULT);
200 } while (!nvgpu_timeout_expired(&timeout)); 198 } while (!nvgpu_timeout_expired(&timeout));
201 199
202 if (nvgpu_timeout_peek_expired(&timeout)) { 200 if (nvgpu_timeout_peek_expired(&timeout)) {
@@ -229,7 +227,7 @@ static int gm206_bios_preos(struct gk20a *g)
229 do { 227 do {
230 val = pwr_falcon_cpuctl_halt_intr_v( 228 val = pwr_falcon_cpuctl_halt_intr_v(
231 gk20a_readl(g, pwr_falcon_cpuctl_r())); 229 gk20a_readl(g, pwr_falcon_cpuctl_r()));
232 udelay(PMU_BOOT_TIMEOUT_DEFAULT); 230 nvgpu_udelay(PMU_BOOT_TIMEOUT_DEFAULT);
233 } while (!val && !nvgpu_timeout_expired(&timeout)); 231 } while (!val && !nvgpu_timeout_expired(&timeout));
234 232
235 if (nvgpu_timeout_peek_expired(&timeout)) { 233 if (nvgpu_timeout_peek_expired(&timeout)) {