gpu: nvgpu: create separate file for common.netlist hals

Moved common.netlist hals from gk20a.h to newly created
gops_netlist.h file.

JIRA NVGPU-4329

Change-Id: Idaec2f9c0ad11f9dc9aa80acfe06544537c57f3b
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2233745
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Seshendra Gadagottu
2019-11-06 18:41:10 -08:00
committed by Alex Waterman
parent fc71914b28
commit bac80f7e76
3 changed files with 55 additions and 5 deletions

View File

@@ -694,7 +694,8 @@ netlist_fusa:
safe: yes
owner: Seshendra G
gpu: both
sources: [ hal/netlist/netlist_gv11b_fusa.c,
sources: [ include/nvgpu/gops_netlist.h,
hal/netlist/netlist_gv11b_fusa.c,
hal/netlist/netlist_gv11b.h ]
netlist:

View File

@@ -52,6 +52,7 @@
* - @ref unit-common-nvgpu
* - @ref unit-common-ltc
* - @ref unit-common-utils
* - @ref unit-common-netlist
* - @ref unit-mc
* - Etc, etc.
*
@@ -159,6 +160,7 @@ enum nvgpu_unit;
#include <nvgpu/gops_tsg.h>
#include <nvgpu/gops_usermode.h>
#include <nvgpu/gops_mm.h>
#include <nvgpu/gops_netlist.h>
#include <nvgpu/gops_priv_ring.h>
#include <nvgpu/gops_therm.h>
#include <nvgpu/gops_fb.h>
@@ -306,10 +308,7 @@ struct gpu_ops {
struct gops_usermode usermode;
struct gops_engine_status engine_status;
struct gops_pbdma_status pbdma_status;
struct {
int (*get_netlist_name)(struct gk20a *g, int index, char *name);
bool (*is_fw_defined)(void);
} netlist;
struct gops_netlist netlist;
struct gops_mm mm;
/*
* This function is called to allocate secure memory (memory

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef NVGPU_GOPS_NETLIST_H
#define NVGPU_GOPS_NETLIST_H
#include <nvgpu/types.h>
/**
* @file
*
* common.netlist interface.
*/
struct gk20a;
/**
*
* This structure stores common.netlist unit hal pointers.
*
* @see gpu_ops
*/
struct gops_netlist {
/** @cond DOXYGEN_SHOULD_SKIP_THIS */
int (*get_netlist_name)(struct gk20a *g, int index, char *name);
bool (*is_fw_defined)(void);
/** @endcond DOXYGEN_SHOULD_SKIP_THIS */
};
#endif /* NVGPU_GOPS_NETLIST_H */