From d2486cf1b1d0b0e3306ba6eb0a8b6573fa27d03e Mon Sep 17 00:00:00 2001 From: Mahantesh Kumbar Date: Wed, 28 Jun 2017 23:00:04 +0530 Subject: gpu: nvgpu: PMU IMEM/DMEM scrubbing cleanup PMU IMEM/DMEM scrubbing completion check is part of PMU reset, so removing explicit IMEM/DMEM scrubbing check NVGPU JIRA-99 Change-Id: I4553701fd8c08217e109ef3a5fe1e33e372c26d4 Signed-off-by: Mahantesh Kumbar Reviewed-on: https://git-master/r/1510202 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gm206/bios_gm206.c | 38 ++---------------------------------- 1 file changed, 2 insertions(+), 36 deletions(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gm206/bios_gm206.c b/drivers/gpu/nvgpu/gm206/bios_gm206.c index 3002c9c7..216fd594 100644 --- a/drivers/gpu/nvgpu/gm206/bios_gm206.c +++ b/drivers/gpu/nvgpu/gm206/bios_gm206.c @@ -105,25 +105,8 @@ static int gm206_bios_devinit(struct gk20a *g) struct nvgpu_timeout timeout; gk20a_dbg_fn(""); - nvgpu_flcn_reset(g->pmu.flcn); - nvgpu_timeout_init(g, &timeout, - PMU_BOOT_TIMEOUT_MAX / - PMU_BOOT_TIMEOUT_DEFAULT, - NVGPU_TIMER_RETRY_TIMER); - do { - u32 w = gk20a_readl(g, pwr_falcon_dmactl_r()) & - (pwr_falcon_dmactl_dmem_scrubbing_m() | - pwr_falcon_dmactl_imem_scrubbing_m()); - - if (!w) { - gk20a_dbg_fn("done"); - break; - } - nvgpu_udelay(PMU_BOOT_TIMEOUT_DEFAULT); - } while (!nvgpu_timeout_expired(&timeout)); - - if (nvgpu_timeout_peek_expired(&timeout)) { + if (nvgpu_flcn_reset(g->pmu.flcn)) { err = -ETIMEDOUT; goto out; } @@ -187,25 +170,8 @@ static int gm206_bios_preos(struct gk20a *g) struct nvgpu_timeout timeout; gk20a_dbg_fn(""); - nvgpu_flcn_reset(g->pmu.flcn); - nvgpu_timeout_init(g, &timeout, - PMU_BOOT_TIMEOUT_MAX / - PMU_BOOT_TIMEOUT_DEFAULT, - NVGPU_TIMER_RETRY_TIMER); - do { - u32 w = gk20a_readl(g, pwr_falcon_dmactl_r()) & - (pwr_falcon_dmactl_dmem_scrubbing_m() | - pwr_falcon_dmactl_imem_scrubbing_m()); - - if (!w) { - gk20a_dbg_fn("done"); - break; - } - nvgpu_udelay(PMU_BOOT_TIMEOUT_DEFAULT); - } while (!nvgpu_timeout_expired(&timeout)); - - if (nvgpu_timeout_peek_expired(&timeout)) { + if (nvgpu_flcn_reset(g->pmu.flcn)) { err = -ETIMEDOUT; goto out; } -- cgit v1.2.2