diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gm206/bios_gm206.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm206/bios_gm206.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gm206/bios_gm206.c b/drivers/gpu/nvgpu/gm206/bios_gm206.c index 216fd594..7aec21e7 100644 --- a/drivers/gpu/nvgpu/gm206/bios_gm206.c +++ b/drivers/gpu/nvgpu/gm206/bios_gm206.c | |||
@@ -166,8 +166,6 @@ out: | |||
166 | static int gm206_bios_preos(struct gk20a *g) | 166 | static int gm206_bios_preos(struct gk20a *g) |
167 | { | 167 | { |
168 | int err = 0; | 168 | int err = 0; |
169 | int val; | ||
170 | struct nvgpu_timeout timeout; | ||
171 | 169 | ||
172 | gk20a_dbg_fn(""); | 170 | gk20a_dbg_fn(""); |
173 | 171 | ||
@@ -196,17 +194,8 @@ static int gm206_bios_preos(struct gk20a *g) | |||
196 | gk20a_writel(g, pwr_falcon_cpuctl_r(), | 194 | gk20a_writel(g, pwr_falcon_cpuctl_r(), |
197 | pwr_falcon_cpuctl_startcpu_f(1)); | 195 | pwr_falcon_cpuctl_startcpu_f(1)); |
198 | 196 | ||
199 | nvgpu_timeout_init(g, &timeout, | 197 | if (nvgpu_flcn_wait_for_halt(g->pmu.flcn, |
200 | PMU_BOOT_TIMEOUT_MAX / | 198 | PMU_BOOT_TIMEOUT_MAX / PMU_BOOT_TIMEOUT_DEFAULT)) { |
201 | PMU_BOOT_TIMEOUT_DEFAULT, | ||
202 | NVGPU_TIMER_CPU_TIMER); | ||
203 | do { | ||
204 | val = pwr_falcon_cpuctl_halt_intr_v( | ||
205 | gk20a_readl(g, pwr_falcon_cpuctl_r())); | ||
206 | nvgpu_udelay(PMU_BOOT_TIMEOUT_DEFAULT); | ||
207 | } while (!val && !nvgpu_timeout_expired(&timeout)); | ||
208 | |||
209 | if (nvgpu_timeout_peek_expired(&timeout)) { | ||
210 | err = -ETIMEDOUT; | 199 | err = -ETIMEDOUT; |
211 | goto out; | 200 | goto out; |
212 | } | 201 | } |