diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/clk_gm20b.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/clk_gm20b.c b/drivers/gpu/nvgpu/gm20b/clk_gm20b.c index 29a47f7c..f7404f81 100644 --- a/drivers/gpu/nvgpu/gm20b/clk_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/clk_gm20b.c | |||
@@ -1603,6 +1603,26 @@ static int monitor_get(void *data, u64 *val) | |||
1603 | } | 1603 | } |
1604 | DEFINE_SIMPLE_ATTRIBUTE(monitor_fops, monitor_get, NULL, "%llu\n"); | 1604 | DEFINE_SIMPLE_ATTRIBUTE(monitor_fops, monitor_get, NULL, "%llu\n"); |
1605 | 1605 | ||
1606 | static int pll_param_show(struct seq_file *s, void *data) | ||
1607 | { | ||
1608 | seq_printf(s, "ADC offs = %d uV, ADC slope = %d uV, VCO ctrl = 0x%x\n", | ||
1609 | gpc_pll_params.uvdet_offs, gpc_pll_params.uvdet_slope, | ||
1610 | gpc_pll_params.vco_ctrl); | ||
1611 | return 0; | ||
1612 | } | ||
1613 | |||
1614 | static int pll_param_open(struct inode *inode, struct file *file) | ||
1615 | { | ||
1616 | return single_open(file, pll_param_show, inode->i_private); | ||
1617 | } | ||
1618 | |||
1619 | static const struct file_operations pll_param_fops = { | ||
1620 | .open = pll_param_open, | ||
1621 | .read = seq_read, | ||
1622 | .llseek = seq_lseek, | ||
1623 | .release = single_release, | ||
1624 | }; | ||
1625 | |||
1606 | static int clk_gm20b_debugfs_init(struct gk20a *g) | 1626 | static int clk_gm20b_debugfs_init(struct gk20a *g) |
1607 | { | 1627 | { |
1608 | struct dentry *d; | 1628 | struct dentry *d; |
@@ -1628,6 +1648,16 @@ static int clk_gm20b_debugfs_init(struct gk20a *g) | |||
1628 | if (!d) | 1648 | if (!d) |
1629 | goto err_out; | 1649 | goto err_out; |
1630 | 1650 | ||
1651 | d = debugfs_create_file( | ||
1652 | "pll_param", S_IRUGO, platform->debugfs, g, &pll_param_fops); | ||
1653 | if (!d) | ||
1654 | goto err_out; | ||
1655 | |||
1656 | d = debugfs_create_u32("pll_na_mode", S_IRUGO, platform->debugfs, | ||
1657 | (u32 *)&g->clk.gpc_pll.mode); | ||
1658 | if (!d) | ||
1659 | goto err_out; | ||
1660 | |||
1631 | return 0; | 1661 | return 0; |
1632 | 1662 | ||
1633 | err_out: | 1663 | err_out: |