summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/sim.h
diff options
context:
space:
mode:
authorAntony Clince Alex <aalex@nvidia.com>2018-04-25 11:56:21 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-09 21:25:45 -0400
commit50d1b0c72bfa5bf662c04db85e39c04ca3abfd67 (patch)
tree85d12588affcfcd23a3794257f965542aadea6b1 /drivers/gpu/nvgpu/common/linux/sim.h
parentb144935644f76328aa9ec2592655b4553ed28222 (diff)
gpu: nvgpu: os-agnostic segregation of sim/sim_pci
segregated os-agnostic function from linux/sim.c and linux/sim_pci.c to sim.c and sim_pci.c, while retaining os-specific functions. renamed all gk20a_* api's to nvgpu_*. renamed hw_sim_gk20a.h to nvgpu/hw_sim.h moved hw_sim_pci.h to nvgpu/hw_sim_pci.h JIRA VQRM-2368 Change-Id: I040a6b12b19111a0b99280245808ea2b0f344cdd Signed-off-by: Antony Clince Alex <aalex@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1702425 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/sim.h')
-rw-r--r--drivers/gpu/nvgpu/common/linux/sim.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/sim.h b/drivers/gpu/nvgpu/common/linux/sim.h
index e800728c..12f1a255 100644
--- a/drivers/gpu/nvgpu/common/linux/sim.h
+++ b/drivers/gpu/nvgpu/common/linux/sim.h
@@ -1,6 +1,6 @@
1/* 1/*
2 * 2 *
3 * GK20A sim support 3 * nvgpu sim support
4 * 4 *
5 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. 5 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
6 * 6 *
@@ -23,12 +23,21 @@
23#include <nvgpu/nvgpu_mem.h> 23#include <nvgpu/nvgpu_mem.h>
24#include "gk20a/sim_gk20a.h" 24#include "gk20a/sim_gk20a.h"
25 25
26struct sim_gk20a_linux { 26struct sim_nvgpu_linux {
27 struct sim_gk20a sim; 27 struct sim_nvgpu sim;
28 struct resource *reg_mem; 28 struct resource *reg_mem;
29 void __iomem *regs; 29 void __iomem *regs;
30 void (*remove_support_linux)(struct gk20a *g);
30}; 31};
31 32
32int gk20a_init_sim_support(struct gk20a *g); 33void sim_writel(struct sim_nvgpu *sim, u32 r, u32 v);
33 34u32 sim_readl(struct sim_nvgpu *sim, u32 r);
35int nvgpu_init_sim_support(struct gk20a *g); /* will be moved to common in subsequent patch */
36int nvgpu_alloc_sim_buffer(struct gk20a *g, struct nvgpu_mem *mem); /* will be moved to common in subsequent patch */
37void nvgpu_free_sim_buffer(struct gk20a *g, struct nvgpu_mem *mem); /* will be moved to common in subsequent patch */
38void nvgpu_free_sim_support(struct gk20a *g); /* will be moved to common in subsequent patch */
39void nvgpu_remove_sim_support(struct gk20a *g); /* will be moved to common in subsequent patch */
40int nvgpu_init_sim_support_linux(struct gk20a *g,
41 struct platform_device *dev);
42void nvgpu_remove_sim_support_linux(struct gk20a *g);
34#endif 43#endif