summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk/clk_vin.h
diff options
context:
space:
mode:
authorVaikundanathan S <vaikuns@nvidia.com>2018-04-03 05:41:58 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-04 09:09:47 -0400
commit65a362c01a1adc567fa176113dfeb1834777926d (patch)
tree74c85f3b2c2b0ec880bc6ecb5980caf9effde880 /drivers/gpu/nvgpu/clk/clk_vin.h
parent010439ba08891ce97c53c239b5bb8c4a2f5b5f01 (diff)
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 <vaikuns@nvidia.com> Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1687591 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_vin.h')
-rw-r--r--drivers/gpu/nvgpu/clk/clk_vin.h20
1 files changed, 17 insertions, 3 deletions
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 @@
1/* 1/*
2* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. 2* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3* 3*
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -44,13 +44,21 @@ struct vin_device {
44 u8 id; 44 u8 id;
45 u8 volt_domain; 45 u8 volt_domain;
46 u8 volt_domain_vbios; 46 u8 volt_domain_vbios;
47 u32 slope;
48 u32 intercept;
49 u32 flls_shared_mask; 47 u32 flls_shared_mask;
50 48
51 vin_device_state_load *state_load; 49 vin_device_state_load *state_load;
52}; 50};
53 51
52struct vin_device_v10 {
53 struct vin_device super;
54 struct ctrl_clk_vin_device_info_data_v10 data;
55};
56
57struct vin_device_v20 {
58 struct vin_device super;
59 struct ctrl_clk_vin_device_info_data_v20 data;
60};
61
54/* get vin device object from descriptor table index*/ 62/* get vin device object from descriptor table index*/
55#define CLK_GET_VIN_DEVICE(pvinobjs, dev_index) \ 63#define CLK_GET_VIN_DEVICE(pvinobjs, dev_index) \
56 ((struct vin_device *)BOARDOBJGRP_OBJ_GET_BY_IDX( \ 64 ((struct vin_device *)BOARDOBJGRP_OBJ_GET_BY_IDX( \
@@ -61,5 +69,11 @@ boardobj_pmudatainit vindeviceinit_pmudata_super;
61 69
62u32 clk_vin_sw_setup(struct gk20a *g); 70u32 clk_vin_sw_setup(struct gk20a *g);
63u32 clk_vin_pmu_setup(struct gk20a *g); 71u32 clk_vin_pmu_setup(struct gk20a *g);
72u32 clk_avfs_get_vin_cal_fuse_v10(struct gk20a *g,
73 struct avfsvinobjs *pvinobjs,
74 struct vin_device_v20 *pvindev);
75u32 clk_avfs_get_vin_cal_fuse_v20(struct gk20a *g,
76 struct avfsvinobjs *pvinobjs,
77 struct vin_device_v20 *pvindev);
64 78
65#endif 79#endif