diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2018-05-24 18:25:41 -0400 |
---|---|---|
committer | Tejal Kudav <tkudav@nvidia.com> | 2018-06-14 09:44:07 -0400 |
commit | d71d38087ded679f60714dae3a859523a19df04f (patch) | |
tree | 61439d294705ef91ce08ae4c02d4921eec943283 /drivers/gpu/nvgpu/gm20b | |
parent | 5215d65c25b5e76c19d9d12b03c52f69e2d40227 (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1730893
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/clk_gm20b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 11 |
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/clk_gm20b.c b/drivers/gpu/nvgpu/gm20b/clk_gm20b.c index e5cc6352..f47f6cf6 100644 --- a/drivers/gpu/nvgpu/gm20b/clk_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/clk_gm20b.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <nvgpu/types.h> | 32 | #include <nvgpu/types.h> |
33 | 33 | ||
34 | #include <nvgpu/hw/gm20b/hw_trim_gm20b.h> | 34 | #include <nvgpu/hw/gm20b/hw_trim_gm20b.h> |
35 | #include <nvgpu/hw/gm20b/hw_timer_gm20b.h> | ||
36 | #include <nvgpu/hw/gm20b/hw_therm_gm20b.h> | 35 | #include <nvgpu/hw/gm20b/hw_therm_gm20b.h> |
37 | #include <nvgpu/hw/gm20b/hw_fuse_gm20b.h> | 36 | #include <nvgpu/hw/gm20b/hw_fuse_gm20b.h> |
38 | 37 | ||
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index ea021d27..9f93d0eb 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "common/clock_gating/gm20b_gating_reglist.h" | 25 | #include "common/clock_gating/gm20b_gating_reglist.h" |
26 | #include "common/bus/bus_gm20b.h" | 26 | #include "common/bus/bus_gm20b.h" |
27 | #include "common/bus/bus_gk20a.h" | 27 | #include "common/bus/bus_gk20a.h" |
28 | #include "common/ptimer/ptimer_gk20a.h" | ||
28 | 29 | ||
29 | #include "gk20a/gk20a.h" | 30 | #include "gk20a/gk20a.h" |
30 | #include "gk20a/ce2_gk20a.h" | 31 | #include "gk20a/ce2_gk20a.h" |
@@ -60,7 +61,7 @@ | |||
60 | #include <nvgpu/debug.h> | 61 | #include <nvgpu/debug.h> |
61 | #include <nvgpu/bug.h> | 62 | #include <nvgpu/bug.h> |
62 | #include <nvgpu/enabled.h> | 63 | #include <nvgpu/enabled.h> |
63 | #include <nvgpu/bus.h> | 64 | #include <nvgpu/ptimer.h> |
64 | #include <nvgpu/error_notifier.h> | 65 | #include <nvgpu/error_notifier.h> |
65 | 66 | ||
66 | #include <nvgpu/hw/gm20b/hw_proj_gm20b.h> | 67 | #include <nvgpu/hw/gm20b/hw_proj_gm20b.h> |
@@ -605,11 +606,14 @@ static const struct gpu_ops gm20b_ops = { | |||
605 | .bus = { | 606 | .bus = { |
606 | .init_hw = gk20a_bus_init_hw, | 607 | .init_hw = gk20a_bus_init_hw, |
607 | .isr = gk20a_bus_isr, | 608 | .isr = gk20a_bus_isr, |
608 | .read_ptimer = gk20a_read_ptimer, | ||
609 | .get_timestamps_zipper = nvgpu_get_timestamps_zipper, | ||
610 | .bar1_bind = gm20b_bus_bar1_bind, | 609 | .bar1_bind = gm20b_bus_bar1_bind, |
611 | .set_bar0_window = gk20a_bus_set_bar0_window, | 610 | .set_bar0_window = gk20a_bus_set_bar0_window, |
612 | }, | 611 | }, |
612 | .ptimer = { | ||
613 | .isr = gk20a_ptimer_isr, | ||
614 | .read_ptimer = gk20a_read_ptimer, | ||
615 | .get_timestamps_zipper = nvgpu_get_timestamps_zipper, | ||
616 | }, | ||
613 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 617 | #if defined(CONFIG_GK20A_CYCLE_STATS) |
614 | .css = { | 618 | .css = { |
615 | .enable_snapshot = css_hw_enable_snapshot, | 619 | .enable_snapshot = css_hw_enable_snapshot, |
@@ -667,6 +671,7 @@ int gm20b_init_hal(struct gk20a *g) | |||
667 | gops->debug = gm20b_ops.debug; | 671 | gops->debug = gm20b_ops.debug; |
668 | gops->debugger = gm20b_ops.debugger; | 672 | gops->debugger = gm20b_ops.debugger; |
669 | gops->bus = gm20b_ops.bus; | 673 | gops->bus = gm20b_ops.bus; |
674 | gops->ptimer = gm20b_ops.ptimer; | ||
670 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 675 | #if defined(CONFIG_GK20A_CYCLE_STATS) |
671 | gops->css = gm20b_ops.css; | 676 | gops->css = gm20b_ops.css; |
672 | #endif | 677 | #endif |