mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +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
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -31,6 +31,16 @@
|
||||
#include <nvgpu/bug.h>
|
||||
#include <nvgpu/string.h>
|
||||
|
||||
void sim_writel(struct sim_nvgpu *sim, u32 r, u32 v)
|
||||
{
|
||||
nvgpu_os_writel(v, sim->regs + r);
|
||||
}
|
||||
|
||||
u32 sim_readl(struct sim_nvgpu *sim, u32 r)
|
||||
{
|
||||
return nvgpu_os_readl(sim->regs + r);
|
||||
}
|
||||
|
||||
int nvgpu_alloc_sim_buffer(struct gk20a *g, struct nvgpu_mem *mem)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
Reference in New Issue
Block a user