diff --git a/drivers/tegra/hwpm/common/init.c b/drivers/tegra/hwpm/common/init.c
index 227b8b3..e3f2ac0 100644
--- a/drivers/tegra/hwpm/common/init.c
+++ b/drivers/tegra/hwpm/common/init.c
@@ -132,6 +132,7 @@ int tegra_hwpm_init_sw_components(struct tegra_soc_hwpm *hwpm,
tegra_hwpm_fn(hwpm, " ");
hwpm->dbg_mask = TEGRA_HWPM_DEFAULT_DBG_MASK;
+ hwpm->dbg_skip_alist = false;
err = tegra_hwpm_init_chip_ip_structures(hwpm, chip_id, chip_id_rev);
if (err != 0) {
diff --git a/drivers/tegra/hwpm/common/ip.c b/drivers/tegra/hwpm/common/ip.c
index dbc13e4..604f146 100644
--- a/drivers/tegra/hwpm/common/ip.c
+++ b/drivers/tegra/hwpm/common/ip.c
@@ -369,6 +369,14 @@ static bool tegra_hwpm_addr_in_single_element(struct tegra_soc_hwpm *hwpm,
"a_type %d s_element_idx %d address not in alist",
*ip_idx, (unsigned long long)find_addr,
*s_inst_idx, a_type, *s_element_idx);
+
+ if (hwpm->dbg_skip_alist) {
+ *element_type = element->element_type;
+ tegra_hwpm_dbg(hwpm, hwpm_dbg_regops,
+ "skipping allowlist check");
+ return true;
+ }
+
return false;
}
diff --git a/drivers/tegra/hwpm/include/tegra_hwpm.h b/drivers/tegra/hwpm/include/tegra_hwpm.h
index 9aee42f..bd66ca2 100644
--- a/drivers/tegra/hwpm/include/tegra_hwpm.h
+++ b/drivers/tegra/hwpm/include/tegra_hwpm.h
@@ -623,6 +623,7 @@ struct tegra_soc_hwpm {
bool bind_completed;
bool device_opened;
bool fake_registers_enabled;
+ bool dbg_skip_alist;
};
#endif /* TEGRA_HWPM_H */
diff --git a/drivers/tegra/hwpm/os/linux/debugfs.c b/drivers/tegra/hwpm/os/linux/debugfs.c
index ea29156..1a2e19d 100644
--- a/drivers/tegra/hwpm/os/linux/debugfs.c
+++ b/drivers/tegra/hwpm/os/linux/debugfs.c
@@ -1,18 +1,18 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. 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.
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
+* SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. 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.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*/
#include
@@ -42,6 +42,10 @@ void tegra_hwpm_debugfs_init(struct tegra_hwpm_os_linux *hwpm_linux)
debugfs_create_u32("log_mask", S_IRUGO|S_IWUSR,
hwpm_linux->debugfs_root, &hwpm->dbg_mask);
+ /* Skip allowlist check */
+ debugfs_create_bool("skip_allowlist", S_IRUGO|S_IWUSR,
+ hwpm_linux->debugfs_root, &hwpm->dbg_skip_alist);
+
return;
fail: