diff options
author | Alex Frid <afrid@nvidia.com> | 2014-07-14 22:25:43 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:31 -0400 |
commit | d98099c9b6b8d54dd5c8563cb824805ddce6aec4 (patch) | |
tree | be894f190d1c2f88cb26b28b83aae81df9a80b98 /drivers/gpu/nvgpu/gk20a/gk20a.c | |
parent | ba387d3d7e81072641e0134c1c1d4fcf890f1b70 (diff) |
gpu: nvgpu: Remove unused GK20A cooling device
Removed unused, obsolete GK20A cooling device.
Bug 1450787
Change-Id: I5b02546d0405dd518ec841d903e650a8d38db8f2
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/437942
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index e70cc0de..0eaf31fa 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -651,9 +651,6 @@ static void gk20a_remove_support(struct platform_device *dev) | |||
651 | if (g->pmu.remove_support) | 651 | if (g->pmu.remove_support) |
652 | g->pmu.remove_support(&g->pmu); | 652 | g->pmu.remove_support(&g->pmu); |
653 | 653 | ||
654 | if (g->gk20a_cdev.gk20a_cooling_dev) | ||
655 | thermal_cooling_device_unregister(g->gk20a_cdev.gk20a_cooling_dev); | ||
656 | |||
657 | if (g->gr.remove_support) | 654 | if (g->gr.remove_support) |
658 | g->gr.remove_support(&g->gr); | 655 | g->gr.remove_support(&g->gr); |
659 | 656 | ||
@@ -1009,53 +1006,6 @@ static struct of_device_id tegra_gk20a_of_match[] = { | |||
1009 | { }, | 1006 | { }, |
1010 | }; | 1007 | }; |
1011 | 1008 | ||
1012 | int tegra_gpu_get_max_state(struct thermal_cooling_device *cdev, | ||
1013 | unsigned long *max_state) | ||
1014 | { | ||
1015 | struct cooling_device_gk20a *gk20a_gpufreq_device = cdev->devdata; | ||
1016 | |||
1017 | *max_state = gk20a_gpufreq_device->gk20a_freq_table_size - 1; | ||
1018 | return 0; | ||
1019 | } | ||
1020 | |||
1021 | int tegra_gpu_get_cur_state(struct thermal_cooling_device *cdev, | ||
1022 | unsigned long *cur_state) | ||
1023 | { | ||
1024 | struct cooling_device_gk20a *gk20a_gpufreq_device = cdev->devdata; | ||
1025 | |||
1026 | *cur_state = gk20a_gpufreq_device->gk20a_freq_state; | ||
1027 | return 0; | ||
1028 | } | ||
1029 | |||
1030 | int tegra_gpu_set_cur_state(struct thermal_cooling_device *c_dev, | ||
1031 | unsigned long cur_state) | ||
1032 | { | ||
1033 | u32 target_freq; | ||
1034 | struct gk20a *g; | ||
1035 | struct gpufreq_table_data *gpu_cooling_table; | ||
1036 | struct cooling_device_gk20a *gk20a_gpufreq_device = c_dev->devdata; | ||
1037 | |||
1038 | BUG_ON(cur_state >= gk20a_gpufreq_device->gk20a_freq_table_size); | ||
1039 | |||
1040 | g = container_of(gk20a_gpufreq_device, struct gk20a, gk20a_cdev); | ||
1041 | |||
1042 | gpu_cooling_table = tegra_gpufreq_table_get(); | ||
1043 | target_freq = gpu_cooling_table[cur_state].frequency; | ||
1044 | |||
1045 | /* ensure a query for state will get the proper value */ | ||
1046 | gk20a_gpufreq_device->gk20a_freq_state = cur_state; | ||
1047 | |||
1048 | gk20a_clk_set_rate(g, target_freq); | ||
1049 | |||
1050 | return 0; | ||
1051 | } | ||
1052 | |||
1053 | static struct thermal_cooling_device_ops tegra_gpu_cooling_ops = { | ||
1054 | .get_max_state = tegra_gpu_get_max_state, | ||
1055 | .get_cur_state = tegra_gpu_get_cur_state, | ||
1056 | .set_cur_state = tegra_gpu_set_cur_state, | ||
1057 | }; | ||
1058 | |||
1059 | static int gk20a_create_device( | 1009 | static int gk20a_create_device( |
1060 | struct platform_device *pdev, int devno, const char *cdev_name, | 1010 | struct platform_device *pdev, int devno, const char *cdev_name, |
1061 | struct cdev *cdev, struct device **out, | 1011 | struct cdev *cdev, struct device **out, |
@@ -1421,7 +1371,6 @@ static int gk20a_probe(struct platform_device *dev) | |||
1421 | struct gk20a *gk20a; | 1371 | struct gk20a *gk20a; |
1422 | int err; | 1372 | int err; |
1423 | struct gk20a_platform *platform = NULL; | 1373 | struct gk20a_platform *platform = NULL; |
1424 | struct cooling_device_gk20a *gpu_cdev = NULL; | ||
1425 | 1374 | ||
1426 | if (dev->dev.of_node) { | 1375 | if (dev->dev.of_node) { |
1427 | const struct of_device_id *match; | 1376 | const struct of_device_id *match; |
@@ -1525,13 +1474,6 @@ static int gk20a_probe(struct platform_device *dev) | |||
1525 | dev->dev.dma_parms = &gk20a->dma_parms; | 1474 | dev->dev.dma_parms = &gk20a->dma_parms; |
1526 | dma_set_max_seg_size(&dev->dev, UINT_MAX); | 1475 | dma_set_max_seg_size(&dev->dev, UINT_MAX); |
1527 | 1476 | ||
1528 | gpu_cdev = &gk20a->gk20a_cdev; | ||
1529 | gpu_cdev->gk20a_freq_table_size = tegra_gpufreq_table_size_get(); | ||
1530 | gpu_cdev->gk20a_freq_state = 0; | ||
1531 | gpu_cdev->g = gk20a; | ||
1532 | gpu_cdev->gk20a_cooling_dev = thermal_cooling_device_register("gk20a_cdev", gpu_cdev, | ||
1533 | &tegra_gpu_cooling_ops); | ||
1534 | |||
1535 | gk20a->gr_idle_timeout_default = | 1477 | gk20a->gr_idle_timeout_default = |
1536 | CONFIG_GK20A_DEFAULT_TIMEOUT; | 1478 | CONFIG_GK20A_DEFAULT_TIMEOUT; |
1537 | if (tegra_platform_is_silicon()) | 1479 | if (tegra_platform_is_silicon()) |