diff options
author | Supriya <ssharatkumar@nvidia.com> | 2017-10-31 02:24:53 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-27 04:49:17 -0500 |
commit | 6194cfdef52afcb17aa2921685f370e4c5d27819 (patch) | |
tree | dd890e3ea5bd61f204804236dffedd551f30b4fa /drivers/gpu/nvgpu/gv11b/acr_gv11b.c | |
parent | 536ec21b565ab1368b53a26d6ec7ed05857f0775 (diff) |
gpu: nvgpu: split init_falcon_setup_hw
This CL is as part of phased changes to support NO LSPMU
Changes done are to add new pmu ops :
- setup_apertures
- update_lspmu_cmdline_args
These would be called from pmu op init_falcon_setup_hw
JIRA NVGPU-296
Change-Id: Idbcec5c93ca3150df5c9fb81d65b9fce778cecb8
Signed-off-by: Supriya <ssharatkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1589004
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/acr_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/acr_gv11b.c | 45 |
1 files changed, 20 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); |