From 4492c62ffe9398bd4457f6f1c2773e40afe909fb Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 17 Mar 2017 11:09:44 -0700 Subject: gpu: nvgpu: Add bus HAL Add bus HAL and move all bus related hardware sequencing to that file: BAR1 binding, timer access, and interrupt handling. Change-Id: Ibc5f5797dc338de10749b446a7bdbcae600fecb4 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1323353 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 3 ++- drivers/gpu/nvgpu/gp10b/mc_gp10b.c | 2 +- drivers/gpu/nvgpu/gp10b/mm_gp10b.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gp10b') diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 62a19abd..245d2d26 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -21,6 +21,7 @@ #include "gk20a/gk20a.h" #include "gk20a/dbg_gpu_gk20a.h" #include "gk20a/css_gr_gk20a.h" +#include "gk20a/bus_gk20a.h" #include "gp10b/gr_gp10b.h" #include "gp10b/fecs_trace_gp10b.h" @@ -232,6 +233,7 @@ int gp10b_init_hal(struct gk20a *g) } #endif + gk20a_init_bus(gops); gp10b_init_mc(gops); gp10b_init_gr(gops); gp10b_init_fecs_trace_ops(gops); @@ -254,7 +256,6 @@ int gp10b_init_hal(struct gk20a *g) gops->name = "gp10b"; gops->chip_init_gpu_characteristics = gp10b_init_gpu_characteristics; gops->get_litter_value = gp10b_get_litter_value; - gops->read_ptimer = gk20a_read_ptimer; c->twod_class = FERMI_TWOD_A; c->threed_class = PASCAL_A; diff --git a/drivers/gpu/nvgpu/gp10b/mc_gp10b.c b/drivers/gpu/nvgpu/gp10b/mc_gp10b.c index fc0e6553..547169ed 100644 --- a/drivers/gpu/nvgpu/gp10b/mc_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/mc_gp10b.c @@ -162,7 +162,7 @@ irqreturn_t mc_gp10b_intr_thread_stall(struct gk20a *g) if (mc_intr_0 & mc_intr_ltc_pending_f()) g->ops.ltc.isr(g); if (mc_intr_0 & mc_intr_pbus_pending_f()) - gk20a_pbus_isr(g); + g->ops.bus.isr(g); /* sync handled irq counter before re-enabling interrupts */ atomic_set(&g->sw_irq_stall_last_handled, hw_irq_count); diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c index 26facbe3..a5322bad 100644 --- a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c @@ -45,7 +45,7 @@ static int gp10b_init_mm_setup_hw(struct gk20a *g) (g->ops.mm.get_iova_addr(g, g->mm.sysmem_flush.sgt->sgl, 0) >> 8ULL)); - g->ops.mm.bar1_bind(g, inst_block); + g->ops.bus.bar1_bind(g, inst_block); if (g->ops.mm.init_bar2_mm_hw_setup) { err = g->ops.mm.init_bar2_mm_hw_setup(g); -- cgit v1.2.2