diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/acr_gv11b.c | 45 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/acr_gv11b.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 3 |
3 files changed, 24 insertions, 25 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/acr_gv11b.c b/drivers/gpu/nvgpu/gv11b/acr_gv11b.c index b245dbc6..33a36596 100644 --- a/drivers/gpu/nvgpu/gv11b/acr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/acr_gv11b.c | |||
@@ -237,20 +237,8 @@ static int bl_bootstrap(struct nvgpu_pmu *pmu, | |||
237 | return 0; | 237 | return 0; |
238 | } | 238 | } |
239 | 239 | ||
240 | int gv11b_init_pmu_setup_hw1(struct gk20a *g, | 240 | void gv11b_setup_apertures(struct gk20a *g) |
241 | void *desc, u32 bl_sz) | ||
242 | { | 241 | { |
243 | |||
244 | struct nvgpu_pmu *pmu = &g->pmu; | ||
245 | int err; | ||
246 | |||
247 | gk20a_dbg_fn(""); | ||
248 | |||
249 | nvgpu_mutex_acquire(&pmu->isr_mutex); | ||
250 | nvgpu_flcn_reset(pmu->flcn); | ||
251 | pmu->isr_enabled = true; | ||
252 | nvgpu_mutex_release(&pmu->isr_mutex); | ||
253 | |||
254 | /* setup apertures - virtual */ | 242 | /* setup apertures - virtual */ |
255 | gk20a_writel(g, pwr_fbif_transcfg_r(GK20A_PMU_DMAIDX_UCODE), | 243 | gk20a_writel(g, pwr_fbif_transcfg_r(GK20A_PMU_DMAIDX_UCODE), |
256 | pwr_fbif_transcfg_mem_type_physical_f() | | 244 | pwr_fbif_transcfg_mem_type_physical_f() | |
@@ -267,19 +255,26 @@ int gv11b_init_pmu_setup_hw1(struct gk20a *g, | |||
267 | gk20a_writel(g, pwr_fbif_transcfg_r(GK20A_PMU_DMAIDX_PHYS_SYS_NCOH), | 255 | gk20a_writel(g, pwr_fbif_transcfg_r(GK20A_PMU_DMAIDX_PHYS_SYS_NCOH), |
268 | pwr_fbif_transcfg_mem_type_physical_f() | | 256 | pwr_fbif_transcfg_mem_type_physical_f() | |
269 | pwr_fbif_transcfg_target_noncoherent_sysmem_f()); | 257 | pwr_fbif_transcfg_target_noncoherent_sysmem_f()); |
258 | } | ||
259 | |||
260 | int gv11b_init_pmu_setup_hw1(struct gk20a *g, | ||
261 | void *desc, u32 bl_sz) | ||
262 | { | ||
263 | struct nvgpu_pmu *pmu = &g->pmu; | ||
264 | int err; | ||
265 | |||
266 | gk20a_dbg_fn(""); | ||
267 | |||
268 | nvgpu_mutex_acquire(&pmu->isr_mutex); | ||
269 | nvgpu_flcn_reset(pmu->flcn); | ||
270 | pmu->isr_enabled = true; | ||
271 | nvgpu_mutex_release(&pmu->isr_mutex); | ||
272 | |||
273 | if (g->ops.pmu.setup_apertures) | ||
274 | g->ops.pmu.setup_apertures(g); | ||
275 | if (g->ops.pmu.update_lspmu_cmdline_args) | ||
276 | g->ops.pmu.update_lspmu_cmdline_args(g); | ||
270 | 277 | ||
271 | /*Copying pmu cmdline args*/ | ||
272 | g->ops.pmu_ver.set_pmu_cmdline_args_cpu_freq(pmu, | ||
273 | g->ops.clk.get_rate(g, CTRL_CLK_DOMAIN_PWRCLK)); | ||
274 | g->ops.pmu_ver.set_pmu_cmdline_args_secure_mode(pmu, 1); | ||
275 | g->ops.pmu_ver.set_pmu_cmdline_args_trace_size( | ||
276 | pmu, GK20A_PMU_TRACE_BUFSIZE); | ||
277 | g->ops.pmu_ver.set_pmu_cmdline_args_trace_dma_base(pmu); | ||
278 | g->ops.pmu_ver.set_pmu_cmdline_args_trace_dma_idx( | ||
279 | pmu, GK20A_PMU_DMAIDX_VIRT); | ||
280 | nvgpu_flcn_copy_to_dmem(pmu->flcn, g->acr.pmu_args, | ||
281 | (u8 *)(g->ops.pmu_ver.get_pmu_cmdline_args_ptr(pmu)), | ||
282 | g->ops.pmu_ver.get_pmu_cmdline_args_size(pmu), 0); | ||
283 | /*disable irqs for hs falcon booting as we will poll for halt*/ | 278 | /*disable irqs for hs falcon booting as we will poll for halt*/ |
284 | nvgpu_mutex_acquire(&pmu->isr_mutex); | 279 | nvgpu_mutex_acquire(&pmu->isr_mutex); |
285 | pmu_enable_irq(pmu, false); | 280 | pmu_enable_irq(pmu, false); |
diff --git a/drivers/gpu/nvgpu/gv11b/acr_gv11b.h b/drivers/gpu/nvgpu/gv11b/acr_gv11b.h index 72b3ec35..5fbe45e2 100644 --- a/drivers/gpu/nvgpu/gv11b/acr_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/acr_gv11b.h | |||
@@ -27,4 +27,5 @@ | |||
27 | int gv11b_bootstrap_hs_flcn(struct gk20a *g); | 27 | int gv11b_bootstrap_hs_flcn(struct gk20a *g); |
28 | int gv11b_init_pmu_setup_hw1(struct gk20a *g, | 28 | int gv11b_init_pmu_setup_hw1(struct gk20a *g, |
29 | void *desc, u32 bl_sz); | 29 | void *desc, u32 bl_sz); |
30 | void gv11b_setup_apertures(struct gk20a *g); | ||
30 | #endif /*__PMU_GP106_H_*/ | 31 | #endif /*__PMU_GP106_H_*/ |
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 8278d4e5..5649d758 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -747,6 +747,9 @@ int gv11b_init_hal(struct gk20a *g) | |||
747 | gops->pmu.falcon_clear_halt_interrupt_status = | 747 | gops->pmu.falcon_clear_halt_interrupt_status = |
748 | clear_halt_interrupt_status, | 748 | clear_halt_interrupt_status, |
749 | gops->pmu.init_falcon_setup_hw = gv11b_init_pmu_setup_hw1, | 749 | gops->pmu.init_falcon_setup_hw = gv11b_init_pmu_setup_hw1, |
750 | gops->pmu.update_lspmu_cmdline_args = | ||
751 | gm20b_update_lspmu_cmdline_args; | ||
752 | gops->pmu.setup_apertures = gv11b_setup_apertures; | ||
750 | 753 | ||
751 | gops->pmu.init_wpr_region = gm20b_pmu_init_acr; | 754 | gops->pmu.init_wpr_region = gm20b_pmu_init_acr; |
752 | gops->pmu.load_lsfalcon_ucode = gp10b_load_falcon_ucode; | 755 | gops->pmu.load_lsfalcon_ucode = gp10b_load_falcon_ucode; |