mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
drivers: video: tegra: host: decode fw version tag
- Decode firmware version tag from ucode binary. - Add debugfs to dump firmware version tag Jira DLA-318 Change-Id: I0208d8c8da2d91454f3ba0f4efa618cb44e22787 Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1645226 GVS: Gerrit_Virtual_Submit Reviewed-by: Mitch Harwell <mharwell@nvidia.com> Tested-by: Mitch Harwell <mharwell@nvidia.com> Reviewed-by: Ken Adams <kadams@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
2c981f2b3f
commit
2ea8b58dd3
@@ -524,6 +524,43 @@ static ssize_t debug_dla_fw_reload_set(struct file *file,
|
||||
return count;
|
||||
}
|
||||
|
||||
static int nvdla_fw_ver_tag_show(struct seq_file *s, void *unused)
|
||||
{
|
||||
struct nvdla_device *nvdla_dev;
|
||||
struct platform_device *pdev;
|
||||
int err;
|
||||
unsigned int tag;
|
||||
struct flcn *m;
|
||||
|
||||
nvdla_dev = (struct nvdla_device *)s->private;
|
||||
pdev = nvdla_dev->pdev;
|
||||
|
||||
/* update fw_version if engine is not yet powered on */
|
||||
err = nvhost_module_busy(pdev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
m = get_flcn(pdev);
|
||||
tag = m->os.bin_ver_tag;
|
||||
|
||||
nvhost_module_idle(pdev);
|
||||
|
||||
seq_printf(s, "%x\n", tag);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nvdla_fw_ver_tag_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, nvdla_fw_ver_tag_show, inode->i_private);
|
||||
}
|
||||
|
||||
static const struct file_operations nvdla_fw_ver_tag_fops = {
|
||||
.open = nvdla_fw_ver_tag_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
static int debug_dla_fw_reload_show(struct seq_file *s, void *data)
|
||||
{
|
||||
seq_puts(s, "0\n");
|
||||
@@ -613,6 +650,10 @@ static void dla_fw_debugfs_init(struct platform_device *pdev)
|
||||
nvdla_dev, &nvdla_fw_ver_fops))
|
||||
goto trace_failed;
|
||||
|
||||
if (!debugfs_create_file("tag", S_IRUGO, fw_dir,
|
||||
nvdla_dev, &nvdla_fw_ver_tag_fops))
|
||||
goto trace_failed;
|
||||
|
||||
if (!debugfs_create_file("reload", 0600, fw_dir,
|
||||
nvdla_dev, &nvdla_fw_reload_fops))
|
||||
goto trace_failed;
|
||||
|
||||
Reference in New Issue
Block a user