diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gm206/bios_gm206.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm206/bios_gm206.c | 38 |
1 files changed, 2 insertions, 36 deletions
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) | |||
105 | struct nvgpu_timeout timeout; | 105 | struct nvgpu_timeout timeout; |
106 | 106 | ||
107 | gk20a_dbg_fn(""); | 107 | gk20a_dbg_fn(""); |
108 | nvgpu_flcn_reset(g->pmu.flcn); | ||
109 | 108 | ||
110 | nvgpu_timeout_init(g, &timeout, | 109 | if (nvgpu_flcn_reset(g->pmu.flcn)) { |
111 | PMU_BOOT_TIMEOUT_MAX / | ||
112 | PMU_BOOT_TIMEOUT_DEFAULT, | ||
113 | NVGPU_TIMER_RETRY_TIMER); | ||
114 | do { | ||
115 | u32 w = gk20a_readl(g, pwr_falcon_dmactl_r()) & | ||
116 | (pwr_falcon_dmactl_dmem_scrubbing_m() | | ||
117 | pwr_falcon_dmactl_imem_scrubbing_m()); | ||
118 | |||
119 | if (!w) { | ||
120 | gk20a_dbg_fn("done"); | ||
121 | break; | ||
122 | } | ||
123 | nvgpu_udelay(PMU_BOOT_TIMEOUT_DEFAULT); | ||
124 | } while (!nvgpu_timeout_expired(&timeout)); | ||
125 | |||
126 | if (nvgpu_timeout_peek_expired(&timeout)) { | ||
127 | err = -ETIMEDOUT; | 110 | err = -ETIMEDOUT; |
128 | goto out; | 111 | goto out; |
129 | } | 112 | } |
@@ -187,25 +170,8 @@ static int gm206_bios_preos(struct gk20a *g) | |||
187 | struct nvgpu_timeout timeout; | 170 | struct nvgpu_timeout timeout; |
188 | 171 | ||
189 | gk20a_dbg_fn(""); | 172 | gk20a_dbg_fn(""); |
190 | nvgpu_flcn_reset(g->pmu.flcn); | ||
191 | 173 | ||
192 | nvgpu_timeout_init(g, &timeout, | 174 | if (nvgpu_flcn_reset(g->pmu.flcn)) { |
193 | PMU_BOOT_TIMEOUT_MAX / | ||
194 | PMU_BOOT_TIMEOUT_DEFAULT, | ||
195 | NVGPU_TIMER_RETRY_TIMER); | ||
196 | do { | ||
197 | u32 w = gk20a_readl(g, pwr_falcon_dmactl_r()) & | ||
198 | (pwr_falcon_dmactl_dmem_scrubbing_m() | | ||
199 | pwr_falcon_dmactl_imem_scrubbing_m()); | ||
200 | |||
201 | if (!w) { | ||
202 | gk20a_dbg_fn("done"); | ||
203 | break; | ||
204 | } | ||
205 | nvgpu_udelay(PMU_BOOT_TIMEOUT_DEFAULT); | ||
206 | } while (!nvgpu_timeout_expired(&timeout)); | ||
207 | |||
208 | if (nvgpu_timeout_peek_expired(&timeout)) { | ||
209 | err = -ETIMEDOUT; | 175 | err = -ETIMEDOUT; |
210 | goto out; | 176 | goto out; |
211 | } | 177 | } |