From f16cc93d0a7c818327f08ece1d7fcbefcdbb055b Mon Sep 17 00:00:00 2001 From: Nitin Kumbhar Date: Sun, 12 Aug 2018 11:39:24 +0530 Subject: gpu: nvgpu: move gp106 clk debugfs to linux Move linux dependencies and CONFIG_DEBUG_FS to linux specific code from common driver for gp106 clk debugfs. There is no code change in functions moved from gp106/clk_gp106.c. It uses nvgpu_os_linux_ops to add gp106 specific clk debugfs ops. The linux specific part of nvgpu driver uses this op to initialize gp106 clk debugfs. As gv100 also uses gp106 clk debugfs ops, set up os ops for gv100. JIRA NVGPU-603 Change-Id: Ib55ef051b13366e5907e1d05376bb18bf42c8653 Signed-off-by: Nitin Kumbhar Reviewed-on: https://git-master.nvidia.com/r/1797904 Reviewed-by: svc-misra-checker Reviewed-by: Deepak Nibade GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp106/clk_gp106.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (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 index b7ab3164..079b94f0 100644 --- a/drivers/gpu/nvgpu/gp106/clk_gp106.h +++ b/drivers/gpu/nvgpu/gp106/clk_gp106.h @@ -23,6 +23,7 @@ #define CLK_GP106_H #include +#include #define CLK_NAMEMAP_INDEX_GPC2CLK 0x00 #define CLK_NAMEMAP_INDEX_XBAR2CLK 0x02 @@ -36,22 +37,7 @@ #define XTAL_CNTR_DELAY 1000 /* we need acuracy up to the ms */ #define XTAL_SCALE_TO_KHZ 1 - - -struct namemap_cfg { - u32 namemap; - u32 is_enable; /* Namemap enabled */ - u32 is_counter; /* Using cntr */ - struct gk20a *g; - struct { - u32 reg_ctrl_addr; - u32 reg_ctrl_idx; - u32 reg_cntr_addr; - } cntr; - u32 scale; - char name[24]; -}; - +u32 gp106_get_rate_cntr(struct gk20a *g, struct namemap_cfg *c); int gp106_init_clk_support(struct gk20a *g); u32 gp106_crystal_clk_hz(struct gk20a *g); unsigned long gp106_clk_measure_freq(struct gk20a *g, u32 api_domain); -- cgit v1.2.2