From 65a362c01a1adc567fa176113dfeb1834777926d Mon Sep 17 00:00:00 2001 From: Vaikundanathan S Date: Tue, 3 Apr 2018 15:11:58 +0530 Subject: gpu: nvgpu: Update clk_vin interface as per chips_a clk_vin data structures updated as new calibration type (v20) is added. GP106 header does not have vin calibration type. Assuming V10 if calibration type is not V20. Add fuse calibration for V20 type. Bug 200399373 Change-Id: I9449de1ecb0d0873f3bc16f46660f93fab5b9eac Signed-off-by: Vaikundanathan S Signed-off-by: Mahantesh Kumbar Reviewed-on: https://git-master.nvidia.com/r/1687591 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/clk/clk_vin.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/clk/clk_vin.h') diff --git a/drivers/gpu/nvgpu/clk/clk_vin.h b/drivers/gpu/nvgpu/clk/clk_vin.h index 3ce26c8a..209e7055 100644 --- a/drivers/gpu/nvgpu/clk/clk_vin.h +++ b/drivers/gpu/nvgpu/clk/clk_vin.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -44,13 +44,21 @@ struct vin_device { u8 id; u8 volt_domain; u8 volt_domain_vbios; - u32 slope; - u32 intercept; u32 flls_shared_mask; vin_device_state_load *state_load; }; +struct vin_device_v10 { + struct vin_device super; + struct ctrl_clk_vin_device_info_data_v10 data; +}; + +struct vin_device_v20 { + struct vin_device super; + struct ctrl_clk_vin_device_info_data_v20 data; +}; + /* get vin device object from descriptor table index*/ #define CLK_GET_VIN_DEVICE(pvinobjs, dev_index) \ ((struct vin_device *)BOARDOBJGRP_OBJ_GET_BY_IDX( \ @@ -61,5 +69,11 @@ boardobj_pmudatainit vindeviceinit_pmudata_super; u32 clk_vin_sw_setup(struct gk20a *g); u32 clk_vin_pmu_setup(struct gk20a *g); +u32 clk_avfs_get_vin_cal_fuse_v10(struct gk20a *g, + struct avfsvinobjs *pvinobjs, + struct vin_device_v20 *pvindev); +u32 clk_avfs_get_vin_cal_fuse_v20(struct gk20a *g, + struct avfsvinobjs *pvinobjs, + struct vin_device_v20 *pvindev); #endif -- cgit v1.2.2