gpu: nvgpu: move usermode to hal/fifo

Moved the following HALs from fifo to usermode
- fifo.ring_channel_doorbell -> usermode.ring_doorbell
- fifo.doorbell_token -> usermode.doorbell_token
- fifo.usermode_base -> usermode.base

Created the following HAL
- usermode.setup_hw

Jira NVGPU-2978

Change-Id: I856ea24c126fa22d2f3fe860d4b14087c6d7330b
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2094813
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Thomas Fleury
2019-04-10 14:13:46 -07:00
committed by mobile promotions
parent 1e3cac3bc8
commit 3c4d6c95df
25 changed files with 271 additions and 158 deletions

View File

@@ -17,12 +17,10 @@
#include "os_linux.h"
#include <nvgpu/hw/gv11b/hw_usermode_gv11b.h>
void nvgpu_usermode_writel(struct gk20a *g, u32 r, u32 v)
{
struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
void __iomem *reg = l->usermode_regs + (r - usermode_cfg0_r());
void __iomem *reg = l->usermode_regs + (r - g->ops.usermode.base(g));
writel_relaxed(v, reg);
nvgpu_log(g, gpu_dbg_reg, "usermode r=0x%x v=0x%x", r, v);