diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/acr_gm20b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/acr_gm20b.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c index 08a58abb..e440e179 100644 --- a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c | |||
@@ -1488,22 +1488,11 @@ err_done: | |||
1488 | */ | 1488 | */ |
1489 | static int pmu_wait_for_halt(struct gk20a *g, unsigned int timeout_ms) | 1489 | static int pmu_wait_for_halt(struct gk20a *g, unsigned int timeout_ms) |
1490 | { | 1490 | { |
1491 | struct nvgpu_pmu *pmu = &g->pmu; | ||
1491 | u32 data = 0; | 1492 | u32 data = 0; |
1492 | int ret = -EBUSY; | 1493 | int ret = -EBUSY; |
1493 | struct nvgpu_timeout timeout; | ||
1494 | |||
1495 | nvgpu_timeout_init(g, &timeout, timeout_ms, NVGPU_TIMER_CPU_TIMER); | ||
1496 | |||
1497 | do { | ||
1498 | data = gk20a_readl(g, pwr_falcon_cpuctl_r()); | ||
1499 | if (data & pwr_falcon_cpuctl_halt_intr_m()) { | ||
1500 | /* CPU is halted break */ | ||
1501 | ret = 0; | ||
1502 | break; | ||
1503 | } | ||
1504 | nvgpu_udelay(1); | ||
1505 | } while (!nvgpu_timeout_expired(&timeout)); | ||
1506 | 1494 | ||
1495 | ret = nvgpu_flcn_wait_for_halt(pmu->flcn, timeout_ms); | ||
1507 | if (ret) { | 1496 | if (ret) { |
1508 | nvgpu_err(g, "ACR boot timed out"); | 1497 | nvgpu_err(g, "ACR boot timed out"); |
1509 | return ret; | 1498 | return ret; |