From d71d38087ded679f60714dae3a859523a19df04f Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 24 May 2018 15:25:41 -0700 Subject: gpu: nvgpu: Separate timer from bus Code touching timer registers was combined with bus code. They're two logically separate register spaces, so separate the code accordingly. JIRA NVGPU-588 Change-Id: I40e2925ff156669f41ddc1f2e7714f92a2da367b Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1730893 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp106/hal_gp106.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gp106/hal_gp106.c') diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 1a9c6a74..33e69d4e 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c @@ -24,6 +24,7 @@ #include "common/bus/bus_gk20a.h" #include "common/clock_gating/gp106_gating_reglist.h" +#include "common/ptimer/ptimer_gk20a.h" #include "gk20a/gk20a.h" #include "gk20a/fifo_gk20a.h" @@ -86,7 +87,7 @@ #include #include -#include +#include #include #include #include @@ -720,11 +721,14 @@ static const struct gpu_ops gp106_ops = { .bus = { .init_hw = gk20a_bus_init_hw, .isr = gk20a_bus_isr, - .read_ptimer = gk20a_read_ptimer, - .get_timestamps_zipper = nvgpu_get_timestamps_zipper, .bar1_bind = gk20a_bus_bar1_bind, .set_bar0_window = gk20a_bus_set_bar0_window, }, + .ptimer = { + .isr = gk20a_ptimer_isr, + .read_ptimer = gk20a_read_ptimer, + .get_timestamps_zipper = nvgpu_get_timestamps_zipper, + }, #if defined(CONFIG_GK20A_CYCLE_STATS) .css = { .enable_snapshot = css_hw_enable_snapshot, @@ -806,6 +810,7 @@ int gp106_init_hal(struct gk20a *g) gops->debugger = gp106_ops.debugger; gops->dbg_session_ops = gp106_ops.dbg_session_ops; gops->bus = gp106_ops.bus; + gops->ptimer = gp106_ops.ptimer; #if defined(CONFIG_GK20A_CYCLE_STATS) gops->css = gp106_ops.css; #endif -- cgit v1.2.2