From 37ec670601a879781e40ec71d9f713fa9c28564c Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 27 Sep 2017 15:13:45 -0700 Subject: gpu: nvgpu: Move PRAMIN functions to nvgpu_mem PRAMIN batch access functions are only used by nvgpu_mem. The way the functions are written is Linux specific, so move the implementation from common PRAMIN code. JIRA NVGPU-259 Change-Id: I6e2aba08c98568c651a86fe8ca7f9f5220d67348 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1569697 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/pramin.c | 49 --------------------------------------- 1 file changed, 49 deletions(-) (limited to 'drivers/gpu/nvgpu/common/pramin.c') diff --git a/drivers/gpu/nvgpu/common/pramin.c b/drivers/gpu/nvgpu/common/pramin.c index 56179a6b..abe5b561 100644 --- a/drivers/gpu/nvgpu/common/pramin.c +++ b/drivers/gpu/nvgpu/common/pramin.c @@ -34,55 +34,6 @@ */ #define GK20A_FORCE_PRAMIN_DEFAULT false -void pramin_access_batch_rd_n(struct gk20a *g, u32 start, u32 words, u32 **arg) -{ - u32 r = start, *dest_u32 = *arg; - - if (!g->regs) { - __gk20a_warn_on_no_regs(); - return; - } - - while (words--) { - *dest_u32++ = gk20a_readl(g, r); - r += sizeof(u32); - } - - *arg = dest_u32; -} - -void pramin_access_batch_wr_n(struct gk20a *g, u32 start, u32 words, u32 **arg) -{ - u32 r = start, *src_u32 = *arg; - - if (!g->regs) { - __gk20a_warn_on_no_regs(); - return; - } - - while (words--) { - writel_relaxed(*src_u32++, g->regs + r); - r += sizeof(u32); - } - - *arg = src_u32; -} - -void pramin_access_batch_set(struct gk20a *g, u32 start, u32 words, u32 **arg) -{ - u32 r = start, repeat = **arg; - - if (!g->regs) { - __gk20a_warn_on_no_regs(); - return; - } - - while (words--) { - writel_relaxed(repeat, g->regs + r); - r += sizeof(u32); - } -} - /* * The PRAMIN range is 1 MB, must change base addr if a buffer crosses that. * This same loop is used for read/write/memset. Offset and size in bytes. -- cgit v1.2.2