On Tue, Oct 03, 2017 at 09:12:13AM +0300, Timo Alho wrote: > Tegra power management firmware running on 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@xxxxxxxxxx> > --- > Changes in v2: > - Address Jonathan's review feedback > * restructure error printing and what error codes passed to higher > layers > * don't use IS_ERR_OR_NULL() > * avoid overwriting last-character of filename in one corner case > (name length = 255) > > drivers/firmware/tegra/Makefile | 4 +- > drivers/firmware/tegra/bpmp.c | 4 + > drivers/firmware/tegra/bpmp_debugfs.c | 444 ++++++++++++++++++++++++++++++++++ > include/soc/tegra/bpmp.h | 14 ++ > 4 files changed, 465 insertions(+), 1 deletion(-) > create mode 100644 drivers/firmware/tegra/bpmp_debugfs.c I've applied this, though I turned the _ to - in the filename for consistency with other files in the above directory. Thanks, Thierry
Attachment:
signature.asc
Description: PGP signature