summaryrefslogtreecommitdiffstats
path: root/include/soc
diff options
context:
space:
mode:
authorTimo Alho <talho@nvidia.com>2017-10-03 09:12:13 +0300
committerThierry Reding <treding@nvidia.com>2017-10-19 16:27:56 +0200
commitf2381f652266fabfb7a8f5c4b2a05de36cad3a73 (patch)
tree7cc1a2b2ea4abd3a97676a119960ed7a5d702a06 /include/soc
parent80d47a91e5db96e5db391aaad414fb6ceb40e7c0 (diff)
downloadlinux-f2381f652266fabfb7a8f5c4b2a05de36cad3a73.tar.bz2
firmware: tegra: Add BPMP debugfs support
Tegra power management firmware running on the co-processor (BPMP) implements a simple pseudo file system akin to debugfs. The file system can be used for debugging purposes to examine and change the status of selected resources controlled by the firmware (such as clocks, resets, voltages, powergates, ...). Add support to "mirror" the firmware's file system to debugfs. At boot, query firmware for a list of all possible files and create corresponding debugfs entries. Read/write of individual files is implemented by sending a Message ReQuest (MRQ) that passes the full file path name and data to firmware via DRAM. Signed-off-by: Timo Alho <talho@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/soc')
-rw-r--r--include/soc/tegra/bpmp.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/soc/tegra/bpmp.h b/include/soc/tegra/bpmp.h
index 1cf210504814..aeae4466dd25 100644
--- a/include/soc/tegra/bpmp.h
+++ b/include/soc/tegra/bpmp.h
@@ -94,6 +94,10 @@ struct tegra_bpmp {
struct reset_controller_dev rstc;
struct genpd_onecell_data genpd;
+
+#ifdef CONFIG_DEBUG_FS
+ struct dentry *debugfs_mirror;
+#endif
};
struct tegra_bpmp_message {
@@ -189,4 +193,14 @@ static inline int tegra_bpmp_init_powergates(struct tegra_bpmp *bpmp)
}
#endif
+#if IS_ENABLED(CONFIG_DEBUG_FS)
+int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp);
+#else
+static inline int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)
+{
+ return 0;
+}
+#endif
+
+
#endif /* __SOC_TEGRA_BPMP_H */