From d2b67f1ad606733a63d8261e36068e5bd1f96cdc Mon Sep 17 00:00:00 2001 From: David Nieto Date: Mon, 8 Aug 2016 03:13:37 -0700 Subject: gpu: nvgpu: add debugfs to dump clocks * Removed unused registers from headers * Added counter based MCLK * Removed hardcoding JIRA DNVGPU-98 Change-Id: Idffcd7fc17024582b41c29371a2295df8f0c206b Signed-off-by: David Nieto Reviewed-on: http://git-master/r/1204019 (cherry picked from commit 48dfa41a641c3adbc4d25a35f418cf73b08d5e8c) Reviewed-on: http://git-master/r/1227264 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp106/clk_gp106.h | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 drivers/gpu/nvgpu/gp106/clk_gp106.h (limited to 'drivers/gpu/nvgpu/gp106/clk_gp106.h') diff --git a/drivers/gpu/nvgpu/gp106/clk_gp106.h b/drivers/gpu/nvgpu/gp106/clk_gp106.h new file mode 100644 index 00000000..a50819aa --- /dev/null +++ b/drivers/gpu/nvgpu/gp106/clk_gp106.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef CLK_GP106_H +#define CLK_GP106_H + +#include + +#define CLK_NAMEMAP_INDEX_GPC2CLK 0x00 +#define CLK_NAMEMAP_INDEX_XBAR2CLK 0x02 +#define CLK_NAMEMAP_INDEX_SYS2CLK 0x07 /* SYSPLL */ +#define CLK_NAMEMAP_INDEX_DRAMCLK 0x20 /* DRAMPLL */ + +#define CLK_DEFAULT_CNTRL_SETTLE_RETRIES 10 +#define CLK_DEFAULT_CNTRL_SETTLE_USECS 5 + +#define XTAL_CNTR_CLKS 2700 /* 100usec at 27KHz XTAL */ +#define XTAL_CNTR_DELAY 110 /* leave 10 extra usec */ +#define XTAL_SCALE_TO_KHZ 10 + + + +struct namemap_cfg { + u32 namemap; + u32 is_enable; /* Namemap enabled */ + u32 is_counter; /* Using cntr */ + struct gk20a *g; + union { + struct { + u32 reg_ctrl_addr; + u32 reg_ctrl_idx; + u32 reg_cntr_addr; + } cntr; + struct { + /* Todo */ + } pll; + }; + char name[24]; +}; + +void gp106_init_clk_ops(struct gpu_ops *gops); + +#endif /* CLK_GP106_H */ -- cgit v1.2.2