mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
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>
This commit is contained in:
@@ -1603,6 +1603,26 @@ static int monitor_get(void *data, u64 *val)
|
||||
}
|
||||
DEFINE_SIMPLE_ATTRIBUTE(monitor_fops, monitor_get, NULL, "%llu\n");
|
||||
|
||||
static int pll_param_show(struct seq_file *s, void *data)
|
||||
{
|
||||
seq_printf(s, "ADC offs = %d uV, ADC slope = %d uV, VCO ctrl = 0x%x\n",
|
||||
gpc_pll_params.uvdet_offs, gpc_pll_params.uvdet_slope,
|
||||
gpc_pll_params.vco_ctrl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pll_param_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, pll_param_show, inode->i_private);
|
||||
}
|
||||
|
||||
static const struct file_operations pll_param_fops = {
|
||||
.open = pll_param_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
static int clk_gm20b_debugfs_init(struct gk20a *g)
|
||||
{
|
||||
struct dentry *d;
|
||||
@@ -1628,6 +1648,16 @@ static int clk_gm20b_debugfs_init(struct gk20a *g)
|
||||
if (!d)
|
||||
goto err_out;
|
||||
|
||||
d = debugfs_create_file(
|
||||
"pll_param", S_IRUGO, platform->debugfs, g, &pll_param_fops);
|
||||
if (!d)
|
||||
goto err_out;
|
||||
|
||||
d = debugfs_create_u32("pll_na_mode", S_IRUGO, platform->debugfs,
|
||||
(u32 *)&g->clk.gpc_pll.mode);
|
||||
if (!d)
|
||||
goto err_out;
|
||||
|
||||
return 0;
|
||||
|
||||
err_out:
|
||||
|
||||
Reference in New Issue
Block a user