From c2ca6a1d6f5a97e524fb4dba4dddc7b5b0fd6115 Mon Sep 17 00:00:00 2001 From: vasukis Date: Mon, 22 May 2023 15:42:27 +0000 Subject: [PATCH] tegra: hwpm: Add dev_name details for NVDLA - NVDLA exposes a debug node for HWPM on QNX to send Read/Write register Operation requests. This can be accessed via the 'dev_name' property. - Set fd to 1, to indicate that NVDLA has debug node enabled. Bug 3945000 Change-Id: I8a4859fbafa204c8f8e18292fbd224c4897a85be Signed-off-by: vasukis Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2908524 Reviewed-by: Vedashree Vidwans Reviewed-by: Seema Khowala GVS: Gerrit_Virtual_Submit --- drivers/tegra/hwpm/hal/t234/ip/nvdla/t234_nvdla.c | 8 ++++---- drivers/tegra/hwpm/include/tegra_hwpm.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/tegra/hwpm/hal/t234/ip/nvdla/t234_nvdla.c b/drivers/tegra/hwpm/hal/t234/ip/nvdla/t234_nvdla.c index 3c8b657..e8bbe6d 100644 --- a/drivers/tegra/hwpm/hal/t234/ip/nvdla/t234_nvdla.c +++ b/drivers/tegra/hwpm/hal/t234/ip/nvdla/t234_nvdla.c @@ -166,11 +166,11 @@ static struct hwpm_ip_inst t234_nvdla_inst_static_array[ .ip_dev = NULL, .hwpm_ip_pm = NULL, .hwpm_ip_reg_op = NULL, - .fd = -1, + .fd = 1, }, .element_fs_mask = 0U, - .dev_name = "", + .dev_name = "/dev/nvdladebugfs/nvdla0/hwpm/ctrl", }, { .hw_inst_mask = BIT(1), @@ -229,11 +229,11 @@ static struct hwpm_ip_inst t234_nvdla_inst_static_array[ .ip_dev = NULL, .hwpm_ip_pm = NULL, .hwpm_ip_reg_op = NULL, - .fd = -1, + .fd = 1, }, .element_fs_mask = 0U, - .dev_name = "", + .dev_name = "/dev/nvdladebugfs/nvdla1/hwpm/ctrl", }, }; diff --git a/drivers/tegra/hwpm/include/tegra_hwpm.h b/drivers/tegra/hwpm/include/tegra_hwpm.h index 28f250a..bef1759 100644 --- a/drivers/tegra/hwpm/include/tegra_hwpm.h +++ b/drivers/tegra/hwpm/include/tegra_hwpm.h @@ -152,9 +152,9 @@ struct tegra_hwpm_ip_ops { u32 inst_element_index, u64 reg_offset, u32 *reg_data); /* - * fd - is used to store the - * file descriptor of the IP devctl node - * in QNX + * fd - is used to store the file descriptor of the IP devctl node in QNX. + * Default is -1, which indicates the IP has no debug node enabled for Reg ops. + * Set to 1 if IP has debug node enabled for Reg ops. */ int fd; };