mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
misc: mods: update from Perforce to 4.20
Change-Id: I7ea45fb5aa393372299648e326e81ecf62913b40 Signed-off-by: Chris Dragan <kdragan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2955034 Reviewed-by: Lael Jones <lajones@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6f90c6d858
commit
1a3e4521c8
@@ -12,10 +12,6 @@
|
||||
|
||||
static struct dentry *mods_debugfs_dir;
|
||||
|
||||
#ifdef CONFIG_ARCH_TEGRA_19x_SOC
|
||||
#include "mods_ras.h"
|
||||
#endif
|
||||
|
||||
#if defined(MODS_HAS_TEGRA) && defined(CONFIG_TEGRA_KFUSE)
|
||||
#include <soc/tegra/kfuse.h>
|
||||
#endif
|
||||
@@ -76,40 +72,20 @@ static int mods_mi_set(void *data, u64 val)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_TEGRA_19x_SOC
|
||||
static int mods_set_err_sel(void *data, u64 val)
|
||||
{
|
||||
set_err_sel(val);
|
||||
return 0;
|
||||
}
|
||||
DEFINE_SIMPLE_ATTRIBUTE(mods_err_sel_fops, 0, mods_set_err_sel, "%llu\n");
|
||||
|
||||
static int mods_set_err_ctrl(void *data, u64 val)
|
||||
{
|
||||
set_err_ctrl(val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mods_get_err_ctrl(void *data, u64 *val)
|
||||
{
|
||||
*val = get_err_ctrl();
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_SIMPLE_ATTRIBUTE(mods_err_ctrl_fops, mods_get_err_ctrl,
|
||||
mods_set_err_ctrl, "%llu\n");
|
||||
|
||||
static int mods_enable_cpu_core_reporting(void *data, u64 val)
|
||||
{
|
||||
enable_cpu_core_reporting(val);
|
||||
return 0;
|
||||
}
|
||||
DEFINE_SIMPLE_ATTRIBUTE(mods_enable_cpu_fops, 0, mods_enable_cpu_core_reporting,
|
||||
"%llu\n");
|
||||
#endif
|
||||
|
||||
DEFINE_SIMPLE_ATTRIBUTE(mods_mi_fops, mods_mi_get, mods_mi_set, "%llu\n");
|
||||
|
||||
static int mods_ffa_get(void *data, u64 *val)
|
||||
{
|
||||
#if defined(MODS_HAS_ARM_FFA)
|
||||
*val = 1ULL;
|
||||
#else
|
||||
*val = 0ULL;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_SIMPLE_ATTRIBUTE(mods_ffa_fops, mods_ffa_get, NULL, "%llu\n");
|
||||
|
||||
void mods_remove_debugfs(void)
|
||||
{
|
||||
debugfs_remove_recursive(mods_debugfs_dir);
|
||||
@@ -118,9 +94,6 @@ void mods_remove_debugfs(void)
|
||||
|
||||
int mods_create_debugfs(struct miscdevice *modsdev)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_TEGRA_19x_SOC
|
||||
struct dentry *ras_debugfs_entry;
|
||||
#endif
|
||||
struct dentry *retval;
|
||||
int err = 0;
|
||||
|
||||
@@ -131,36 +104,6 @@ int mods_create_debugfs(struct miscdevice *modsdev)
|
||||
goto remove_out;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_TEGRA_19x_SOC
|
||||
if (of_find_node_by_name(NULL, "carmel_ras")) {
|
||||
ras_debugfs_entry = debugfs_create_dir("ras", mods_debugfs_dir);
|
||||
if (IS_ERR(ras_debugfs_entry)) {
|
||||
err = -EIO;
|
||||
goto remove_out;
|
||||
}
|
||||
|
||||
retval = debugfs_create_file("err_sel", 0644,
|
||||
ras_debugfs_entry, 0, &mods_err_sel_fops);
|
||||
if (IS_ERR(retval)) {
|
||||
err = -EIO;
|
||||
goto remove_out;
|
||||
}
|
||||
|
||||
retval = debugfs_create_file("err_ctrl", 0644,
|
||||
ras_debugfs_entry, 0, &mods_err_ctrl_fops);
|
||||
if (IS_ERR(retval)) {
|
||||
err = -EIO;
|
||||
goto remove_out;
|
||||
}
|
||||
retval = debugfs_create_file("ccplex_config", 0644,
|
||||
ras_debugfs_entry, 0, &mods_enable_cpu_fops);
|
||||
if (IS_ERR(retval)) {
|
||||
err = -EIO;
|
||||
goto remove_out;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
retval = debugfs_create_file("debug", 0644,
|
||||
mods_debugfs_dir, NULL, &mods_debug_fops);
|
||||
if (IS_ERR(retval)) {
|
||||
@@ -175,6 +118,13 @@ int mods_create_debugfs(struct miscdevice *modsdev)
|
||||
goto remove_out;
|
||||
}
|
||||
|
||||
retval = debugfs_create_file("ffa", 0444,
|
||||
mods_debugfs_dir, NULL, &mods_ffa_fops);
|
||||
if (IS_ERR(retval)) {
|
||||
err = -EIO;
|
||||
goto remove_out;
|
||||
}
|
||||
|
||||
#if defined(MODS_HAS_TEGRA) && defined(CONFIG_TEGRA_KFUSE)
|
||||
retval = debugfs_create_file("kfuse_data", 0444,
|
||||
mods_debugfs_dir, NULL, &mods_kfuse_fops);
|
||||
|
||||
Reference in New Issue
Block a user