diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2014-11-04 08:14:28 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:12:01 -0400 |
commit | b3f575074b66e8af1a9943874f9782b793fa7edc (patch) | |
tree | c4aaa1defc512cf5a896edc25445f169de184ece /drivers/gpu/nvgpu/gm20b | |
parent | 797e4dd319bd2b9e13ce0e44a3bbbb75e4820330 (diff) |
gpu: nvgpu: fix sparse warnings
Fix below sparse warnings :
warning: Using plain integer as NULL pointer
warning: symbol <variable/funcion> was not declared. Should it be static?
warning: Initializer entry defined twice
Also, remove dead functions
Bug 1573254
Change-Id: I29d71ecc01c841233cf6b26c9088ca8874773469
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/593363
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/acr_gm20b.c | 16 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/fb_gm20b.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/gm20b_gating_reglist.c | 78 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/gr_ctx_gm20b.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/ltc_gm20b.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/mm_gm20b.c | 7 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/pmu_gm20b.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/regops_gm20b.c | 27 |
10 files changed, 61 insertions, 89 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c index 50b495a6..470a93bc 100644 --- a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c | |||
@@ -55,13 +55,13 @@ static void free_acr_resources(struct gk20a *g, struct ls_flcn_mgr *plsfm); | |||
55 | 55 | ||
56 | /*Globals*/ | 56 | /*Globals*/ |
57 | static void __iomem *mc = IO_ADDRESS(TEGRA_MC_BASE); | 57 | static void __iomem *mc = IO_ADDRESS(TEGRA_MC_BASE); |
58 | get_ucode_details pmu_acr_supp_ucode_list[] = { | 58 | static get_ucode_details pmu_acr_supp_ucode_list[] = { |
59 | pmu_ucode_details, | 59 | pmu_ucode_details, |
60 | fecs_ucode_details, | 60 | fecs_ucode_details, |
61 | }; | 61 | }; |
62 | 62 | ||
63 | /*Once is LS mode, cpuctl_alias is only accessible*/ | 63 | /*Once is LS mode, cpuctl_alias is only accessible*/ |
64 | void start_gm20b_pmu(struct gk20a *g) | 64 | static void start_gm20b_pmu(struct gk20a *g) |
65 | { | 65 | { |
66 | /*disable irqs for hs falcon booting as we will poll for halt*/ | 66 | /*disable irqs for hs falcon booting as we will poll for halt*/ |
67 | mutex_lock(&g->pmu.isr_mutex); | 67 | mutex_lock(&g->pmu.isr_mutex); |
@@ -272,7 +272,7 @@ int prepare_ucode_blob(struct gk20a *g) | |||
272 | return 0; | 272 | return 0; |
273 | } | 273 | } |
274 | 274 | ||
275 | u8 lsfm_falcon_disabled(struct gk20a *g, struct ls_flcn_mgr *plsfm, | 275 | static u8 lsfm_falcon_disabled(struct gk20a *g, struct ls_flcn_mgr *plsfm, |
276 | u32 falcon_id) | 276 | u32 falcon_id) |
277 | { | 277 | { |
278 | return (plsfm->disable_mask >> falcon_id) & 0x1; | 278 | return (plsfm->disable_mask >> falcon_id) & 0x1; |
@@ -364,7 +364,7 @@ static int lsfm_discover_ucode_images(struct gk20a *g, | |||
364 | } | 364 | } |
365 | 365 | ||
366 | 366 | ||
367 | int pmu_populate_loader_cfg(struct gk20a *g, | 367 | static int pmu_populate_loader_cfg(struct gk20a *g, |
368 | struct lsfm_managed_ucode_img *lsfm, | 368 | struct lsfm_managed_ucode_img *lsfm, |
369 | union flcn_bl_generic_desc *p_bl_gen_desc, u32 *p_bl_gen_desc_size) | 369 | union flcn_bl_generic_desc *p_bl_gen_desc, u32 *p_bl_gen_desc_size) |
370 | { | 370 | { |
@@ -431,7 +431,7 @@ int pmu_populate_loader_cfg(struct gk20a *g, | |||
431 | return 0; | 431 | return 0; |
432 | } | 432 | } |
433 | 433 | ||
434 | int flcn_populate_bl_dmem_desc(struct gk20a *g, | 434 | static int flcn_populate_bl_dmem_desc(struct gk20a *g, |
435 | struct lsfm_managed_ucode_img *lsfm, | 435 | struct lsfm_managed_ucode_img *lsfm, |
436 | union flcn_bl_generic_desc *p_bl_gen_desc, u32 *p_bl_gen_desc_size) | 436 | union flcn_bl_generic_desc *p_bl_gen_desc, u32 *p_bl_gen_desc_size) |
437 | { | 437 | { |
@@ -1019,7 +1019,7 @@ err_release_acr_fw: | |||
1019 | return err; | 1019 | return err; |
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | u8 pmu_is_debug_mode_en(struct gk20a *g) | 1022 | static u8 pmu_is_debug_mode_en(struct gk20a *g) |
1023 | { | 1023 | { |
1024 | u32 ctl_stat = gk20a_readl(g, pwr_pmu_scpctl_stat_r()); | 1024 | u32 ctl_stat = gk20a_readl(g, pwr_pmu_scpctl_stat_r()); |
1025 | return pwr_pmu_scpctl_stat_debug_mode_v(ctl_stat); | 1025 | return pwr_pmu_scpctl_stat_debug_mode_v(ctl_stat); |
@@ -1125,8 +1125,8 @@ static int bl_bootstrap(struct pmu_gk20a *pmu, | |||
1125 | return 0; | 1125 | return 0; |
1126 | } | 1126 | } |
1127 | 1127 | ||
1128 | int gm20b_init_pmu_setup_hw1(struct gk20a *g, struct flcn_bl_dmem_desc *desc, | 1128 | static int gm20b_init_pmu_setup_hw1(struct gk20a *g, |
1129 | u32 bl_sz) | 1129 | struct flcn_bl_dmem_desc *desc, u32 bl_sz) |
1130 | { | 1130 | { |
1131 | 1131 | ||
1132 | struct pmu_gk20a *pmu = &g->pmu; | 1132 | struct pmu_gk20a *pmu = &g->pmu; |
diff --git a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c index a2aa81d8..293c6c74 100644 --- a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c | |||
@@ -64,7 +64,7 @@ static bool gm20b_kind_zbc(u8 k) | |||
64 | k <= gmmu_pte_kind_s8_2s_v()); | 64 | k <= gmmu_pte_kind_s8_2s_v()); |
65 | } | 65 | } |
66 | 66 | ||
67 | void gm20b_init_kind_attr(void) | 67 | static void gm20b_init_kind_attr(void) |
68 | { | 68 | { |
69 | u16 k; | 69 | u16 k; |
70 | 70 | ||
diff --git a/drivers/gpu/nvgpu/gm20b/gm20b_gating_reglist.c b/drivers/gpu/nvgpu/gm20b/gm20b_gating_reglist.c index b5477c0f..6d94e299 100644 --- a/drivers/gpu/nvgpu/gm20b/gm20b_gating_reglist.c +++ b/drivers/gpu/nvgpu/gm20b/gm20b_gating_reglist.c | |||
@@ -30,17 +30,17 @@ struct gating_desc { | |||
30 | u32 disable; | 30 | u32 disable; |
31 | }; | 31 | }; |
32 | /* slcg bus */ | 32 | /* slcg bus */ |
33 | const struct gating_desc gm20b_slcg_bus[] = { | 33 | static const struct gating_desc gm20b_slcg_bus[] = { |
34 | {.addr = 0x00001c04, .prod = 0x00000000, .disable = 0x000003fe}, | 34 | {.addr = 0x00001c04, .prod = 0x00000000, .disable = 0x000003fe}, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | /* slcg ce2 */ | 37 | /* slcg ce2 */ |
38 | const struct gating_desc gm20b_slcg_ce2[] = { | 38 | static const struct gating_desc gm20b_slcg_ce2[] = { |
39 | {.addr = 0x00106f28, .prod = 0x00000000, .disable = 0x000007fe}, | 39 | {.addr = 0x00106f28, .prod = 0x00000000, .disable = 0x000007fe}, |
40 | }; | 40 | }; |
41 | 41 | ||
42 | /* slcg chiplet */ | 42 | /* slcg chiplet */ |
43 | const struct gating_desc gm20b_slcg_chiplet[] = { | 43 | static const struct gating_desc gm20b_slcg_chiplet[] = { |
44 | {.addr = 0x0010c07c, .prod = 0x00000000, .disable = 0x00000007}, | 44 | {.addr = 0x0010c07c, .prod = 0x00000000, .disable = 0x00000007}, |
45 | {.addr = 0x0010e07c, .prod = 0x00000000, .disable = 0x00000007}, | 45 | {.addr = 0x0010e07c, .prod = 0x00000000, .disable = 0x00000007}, |
46 | {.addr = 0x0010d07c, .prod = 0x00000000, .disable = 0x00000007}, | 46 | {.addr = 0x0010d07c, .prod = 0x00000000, .disable = 0x00000007}, |
@@ -48,23 +48,23 @@ const struct gating_desc gm20b_slcg_chiplet[] = { | |||
48 | }; | 48 | }; |
49 | 49 | ||
50 | /* slcg ctxsw firmware */ | 50 | /* slcg ctxsw firmware */ |
51 | const struct gating_desc gm20b_slcg_ctxsw_firmware[] = { | 51 | static const struct gating_desc gm20b_slcg_ctxsw_firmware[] = { |
52 | {.addr = 0x00005f00, .prod = 0x00020008, .disable = 0x0003fffe}, | 52 | {.addr = 0x00005f00, .prod = 0x00020008, .disable = 0x0003fffe}, |
53 | }; | 53 | }; |
54 | 54 | ||
55 | /* slcg fb */ | 55 | /* slcg fb */ |
56 | const struct gating_desc gm20b_slcg_fb[] = { | 56 | static const struct gating_desc gm20b_slcg_fb[] = { |
57 | {.addr = 0x00100d14, .prod = 0xfffffffe, .disable = 0xfffffffe}, | 57 | {.addr = 0x00100d14, .prod = 0xfffffffe, .disable = 0xfffffffe}, |
58 | {.addr = 0x00100c9c, .prod = 0x000001fe, .disable = 0x000001fe}, | 58 | {.addr = 0x00100c9c, .prod = 0x000001fe, .disable = 0x000001fe}, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | /* slcg fifo */ | 61 | /* slcg fifo */ |
62 | const struct gating_desc gm20b_slcg_fifo[] = { | 62 | static const struct gating_desc gm20b_slcg_fifo[] = { |
63 | {.addr = 0x000026ac, .prod = 0x00000100, .disable = 0x0001fffe}, | 63 | {.addr = 0x000026ac, .prod = 0x00000100, .disable = 0x0001fffe}, |
64 | }; | 64 | }; |
65 | 65 | ||
66 | /* slcg gr */ | 66 | /* slcg gr */ |
67 | const struct gating_desc gm20b_slcg_gr[] = { | 67 | static const struct gating_desc gm20b_slcg_gr[] = { |
68 | {.addr = 0x004041f4, .prod = 0x00000000, .disable = 0x03fffffe}, | 68 | {.addr = 0x004041f4, .prod = 0x00000000, .disable = 0x03fffffe}, |
69 | {.addr = 0x0040917c, .prod = 0x00020008, .disable = 0x0003fffe}, | 69 | {.addr = 0x0040917c, .prod = 0x00020008, .disable = 0x0003fffe}, |
70 | {.addr = 0x00409894, .prod = 0x00000000, .disable = 0x0003fffe}, | 70 | {.addr = 0x00409894, .prod = 0x00000000, .disable = 0x0003fffe}, |
@@ -126,13 +126,13 @@ const struct gating_desc gm20b_slcg_gr[] = { | |||
126 | }; | 126 | }; |
127 | 127 | ||
128 | /* slcg ltc */ | 128 | /* slcg ltc */ |
129 | const struct gating_desc gm20b_slcg_ltc[] = { | 129 | static const struct gating_desc gm20b_slcg_ltc[] = { |
130 | {.addr = 0x0017e050, .prod = 0x00000000, .disable = 0xfffffffe}, | 130 | {.addr = 0x0017e050, .prod = 0x00000000, .disable = 0xfffffffe}, |
131 | {.addr = 0x0017e35c, .prod = 0x00000000, .disable = 0xfffffffe}, | 131 | {.addr = 0x0017e35c, .prod = 0x00000000, .disable = 0xfffffffe}, |
132 | }; | 132 | }; |
133 | 133 | ||
134 | /* slcg perf */ | 134 | /* slcg perf */ |
135 | const struct gating_desc gm20b_slcg_perf[] = { | 135 | static const struct gating_desc gm20b_slcg_perf[] = { |
136 | {.addr = 0x001be018, .prod = 0x000001ff, .disable = 0x00000000}, | 136 | {.addr = 0x001be018, .prod = 0x000001ff, .disable = 0x00000000}, |
137 | {.addr = 0x001bc018, .prod = 0x000001ff, .disable = 0x00000000}, | 137 | {.addr = 0x001bc018, .prod = 0x000001ff, .disable = 0x00000000}, |
138 | {.addr = 0x001b8018, .prod = 0x000001ff, .disable = 0x00000000}, | 138 | {.addr = 0x001b8018, .prod = 0x000001ff, .disable = 0x00000000}, |
@@ -140,12 +140,12 @@ const struct gating_desc gm20b_slcg_perf[] = { | |||
140 | }; | 140 | }; |
141 | 141 | ||
142 | /* slcg PriRing */ | 142 | /* slcg PriRing */ |
143 | const struct gating_desc gm20b_slcg_priring[] = { | 143 | static const struct gating_desc gm20b_slcg_priring[] = { |
144 | {.addr = 0x001200a8, .prod = 0x00000000, .disable = 0x00000001}, | 144 | {.addr = 0x001200a8, .prod = 0x00000000, .disable = 0x00000001}, |
145 | }; | 145 | }; |
146 | 146 | ||
147 | /* slcg pwr_csb */ | 147 | /* slcg pwr_csb */ |
148 | const struct gating_desc gm20b_slcg_pwr_csb[] = { | 148 | static const struct gating_desc gm20b_slcg_pwr_csb[] = { |
149 | {.addr = 0x0000017c, .prod = 0x00020008, .disable = 0x0003fffe}, | 149 | {.addr = 0x0000017c, .prod = 0x00020008, .disable = 0x0003fffe}, |
150 | {.addr = 0x00000e74, .prod = 0x00000000, .disable = 0x0000000f}, | 150 | {.addr = 0x00000e74, .prod = 0x00000000, .disable = 0x0000000f}, |
151 | {.addr = 0x00000a74, .prod = 0x00000000, .disable = 0x00007ffe}, | 151 | {.addr = 0x00000a74, .prod = 0x00000000, .disable = 0x00007ffe}, |
@@ -153,35 +153,35 @@ const struct gating_desc gm20b_slcg_pwr_csb[] = { | |||
153 | }; | 153 | }; |
154 | 154 | ||
155 | /* slcg pmu */ | 155 | /* slcg pmu */ |
156 | const struct gating_desc gm20b_slcg_pmu[] = { | 156 | static const struct gating_desc gm20b_slcg_pmu[] = { |
157 | {.addr = 0x0010a17c, .prod = 0x00020008, .disable = 0x0003fffe}, | 157 | {.addr = 0x0010a17c, .prod = 0x00020008, .disable = 0x0003fffe}, |
158 | {.addr = 0x0010aa74, .prod = 0x00000000, .disable = 0x00007ffe}, | 158 | {.addr = 0x0010aa74, .prod = 0x00000000, .disable = 0x00007ffe}, |
159 | {.addr = 0x0010ae74, .prod = 0x00000000, .disable = 0x0000000f}, | 159 | {.addr = 0x0010ae74, .prod = 0x00000000, .disable = 0x0000000f}, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | /* therm gr */ | 162 | /* therm gr */ |
163 | const struct gating_desc gm20b_slcg_therm[] = { | 163 | static const struct gating_desc gm20b_slcg_therm[] = { |
164 | {.addr = 0x000206b8, .prod = 0x00000000, .disable = 0x0000000f}, | 164 | {.addr = 0x000206b8, .prod = 0x00000000, .disable = 0x0000000f}, |
165 | }; | 165 | }; |
166 | 166 | ||
167 | /* slcg Xbar */ | 167 | /* slcg Xbar */ |
168 | const struct gating_desc gm20b_slcg_xbar[] = { | 168 | static const struct gating_desc gm20b_slcg_xbar[] = { |
169 | {.addr = 0x0013cbe4, .prod = 0x00000000, .disable = 0x1ffffffe}, | 169 | {.addr = 0x0013cbe4, .prod = 0x00000000, .disable = 0x1ffffffe}, |
170 | {.addr = 0x0013cc04, .prod = 0x00000000, .disable = 0x1ffffffe}, | 170 | {.addr = 0x0013cc04, .prod = 0x00000000, .disable = 0x1ffffffe}, |
171 | }; | 171 | }; |
172 | 172 | ||
173 | /* blcg bus */ | 173 | /* blcg bus */ |
174 | const struct gating_desc gm20b_blcg_bus[] = { | 174 | static const struct gating_desc gm20b_blcg_bus[] = { |
175 | {.addr = 0x00001c00, .prod = 0x00000042, .disable = 0x00000000}, | 175 | {.addr = 0x00001c00, .prod = 0x00000042, .disable = 0x00000000}, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | /* blcg ctxsw firmware */ | 178 | /* blcg ctxsw firmware */ |
179 | const struct gating_desc gm20b_blcg_ctxsw_firmware[] = { | 179 | static const struct gating_desc gm20b_blcg_ctxsw_firmware[] = { |
180 | {.addr = 0x00022400, .prod = 0x00000000, .disable = 0x00000000}, | 180 | {.addr = 0x00022400, .prod = 0x00000000, .disable = 0x00000000}, |
181 | }; | 181 | }; |
182 | 182 | ||
183 | /* blcg fb */ | 183 | /* blcg fb */ |
184 | const struct gating_desc gm20b_blcg_fb[] = { | 184 | static const struct gating_desc gm20b_blcg_fb[] = { |
185 | {.addr = 0x00100d10, .prod = 0x0000c242, .disable = 0x00000000}, | 185 | {.addr = 0x00100d10, .prod = 0x0000c242, .disable = 0x00000000}, |
186 | {.addr = 0x00100d30, .prod = 0x0000c242, .disable = 0x00000000}, | 186 | {.addr = 0x00100d30, .prod = 0x0000c242, .disable = 0x00000000}, |
187 | {.addr = 0x00100d3c, .prod = 0x00000242, .disable = 0x00000000}, | 187 | {.addr = 0x00100d3c, .prod = 0x00000242, .disable = 0x00000000}, |
@@ -191,12 +191,12 @@ const struct gating_desc gm20b_blcg_fb[] = { | |||
191 | }; | 191 | }; |
192 | 192 | ||
193 | /* blcg fifo */ | 193 | /* blcg fifo */ |
194 | const struct gating_desc gm20b_blcg_fifo[] = { | 194 | static const struct gating_desc gm20b_blcg_fifo[] = { |
195 | {.addr = 0x000026a4, .prod = 0x0000c242, .disable = 0x00000000}, | 195 | {.addr = 0x000026a4, .prod = 0x0000c242, .disable = 0x00000000}, |
196 | }; | 196 | }; |
197 | 197 | ||
198 | /* blcg gr */ | 198 | /* blcg gr */ |
199 | const struct gating_desc gm20b_blcg_gr[] = { | 199 | static const struct gating_desc gm20b_blcg_gr[] = { |
200 | {.addr = 0x004041f0, .prod = 0x00004046, .disable = 0x00000000}, | 200 | {.addr = 0x004041f0, .prod = 0x00004046, .disable = 0x00000000}, |
201 | {.addr = 0x00409890, .prod = 0x0000007f, .disable = 0x00000000}, | 201 | {.addr = 0x00409890, .prod = 0x0000007f, .disable = 0x00000000}, |
202 | {.addr = 0x004098b0, .prod = 0x0000007f, .disable = 0x00000000}, | 202 | {.addr = 0x004098b0, .prod = 0x0000007f, .disable = 0x00000000}, |
@@ -261,7 +261,7 @@ const struct gating_desc gm20b_blcg_gr[] = { | |||
261 | }; | 261 | }; |
262 | 262 | ||
263 | /* blcg ltc */ | 263 | /* blcg ltc */ |
264 | const struct gating_desc gm20b_blcg_ltc[] = { | 264 | static const struct gating_desc gm20b_blcg_ltc[] = { |
265 | {.addr = 0x0017e030, .prod = 0x00000044, .disable = 0x00000000}, | 265 | {.addr = 0x0017e030, .prod = 0x00000044, .disable = 0x00000000}, |
266 | {.addr = 0x0017e040, .prod = 0x00000044, .disable = 0x00000000}, | 266 | {.addr = 0x0017e040, .prod = 0x00000044, .disable = 0x00000000}, |
267 | {.addr = 0x0017e3e0, .prod = 0x00000044, .disable = 0x00000000}, | 267 | {.addr = 0x0017e3e0, .prod = 0x00000044, .disable = 0x00000000}, |
@@ -269,23 +269,23 @@ const struct gating_desc gm20b_blcg_ltc[] = { | |||
269 | }; | 269 | }; |
270 | 270 | ||
271 | /* blcg pwr_csb */ | 271 | /* blcg pwr_csb */ |
272 | const struct gating_desc gm20b_blcg_pwr_csb[] = { | 272 | static const struct gating_desc gm20b_blcg_pwr_csb[] = { |
273 | {.addr = 0x00000a70, .prod = 0x00000045, .disable = 0x00000000}, | 273 | {.addr = 0x00000a70, .prod = 0x00000045, .disable = 0x00000000}, |
274 | }; | 274 | }; |
275 | 275 | ||
276 | /* blcg pmu */ | 276 | /* blcg pmu */ |
277 | const struct gating_desc gm20b_blcg_pmu[] = { | 277 | static const struct gating_desc gm20b_blcg_pmu[] = { |
278 | {.addr = 0x0010aa70, .prod = 0x00000045, .disable = 0x00000000}, | 278 | {.addr = 0x0010aa70, .prod = 0x00000045, .disable = 0x00000000}, |
279 | }; | 279 | }; |
280 | 280 | ||
281 | /* blcg Xbar */ | 281 | /* blcg Xbar */ |
282 | const struct gating_desc gm20b_blcg_xbar[] = { | 282 | static const struct gating_desc gm20b_blcg_xbar[] = { |
283 | {.addr = 0x0013cbe0, .prod = 0x00000042, .disable = 0x00000000}, | 283 | {.addr = 0x0013cbe0, .prod = 0x00000042, .disable = 0x00000000}, |
284 | {.addr = 0x0013cc00, .prod = 0x00000042, .disable = 0x00000000}, | 284 | {.addr = 0x0013cc00, .prod = 0x00000042, .disable = 0x00000000}, |
285 | }; | 285 | }; |
286 | 286 | ||
287 | /* pg gr */ | 287 | /* pg gr */ |
288 | const struct gating_desc gm20b_pg_gr[] = { | 288 | static const struct gating_desc gm20b_pg_gr[] = { |
289 | }; | 289 | }; |
290 | 290 | ||
291 | /* static inline functions */ | 291 | /* static inline functions */ |
@@ -440,21 +440,6 @@ void gm20b_slcg_priring_load_gating_prod(struct gk20a *g, | |||
440 | } | 440 | } |
441 | } | 441 | } |
442 | 442 | ||
443 | void gm20b_slcg_pwr_csb_load_gating_prod(struct gk20a *g, | ||
444 | bool prod) | ||
445 | { | ||
446 | u32 i; | ||
447 | u32 size = sizeof(gm20b_slcg_pwr_csb) / sizeof(struct gating_desc); | ||
448 | for (i = 0; i < size; i++) { | ||
449 | if (prod) | ||
450 | gk20a_writel(g, gm20b_slcg_pwr_csb[i].addr, | ||
451 | gm20b_slcg_pwr_csb[i].prod); | ||
452 | else | ||
453 | gk20a_writel(g, gm20b_slcg_pwr_csb[i].addr, | ||
454 | gm20b_slcg_pwr_csb[i].disable); | ||
455 | } | ||
456 | } | ||
457 | |||
458 | void gm20b_slcg_pmu_load_gating_prod(struct gk20a *g, | 443 | void gm20b_slcg_pmu_load_gating_prod(struct gk20a *g, |
459 | bool prod) | 444 | bool prod) |
460 | { | 445 | { |
@@ -620,21 +605,6 @@ void gm20b_blcg_pmu_load_gating_prod(struct gk20a *g, | |||
620 | } | 605 | } |
621 | } | 606 | } |
622 | 607 | ||
623 | void gm20b_blcg_xbar_load_gating_prod(struct gk20a *g, | ||
624 | bool prod) | ||
625 | { | ||
626 | u32 i; | ||
627 | u32 size = sizeof(gm20b_blcg_xbar) / sizeof(struct gating_desc); | ||
628 | for (i = 0; i < size; i++) { | ||
629 | if (prod) | ||
630 | gk20a_writel(g, gm20b_blcg_xbar[i].addr, | ||
631 | gm20b_blcg_xbar[i].prod); | ||
632 | else | ||
633 | gk20a_writel(g, gm20b_blcg_xbar[i].addr, | ||
634 | gm20b_blcg_xbar[i].disable); | ||
635 | } | ||
636 | } | ||
637 | |||
638 | void gr_gm20b_pg_gr_load_gating_prod(struct gk20a *g, | 608 | void gr_gm20b_pg_gr_load_gating_prod(struct gk20a *g, |
639 | bool prod) | 609 | bool prod) |
640 | { | 610 | { |
diff --git a/drivers/gpu/nvgpu/gm20b/gr_ctx_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_ctx_gm20b.c index 0309e110..2a654760 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_ctx_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_ctx_gm20b.c | |||
@@ -57,7 +57,7 @@ static int gr_gm20b_get_netlist_name(int index, char *name) | |||
57 | return -1; | 57 | return -1; |
58 | } | 58 | } |
59 | 59 | ||
60 | bool gr_gm20b_is_firmware_defined(void) | 60 | static bool gr_gm20b_is_firmware_defined(void) |
61 | { | 61 | { |
62 | #ifdef GM20B_NETLIST_IMAGE_FW_NAME | 62 | #ifdef GM20B_NETLIST_IMAGE_FW_NAME |
63 | return true; | 63 | return true; |
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index 835ff6bf..d40e9d52 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c | |||
@@ -342,7 +342,7 @@ static void gr_gm20b_set_alpha_circular_buffer_size(struct gk20a *g, u32 data) | |||
342 | } | 342 | } |
343 | } | 343 | } |
344 | 344 | ||
345 | void gr_gm20b_set_circular_buffer_size(struct gk20a *g, u32 data) | 345 | static void gr_gm20b_set_circular_buffer_size(struct gk20a *g, u32 data) |
346 | { | 346 | { |
347 | struct gr_gk20a *gr = &g->gr; | 347 | struct gr_gk20a *gr = &g->gr; |
348 | u32 gpc_index, ppc_index, stride, val; | 348 | u32 gpc_index, ppc_index, stride, val; |
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 574ad926..2b534816 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #define FUSE_OPT_PRIV_SEC_DIS_0 0x264 | 34 | #define FUSE_OPT_PRIV_SEC_DIS_0 0x264 |
35 | #define PRIV_SECURITY_DISABLE 0x01 | 35 | #define PRIV_SECURITY_DISABLE 0x01 |
36 | 36 | ||
37 | struct gpu_ops gm20b_ops = { | 37 | static struct gpu_ops gm20b_ops = { |
38 | .clock_gating = { | 38 | .clock_gating = { |
39 | .slcg_bus_load_gating_prod = | 39 | .slcg_bus_load_gating_prod = |
40 | gm20b_slcg_bus_load_gating_prod, | 40 | gm20b_slcg_bus_load_gating_prod, |
diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c index a089b59c..10e3ba7f 100644 --- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c | |||
@@ -197,7 +197,7 @@ static void gm20b_ltc_init_fs_state(struct gk20a *g) | |||
197 | gk20a_writel(g, ltc_ltcs_ltss_intr_r(), reg); | 197 | gk20a_writel(g, ltc_ltcs_ltss_intr_r(), reg); |
198 | } | 198 | } |
199 | 199 | ||
200 | void gm20b_ltc_isr(struct gk20a *g) | 200 | static void gm20b_ltc_isr(struct gk20a *g) |
201 | { | 201 | { |
202 | u32 mc_intr, ltc_intr; | 202 | u32 mc_intr, ltc_intr; |
203 | int ltc, slice; | 203 | int ltc, slice; |
@@ -266,7 +266,7 @@ static void gm20b_ltc_g_elpg_flush_locked(struct gk20a *g) | |||
266 | "g_elpg_flush too many retries"); | 266 | "g_elpg_flush too many retries"); |
267 | } | 267 | } |
268 | 268 | ||
269 | u32 gm20b_ltc_cbc_fix_config(struct gk20a *g, int base) | 269 | static u32 gm20b_ltc_cbc_fix_config(struct gk20a *g, int base) |
270 | { | 270 | { |
271 | u32 val = gk20a_readl(g, ltc_ltcs_ltss_cbc_num_active_ltcs_r()); | 271 | u32 val = gk20a_readl(g, ltc_ltcs_ltss_cbc_num_active_ltcs_r()); |
272 | if (val == 2) { | 272 | if (val == 2) { |
@@ -282,7 +282,7 @@ u32 gm20b_ltc_cbc_fix_config(struct gk20a *g, int base) | |||
282 | /* | 282 | /* |
283 | * Performs a full flush of the L2 cache. | 283 | * Performs a full flush of the L2 cache. |
284 | */ | 284 | */ |
285 | void gm20b_flush_ltc(struct gk20a *g) | 285 | static void gm20b_flush_ltc(struct gk20a *g) |
286 | { | 286 | { |
287 | u32 op_pending; | 287 | u32 op_pending; |
288 | unsigned long now, timeout; | 288 | unsigned long now, timeout; |
diff --git a/drivers/gpu/nvgpu/gm20b/mm_gm20b.c b/drivers/gpu/nvgpu/gm20b/mm_gm20b.c index 13e7859f..030701b9 100644 --- a/drivers/gpu/nvgpu/gm20b/mm_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/mm_gm20b.c | |||
@@ -220,7 +220,7 @@ fail: | |||
220 | return ret; | 220 | return ret; |
221 | } | 221 | } |
222 | 222 | ||
223 | void gm20b_vm_clear_sparse(struct vm_gk20a *vm, u64 vaddr, | 223 | static void gm20b_vm_clear_sparse(struct vm_gk20a *vm, u64 vaddr, |
224 | u64 size, u32 pgsz_idx) { | 224 | u64 size, u32 pgsz_idx) { |
225 | u64 vaddr_hi; | 225 | u64 vaddr_hi; |
226 | u32 pde_lo, pde_hi, pde_i; | 226 | u32 pde_lo, pde_hi, pde_i; |
@@ -253,14 +253,15 @@ void gm20b_vm_clear_sparse(struct vm_gk20a *vm, u64 vaddr, | |||
253 | return; | 253 | return; |
254 | } | 254 | } |
255 | 255 | ||
256 | bool gm20b_mm_mmu_debug_mode_enabled(struct gk20a *g) | 256 | static bool gm20b_mm_mmu_debug_mode_enabled(struct gk20a *g) |
257 | { | 257 | { |
258 | u32 debug_ctrl = gk20a_readl(g, gr_gpcs_pri_mmu_debug_ctrl_r()); | 258 | u32 debug_ctrl = gk20a_readl(g, gr_gpcs_pri_mmu_debug_ctrl_r()); |
259 | return gr_gpcs_pri_mmu_debug_ctrl_debug_v(debug_ctrl) == | 259 | return gr_gpcs_pri_mmu_debug_ctrl_debug_v(debug_ctrl) == |
260 | gr_gpcs_pri_mmu_debug_ctrl_debug_enabled_v(); | 260 | gr_gpcs_pri_mmu_debug_ctrl_debug_enabled_v(); |
261 | } | 261 | } |
262 | 262 | ||
263 | void gm20b_mm_set_big_page_size(struct gk20a *g, void *inst_ptr, int size) | 263 | static void gm20b_mm_set_big_page_size(struct gk20a *g, |
264 | void *inst_ptr, int size) | ||
264 | { | 265 | { |
265 | u32 val; | 266 | u32 val; |
266 | 267 | ||
diff --git a/drivers/gpu/nvgpu/gm20b/pmu_gm20b.c b/drivers/gpu/nvgpu/gm20b/pmu_gm20b.c index 91927950..6a7f0d92 100644 --- a/drivers/gpu/nvgpu/gm20b/pmu_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/pmu_gm20b.c | |||
@@ -131,7 +131,7 @@ static struct pg_init_sequence_list _pginitseq_gm20b[] = { | |||
131 | { 0x0010e040, 0x00000000}, | 131 | { 0x0010e040, 0x00000000}, |
132 | }; | 132 | }; |
133 | 133 | ||
134 | int gm20b_pmu_setup_elpg(struct gk20a *g) | 134 | static int gm20b_pmu_setup_elpg(struct gk20a *g) |
135 | { | 135 | { |
136 | int ret = 0; | 136 | int ret = 0; |
137 | u32 reg_writes; | 137 | u32 reg_writes; |
@@ -153,7 +153,7 @@ int gm20b_pmu_setup_elpg(struct gk20a *g) | |||
153 | return ret; | 153 | return ret; |
154 | } | 154 | } |
155 | 155 | ||
156 | void pmu_handle_acr_init_wpr_msg(struct gk20a *g, struct pmu_msg *msg, | 156 | static void pmu_handle_acr_init_wpr_msg(struct gk20a *g, struct pmu_msg *msg, |
157 | void *param, u32 handle, u32 status) | 157 | void *param, u32 handle, u32 status) |
158 | { | 158 | { |
159 | gk20a_dbg_fn(""); | 159 | gk20a_dbg_fn(""); |
@@ -166,7 +166,7 @@ void pmu_handle_acr_init_wpr_msg(struct gk20a *g, struct pmu_msg *msg, | |||
166 | } | 166 | } |
167 | 167 | ||
168 | 168 | ||
169 | int gm20b_pmu_init_acr(struct gk20a *g) | 169 | static int gm20b_pmu_init_acr(struct gk20a *g) |
170 | { | 170 | { |
171 | struct pmu_gk20a *pmu = &g->pmu; | 171 | struct pmu_gk20a *pmu = &g->pmu; |
172 | struct pmu_cmd cmd; | 172 | struct pmu_cmd cmd; |
@@ -190,7 +190,7 @@ int gm20b_pmu_init_acr(struct gk20a *g) | |||
190 | return 0; | 190 | return 0; |
191 | } | 191 | } |
192 | 192 | ||
193 | void pmu_handle_fecs_boot_acr_msg(struct gk20a *g, struct pmu_msg *msg, | 193 | static void pmu_handle_fecs_boot_acr_msg(struct gk20a *g, struct pmu_msg *msg, |
194 | void *param, u32 handle, u32 status) | 194 | void *param, u32 handle, u32 status) |
195 | { | 195 | { |
196 | 196 | ||
diff --git a/drivers/gpu/nvgpu/gm20b/regops_gm20b.c b/drivers/gpu/nvgpu/gm20b/regops_gm20b.c index 71ccda37..cc1c72c2 100644 --- a/drivers/gpu/nvgpu/gm20b/regops_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/regops_gm20b.c | |||
@@ -434,67 +434,68 @@ static const struct regop_offset_range gm20b_qctl_whitelist_ranges[] = { | |||
434 | static const u32 gm20b_qctl_whitelist_ranges_count = | 434 | static const u32 gm20b_qctl_whitelist_ranges_count = |
435 | ARRAY_SIZE(gm20b_qctl_whitelist_ranges); | 435 | ARRAY_SIZE(gm20b_qctl_whitelist_ranges); |
436 | 436 | ||
437 | const struct regop_offset_range *gm20b_get_global_whitelist_ranges(void) | 437 | static const struct regop_offset_range *gm20b_get_global_whitelist_ranges(void) |
438 | { | 438 | { |
439 | return gm20b_global_whitelist_ranges; | 439 | return gm20b_global_whitelist_ranges; |
440 | } | 440 | } |
441 | 441 | ||
442 | int gm20b_get_global_whitelist_ranges_count(void) | 442 | static int gm20b_get_global_whitelist_ranges_count(void) |
443 | { | 443 | { |
444 | return gm20b_global_whitelist_ranges_count; | 444 | return gm20b_global_whitelist_ranges_count; |
445 | } | 445 | } |
446 | 446 | ||
447 | const struct regop_offset_range *gm20b_get_context_whitelist_ranges(void) | 447 | static const struct regop_offset_range *gm20b_get_context_whitelist_ranges(void) |
448 | { | 448 | { |
449 | return gm20b_context_whitelist_ranges; | 449 | return gm20b_context_whitelist_ranges; |
450 | } | 450 | } |
451 | 451 | ||
452 | int gm20b_get_context_whitelist_ranges_count(void) | 452 | static int gm20b_get_context_whitelist_ranges_count(void) |
453 | { | 453 | { |
454 | return gm20b_context_whitelist_ranges_count; | 454 | return gm20b_context_whitelist_ranges_count; |
455 | } | 455 | } |
456 | 456 | ||
457 | const u32 *gm20b_get_runcontrol_whitelist(void) | 457 | static const u32 *gm20b_get_runcontrol_whitelist(void) |
458 | { | 458 | { |
459 | return gm20b_runcontrol_whitelist; | 459 | return gm20b_runcontrol_whitelist; |
460 | } | 460 | } |
461 | 461 | ||
462 | int gm20b_get_runcontrol_whitelist_count(void) | 462 | static int gm20b_get_runcontrol_whitelist_count(void) |
463 | { | 463 | { |
464 | return gm20b_runcontrol_whitelist_count; | 464 | return gm20b_runcontrol_whitelist_count; |
465 | } | 465 | } |
466 | 466 | ||
467 | const struct regop_offset_range *gm20b_get_runcontrol_whitelist_ranges(void) | 467 | static const |
468 | struct regop_offset_range *gm20b_get_runcontrol_whitelist_ranges(void) | ||
468 | { | 469 | { |
469 | return gm20b_runcontrol_whitelist_ranges; | 470 | return gm20b_runcontrol_whitelist_ranges; |
470 | } | 471 | } |
471 | 472 | ||
472 | int gm20b_get_runcontrol_whitelist_ranges_count(void) | 473 | static int gm20b_get_runcontrol_whitelist_ranges_count(void) |
473 | { | 474 | { |
474 | return gm20b_runcontrol_whitelist_ranges_count; | 475 | return gm20b_runcontrol_whitelist_ranges_count; |
475 | } | 476 | } |
476 | 477 | ||
477 | const u32 *gm20b_get_qctl_whitelist(void) | 478 | static const u32 *gm20b_get_qctl_whitelist(void) |
478 | { | 479 | { |
479 | return gm20b_qctl_whitelist; | 480 | return gm20b_qctl_whitelist; |
480 | } | 481 | } |
481 | 482 | ||
482 | int gm20b_get_qctl_whitelist_count(void) | 483 | static int gm20b_get_qctl_whitelist_count(void) |
483 | { | 484 | { |
484 | return gm20b_qctl_whitelist_count; | 485 | return gm20b_qctl_whitelist_count; |
485 | } | 486 | } |
486 | 487 | ||
487 | const struct regop_offset_range *gm20b_get_qctl_whitelist_ranges(void) | 488 | static const struct regop_offset_range *gm20b_get_qctl_whitelist_ranges(void) |
488 | { | 489 | { |
489 | return gm20b_qctl_whitelist_ranges; | 490 | return gm20b_qctl_whitelist_ranges; |
490 | } | 491 | } |
491 | 492 | ||
492 | int gm20b_get_qctl_whitelist_ranges_count(void) | 493 | static int gm20b_get_qctl_whitelist_ranges_count(void) |
493 | { | 494 | { |
494 | return gm20b_qctl_whitelist_ranges_count; | 495 | return gm20b_qctl_whitelist_ranges_count; |
495 | } | 496 | } |
496 | 497 | ||
497 | int gm20b_apply_smpc_war(struct dbg_session_gk20a *dbg_s) | 498 | static int gm20b_apply_smpc_war(struct dbg_session_gk20a *dbg_s) |
498 | { | 499 | { |
499 | /* Not needed on gm20b */ | 500 | /* Not needed on gm20b */ |
500 | return 0; | 501 | return 0; |