gpu: nvgpu: Add bus HAL

Add bus HAL and separate bus related functions from mm_gv11b:
timer access.

Change-Id: I311f258857238233103688fb653d27e4e79005a4
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1323354
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Terje Bergstrom
2017-03-17 13:47:54 -07:00
committed by mobile promotions
parent b83f2e282a
commit d409d7ebc1
5 changed files with 50 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ nvgpu-t19x := ../../../../nvgpu-t19x/drivers/gpu/nvgpu
nvgpu-y += \
$(nvgpu-t19x)/gv11b/gv11b.o \
$(nvgpu-t19x)/gv11b/bus_gv11b.o \
$(nvgpu-t19x)/gv11b/mc_gv11b.o \
$(nvgpu-t19x)/gv11b/ltc_gv11b.o \
$(nvgpu-t19x)/gv11b/hal_gv11b.o \

View File

@@ -0,0 +1,26 @@
/*
* GV11B BUS
*
* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#include "bus_gv11b.h"
#include "gk20a/gk20a.h"
#include "gk20a/bus_gk20a.h"
void gv11b_init_bus(struct gpu_ops *gops)
{
gops->bus.init_hw = gk20a_bus_init_hw;
gops->bus.isr = gk20a_bus_isr;
gops->bus.read_ptimer = gk20a_read_ptimer;
gops->bus.bar1_bind = NULL;
}

View File

@@ -0,0 +1,21 @@
/*
* GV11B BUS
* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#ifndef BUS_GV11B_H
#define BUS_GV11B_H
struct gpu_ops;
void gv11b_init_bus(struct gpu_ops *gops);
#endif

View File

@@ -21,6 +21,7 @@
#include "gk20a/gk20a.h"
#include "gk20a/dbg_gpu_gk20a.h"
#include "gk20a/bus_gk20a.h"
#include "gm20b/gr_gm20b.h"
@@ -185,6 +186,7 @@ int gv11b_init_hal(struct gk20a *g)
gops->privsecurity = 0;
gops->securegpccs = 0;
gk20a_init_bus(gops);
gv11b_init_mc(gops);
gv11b_init_ltc(gops);
gv11b_init_gr(gops);
@@ -203,7 +205,6 @@ int gv11b_init_hal(struct gk20a *g)
gops->name = "gv11b";
gops->chip_init_gpu_characteristics = gv11b_init_gpu_characteristics;
gops->get_litter_value = gv11b_get_litter_value;
gops->read_ptimer = gk20a_read_ptimer;
c->twod_class = FERMI_TWOD_A;
c->threed_class = VOLTA_A;

View File

@@ -55,7 +55,6 @@ static bool gv11b_mm_mmu_fault_pending(struct gk20a *g)
void gv11b_init_mm(struct gpu_ops *gops)
{
gp10b_init_mm(gops);
gops->mm.bar1_bind = NULL;
gops->mm.is_bar1_supported = gv11b_mm_is_bar1_supported;
gops->mm.init_inst_block = gv11b_init_inst_block;
gops->mm.init_mm_setup_hw = gk20a_init_mm_setup_hw;