mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: create common sim reg accessors
sim reg accessors is common after it moved to use os abstract layer reg accessors. Bug 2999617 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Change-Id: I1c0ff7ca1724cde09dd845c077763709ea2ef915 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2517383 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
86cb03d2f1
commit
ab6d4fa543
@@ -65,9 +65,9 @@ void nvgpu_remove_sim_support_linux_pci(struct gk20a *g)
|
||||
}
|
||||
sim_linux = container_of(g->sim, struct sim_nvgpu_linux, sim);
|
||||
|
||||
if (sim_linux->regs) {
|
||||
if (g->sim->regs) {
|
||||
sim_writel(g->sim, sim_config_r(), sim_config_mode_disabled_v());
|
||||
sim_linux->regs = NULL;
|
||||
g->sim->regs = 0U;
|
||||
}
|
||||
nvgpu_kfree(g, sim_linux);
|
||||
g->sim = NULL;
|
||||
@@ -90,7 +90,7 @@ int nvgpu_init_sim_support_linux_pci(struct gk20a *g)
|
||||
return err;
|
||||
g->sim = &sim_linux->sim;
|
||||
g->sim->g = g;
|
||||
sim_linux->regs = (void __iomem *)g->regs + sim_r();
|
||||
g->sim->regs = g->regs + sim_r();
|
||||
sim_linux->remove_support_linux = nvgpu_remove_sim_support_linux_pci;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user