diff options
author | Nitin Kumbhar <nkumbhar@nvidia.com> | 2018-08-12 02:09:24 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-05 07:51:36 -0400 |
commit | f16cc93d0a7c818327f08ece1d7fcbefcdbb055b (patch) | |
tree | 592a06f7c031d16b45e716758890b95f73ee8509 /drivers/gpu/nvgpu/gp106/clk_gp106.h | |
parent | 43851d41b187c92f5ea9c2f503a882277f661d7e (diff) |
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 <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1797904
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/clk_gp106.h')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/clk_gp106.h | 18 |
1 files changed, 2 insertions, 16 deletions
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 @@ | |||
23 | #define CLK_GP106_H | 23 | #define CLK_GP106_H |
24 | 24 | ||
25 | #include <nvgpu/lock.h> | 25 | #include <nvgpu/lock.h> |
26 | #include <nvgpu/clk.h> | ||
26 | 27 | ||
27 | #define CLK_NAMEMAP_INDEX_GPC2CLK 0x00 | 28 | #define CLK_NAMEMAP_INDEX_GPC2CLK 0x00 |
28 | #define CLK_NAMEMAP_INDEX_XBAR2CLK 0x02 | 29 | #define CLK_NAMEMAP_INDEX_XBAR2CLK 0x02 |
@@ -36,22 +37,7 @@ | |||
36 | #define XTAL_CNTR_DELAY 1000 /* we need acuracy up to the ms */ | 37 | #define XTAL_CNTR_DELAY 1000 /* we need acuracy up to the ms */ |
37 | #define XTAL_SCALE_TO_KHZ 1 | 38 | #define XTAL_SCALE_TO_KHZ 1 |
38 | 39 | ||
39 | 40 | u32 gp106_get_rate_cntr(struct gk20a *g, struct namemap_cfg *c); | |
40 | |||
41 | struct namemap_cfg { | ||
42 | u32 namemap; | ||
43 | u32 is_enable; /* Namemap enabled */ | ||
44 | u32 is_counter; /* Using cntr */ | ||
45 | struct gk20a *g; | ||
46 | struct { | ||
47 | u32 reg_ctrl_addr; | ||
48 | u32 reg_ctrl_idx; | ||
49 | u32 reg_cntr_addr; | ||
50 | } cntr; | ||
51 | u32 scale; | ||
52 | char name[24]; | ||
53 | }; | ||
54 | |||
55 | int gp106_init_clk_support(struct gk20a *g); | 41 | int gp106_init_clk_support(struct gk20a *g); |
56 | u32 gp106_crystal_clk_hz(struct gk20a *g); | 42 | u32 gp106_crystal_clk_hz(struct gk20a *g); |
57 | unsigned long gp106_clk_measure_freq(struct gk20a *g, u32 api_domain); | 43 | unsigned long gp106_clk_measure_freq(struct gk20a *g, u32 api_domain); |