summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/clk_gm20b.c
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2014-11-06 00:54:33 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:12:04 -0400
commit16723e5d282ca40aeced4c2767fca6fb0ecf2bc3 (patch)
tree1f307b4b187509a6e3c88aaef4f2f90c270e60f5 /drivers/gpu/nvgpu/gm20b/clk_gm20b.c
parent0e89e423181ca2609fc6911e9c2f828a3e135e7b (diff)
gpu: nvgpu: Add GPCPLL parameters to GM20b debugfs
Bug 1555318 Change-Id: I0338e5d46c7f7d910faada0205dccf28aa62d6c2 Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/594746 Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/clk_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/clk_gm20b.c30
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}
1604DEFINE_SIMPLE_ATTRIBUTE(monitor_fops, monitor_get, NULL, "%llu\n"); 1604DEFINE_SIMPLE_ATTRIBUTE(monitor_fops, monitor_get, NULL, "%llu\n");
1605 1605
1606static 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
1614static int pll_param_open(struct inode *inode, struct file *file)
1615{
1616 return single_open(file, pll_param_show, inode->i_private);
1617}
1618
1619static 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
1606static int clk_gm20b_debugfs_init(struct gk20a *g) 1626static 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
1633err_out: 1663err_out: