diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-11-07 13:25:07 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-09 17:27:04 -0500 |
commit | 1dad4adbd2aecfd484a84d47b29b81bb665bc60b (patch) | |
tree | afe2829ebef911e8ee4409753a2db7f626897624 /drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |
parent | 39527d58855fb7cb7dffef01c4f7290ae3a119ce (diff) |
gpu: nvgpu: Move fuse override DT handling
Move fuse override DT handling to Linux code. All the chip specific
fuse override functions did the same thing, so delete the HAL and
call the same function to read the DT overrides on all chips.
Also remove the fuse override functionality from dGPU. There are no
DT entries for PCIe devices, so it would've failed anyway.
JIRA NVGPU-259
Change-Id: Iba64a5d53bf4eb94198c0408a462620efc2ddde4
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1593687
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index 66d48e6a..2fd393bd 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |||
@@ -2291,45 +2291,6 @@ int gr_gp10b_get_preemption_mode_flags(struct gk20a *g, | |||
2291 | 2291 | ||
2292 | return 0; | 2292 | return 0; |
2293 | } | 2293 | } |
2294 | int gp10b_gr_fuse_override(struct gk20a *g) | ||
2295 | { | ||
2296 | struct device_node *np = dev_from_gk20a(g)->of_node; | ||
2297 | u32 *fuses; | ||
2298 | int count, i; | ||
2299 | |||
2300 | if (!np) /* may be pcie device */ | ||
2301 | return 0; | ||
2302 | |||
2303 | count = of_property_count_elems_of_size(np, "fuse-overrides", 8); | ||
2304 | if (count <= 0) | ||
2305 | return count; | ||
2306 | |||
2307 | fuses = nvgpu_kmalloc(g, sizeof(u32) * count * 2); | ||
2308 | if (!fuses) | ||
2309 | return -ENOMEM; | ||
2310 | of_property_read_u32_array(np, "fuse-overrides", fuses, count * 2); | ||
2311 | for (i = 0; i < count; i++) { | ||
2312 | u32 fuse, value; | ||
2313 | |||
2314 | fuse = fuses[2 * i]; | ||
2315 | value = fuses[2 * i + 1]; | ||
2316 | switch (fuse) { | ||
2317 | case GM20B_FUSE_OPT_TPC_DISABLE: | ||
2318 | gm20b_gr_tpc_disable_override(g, value); | ||
2319 | break; | ||
2320 | case GP10B_FUSE_OPT_ECC_EN: | ||
2321 | g->gr.t18x.fecs_feature_override_ecc_val = value; | ||
2322 | break; | ||
2323 | default: | ||
2324 | nvgpu_err(g, "ignore unknown fuse override %08x", fuse); | ||
2325 | break; | ||
2326 | } | ||
2327 | } | ||
2328 | |||
2329 | nvgpu_kfree(g, fuses); | ||
2330 | |||
2331 | return 0; | ||
2332 | } | ||
2333 | 2294 | ||
2334 | int gr_gp10b_init_preemption_state(struct gk20a *g) | 2295 | int gr_gp10b_init_preemption_state(struct gk20a *g) |
2335 | { | 2296 | { |