From 50d1b0c72bfa5bf662c04db85e39c04ca3abfd67 Mon Sep 17 00:00:00 2001 From: Antony Clince Alex Date: Wed, 25 Apr 2018 21:26:21 +0530 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1702425 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/sim.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/sim.h') 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 @@ /* * - * GK20A sim support + * nvgpu sim support * * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. * @@ -23,12 +23,21 @@ #include #include "gk20a/sim_gk20a.h" -struct sim_gk20a_linux { - struct sim_gk20a sim; +struct sim_nvgpu_linux { + struct sim_nvgpu sim; struct resource *reg_mem; void __iomem *regs; + void (*remove_support_linux)(struct gk20a *g); }; -int gk20a_init_sim_support(struct gk20a *g); - +void sim_writel(struct sim_nvgpu *sim, u32 r, u32 v); +u32 sim_readl(struct sim_nvgpu *sim, u32 r); +int nvgpu_init_sim_support(struct gk20a *g); /* will be moved to common in subsequent patch */ +int nvgpu_alloc_sim_buffer(struct gk20a *g, struct nvgpu_mem *mem); /* will be moved to common in subsequent patch */ +void nvgpu_free_sim_buffer(struct gk20a *g, struct nvgpu_mem *mem); /* will be moved to common in subsequent patch */ +void nvgpu_free_sim_support(struct gk20a *g); /* will be moved to common in subsequent patch */ +void nvgpu_remove_sim_support(struct gk20a *g); /* will be moved to common in subsequent patch */ +int nvgpu_init_sim_support_linux(struct gk20a *g, + struct platform_device *dev); +void nvgpu_remove_sim_support_linux(struct gk20a *g); #endif -- cgit v1.2.2