mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: add common fuse APIs
Add a new file common/linux/fuse.c for common fuse operations with below APIs nvgpu_tegra_fuse_read() nvgpu_tegra_fuse_write() nvgpu_tegra_get_gpu_speedo_id() Export the APIs in header <nvgpu/fuse.h> Jira NVGPU-49 Jira NVGPU-75 Change-Id: I5b0b0772584a5d408b23e629df9c5f73ecc05f6b Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1483860 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6d2d3a3d93
commit
fa68aa53ef
31
drivers/gpu/nvgpu/common/linux/fuse.c
Normal file
31
drivers/gpu/nvgpu/common/linux/fuse.c
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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 <soc/tegra/fuse.h>
|
||||
|
||||
#include <nvgpu/fuse.h>
|
||||
|
||||
int nvgpu_tegra_fuse_read(unsigned long offset, u32 *value)
|
||||
{
|
||||
return tegra_fuse_readl(offset, value);
|
||||
}
|
||||
|
||||
void nvgpu_tegra_fuse_write(u32 value, unsigned long offset)
|
||||
{
|
||||
tegra_fuse_control_write(value, offset);
|
||||
}
|
||||
|
||||
int nvgpu_tegra_get_gpu_speedo_id(void)
|
||||
{
|
||||
return tegra_sku_info.gpu_speedo_id;
|
||||
}
|
||||
Reference in New Issue
Block a user