diff options
author | Hoang Pham <hopham@nvidia.com> | 2014-07-21 18:21:56 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:33 -0400 |
commit | f7642ca185356f9f5593dad475a710b965d9826b (patch) | |
tree | 8053f02e6f145d6870c5a0788ce5057a7d3cba1c /drivers/gpu/nvgpu/gk20a | |
parent | b972f8d15eca74d91b932f16b09aacb893e110a8 (diff) |
gpu: nvgpu: Fork GM20B clock from GK20A clock
Bug 1450787
Change-Id: Id7fb699d9129a272286d6bc93e0e95844440a628
Signed-off-by: Hoang Pham <hopham@nvidia.com>
Reviewed-on: http://git-master/r/440536
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/clk_gk20a.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/clk_gk20a.h | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 |
4 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/clk_gk20a.c b/drivers/gpu/nvgpu/gk20a/clk_gk20a.c index 30f2b4ed..08e10901 100644 --- a/drivers/gpu/nvgpu/gk20a/clk_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/clk_gk20a.c | |||
@@ -33,7 +33,7 @@ | |||
33 | gk20a_dbg(gpu_dbg_clk, fmt, ##arg) | 33 | gk20a_dbg(gpu_dbg_clk, fmt, ##arg) |
34 | 34 | ||
35 | /* from vbios PLL info table */ | 35 | /* from vbios PLL info table */ |
36 | struct pll_parms gpc_pll_params = { | 36 | static struct pll_parms gpc_pll_params = { |
37 | 144000, 2064000, /* freq */ | 37 | 144000, 2064000, /* freq */ |
38 | 1000000, 2064000, /* vco */ | 38 | 1000000, 2064000, /* vco */ |
39 | 12000, 38000, /* u */ | 39 | 12000, 38000, /* u */ |
@@ -677,6 +677,7 @@ int gk20a_init_clk_support(struct gk20a *g) | |||
677 | void gk20a_init_clk_ops(struct gpu_ops *gops) | 677 | void gk20a_init_clk_ops(struct gpu_ops *gops) |
678 | { | 678 | { |
679 | gops->clk.init_clk_support = gk20a_init_clk_support; | 679 | gops->clk.init_clk_support = gk20a_init_clk_support; |
680 | gops->clk.suspend_clk_support = gk20a_suspend_clk_support; | ||
680 | } | 681 | } |
681 | 682 | ||
682 | unsigned long gk20a_clk_get_rate(struct gk20a *g) | 683 | unsigned long gk20a_clk_get_rate(struct gk20a *g) |
diff --git a/drivers/gpu/nvgpu/gk20a/clk_gk20a.h b/drivers/gpu/nvgpu/gk20a/clk_gk20a.h index 950034a4..4226a375 100644 --- a/drivers/gpu/nvgpu/gk20a/clk_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/clk_gk20a.h | |||
@@ -59,16 +59,16 @@ struct clk_gk20a { | |||
59 | bool debugfs_set; | 59 | bool debugfs_set; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | /* APIs used for separate HAL */ | ||
62 | int gk20a_init_clk_support(struct gk20a *g); | 63 | int gk20a_init_clk_support(struct gk20a *g); |
64 | int gk20a_suspend_clk_support(struct gk20a *g); | ||
65 | struct clk *gk20a_clk_get(struct gk20a *g); | ||
63 | 66 | ||
67 | /* APIs used for both GK20A and GM20B */ | ||
64 | unsigned long gk20a_clk_get_rate(struct gk20a *g); | 68 | unsigned long gk20a_clk_get_rate(struct gk20a *g); |
65 | int gk20a_clk_set_rate(struct gk20a *g, unsigned long rate); | 69 | int gk20a_clk_set_rate(struct gk20a *g, unsigned long rate); |
66 | int gk20a_suspend_clk_support(struct gk20a *g); | ||
67 | struct clk *gk20a_clk_get(struct gk20a *g); | ||
68 | long gk20a_clk_round_rate(struct gk20a *g, unsigned long rate); | 70 | long gk20a_clk_round_rate(struct gk20a *g, unsigned long rate); |
69 | 71 | ||
70 | extern struct pll_parms gpc_pll_params; | ||
71 | |||
72 | #define KHZ 1000 | 72 | #define KHZ 1000 |
73 | #define MHZ 1000000 | 73 | #define MHZ 1000000 |
74 | 74 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index fb4e0886..355b2039 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -810,7 +810,7 @@ static int gk20a_pm_prepare_poweroff(struct device *dev) | |||
810 | ret |= gk20a_fifo_suspend(g); | 810 | ret |= gk20a_fifo_suspend(g); |
811 | 811 | ||
812 | /* Disable GPCPLL */ | 812 | /* Disable GPCPLL */ |
813 | ret |= gk20a_suspend_clk_support(g); | 813 | ret |= g->ops.clk.suspend_clk_support(g); |
814 | 814 | ||
815 | g->power_on = false; | 815 | g->power_on = false; |
816 | 816 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 57cc338c..aeed5838 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -232,6 +232,7 @@ struct gpu_ops { | |||
232 | } pmu; | 232 | } pmu; |
233 | struct { | 233 | struct { |
234 | int (*init_clk_support)(struct gk20a *g); | 234 | int (*init_clk_support)(struct gk20a *g); |
235 | int (*suspend_clk_support)(struct gk20a *g); | ||
235 | } clk; | 236 | } clk; |
236 | }; | 237 | }; |
237 | 238 | ||