From 1dad4adbd2aecfd484a84d47b29b81bb665bc60b Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 7 Nov 2017 10:25:07 -0800 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1593687 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity Reviewed-by: Deepak Nibade GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 39 -------------------------------------- 1 file changed, 39 deletions(-) (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c') 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, return 0; } -int gp10b_gr_fuse_override(struct gk20a *g) -{ - struct device_node *np = dev_from_gk20a(g)->of_node; - u32 *fuses; - int count, i; - - if (!np) /* may be pcie device */ - return 0; - - count = of_property_count_elems_of_size(np, "fuse-overrides", 8); - if (count <= 0) - return count; - - fuses = nvgpu_kmalloc(g, sizeof(u32) * count * 2); - if (!fuses) - return -ENOMEM; - of_property_read_u32_array(np, "fuse-overrides", fuses, count * 2); - for (i = 0; i < count; i++) { - u32 fuse, value; - - fuse = fuses[2 * i]; - value = fuses[2 * i + 1]; - switch (fuse) { - case GM20B_FUSE_OPT_TPC_DISABLE: - gm20b_gr_tpc_disable_override(g, value); - break; - case GP10B_FUSE_OPT_ECC_EN: - g->gr.t18x.fecs_feature_override_ecc_val = value; - break; - default: - nvgpu_err(g, "ignore unknown fuse override %08x", fuse); - break; - } - } - - nvgpu_kfree(g, fuses); - - return 0; -} int gr_gp10b_init_preemption_state(struct gk20a *g) { -- cgit v1.2.2