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/gm20b_gating_reglist.c | |
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/gm20b_gating_reglist.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/gm20b_gating_reglist.c | 78 |
1 files changed, 24 insertions, 54 deletions
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 | { |