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/os/linux/module.c | |
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/os/linux/module.c')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/module.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/module.c b/drivers/gpu/nvgpu/os/linux/module.c index d226ceeb..02b0ea5c 100644 --- a/drivers/gpu/nvgpu/os/linux/module.c +++ b/drivers/gpu/nvgpu/os/linux/module.c | |||
@@ -198,6 +198,14 @@ int nvgpu_finalize_poweron_linux(struct nvgpu_os_linux *l) | |||
198 | return err; | 198 | return err; |
199 | } | 199 | } |
200 | 200 | ||
201 | if (l->ops.clk.init_debugfs) { | ||
202 | err = l->ops.clk.init_debugfs(g); | ||
203 | if (err) { | ||
204 | nvgpu_err(g, "failed to init linux clk debugfs"); | ||
205 | return err; | ||
206 | } | ||
207 | } | ||
208 | |||
201 | l->init_done = true; | 209 | l->init_done = true; |
202 | 210 | ||
203 | return 0; | 211 | return 0; |
@@ -250,6 +258,10 @@ int gk20a_pm_finalize_poweron(struct device *dev) | |||
250 | if (err) | 258 | if (err) |
251 | goto done; | 259 | goto done; |
252 | 260 | ||
261 | err = nvgpu_init_os_linux_ops(l); | ||
262 | if (err) | ||
263 | goto done; | ||
264 | |||
253 | err = nvgpu_finalize_poweron_linux(l); | 265 | err = nvgpu_finalize_poweron_linux(l); |
254 | if (err) | 266 | if (err) |
255 | goto done; | 267 | goto done; |
@@ -268,10 +280,6 @@ int gk20a_pm_finalize_poweron(struct device *dev) | |||
268 | 280 | ||
269 | trace_gk20a_finalize_poweron_done(dev_name(dev)); | 281 | trace_gk20a_finalize_poweron_done(dev_name(dev)); |
270 | 282 | ||
271 | err = nvgpu_init_os_linux_ops(l); | ||
272 | if (err) | ||
273 | goto done; | ||
274 | |||
275 | enable_irq(g->irq_stall); | 283 | enable_irq(g->irq_stall); |
276 | if (g->irq_stall != g->irq_nonstall) | 284 | if (g->irq_stall != g->irq_nonstall) |
277 | enable_irq(g->irq_nonstall); | 285 | enable_irq(g->irq_nonstall); |