summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2015-08-04 10:22:06 -0400
committerSachin Nikam <snikam@nvidia.com>2015-08-06 02:46:46 -0400
commit9617dcbf875c27434df9082855114278836f2c18 (patch)
tree2649f2b34baff1b02204779e82c204ec3e0b2e70 /drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c
parent77a816e7bf9495d45494f9e7af999cbee86100d1 (diff)
gpu: nvgpu: remove Tegra power calls from generic platform
Remove Tegra specific powergate and power-domain calls from generic platform file Change-Id: I86e263193e01150cbcf7ae50fd0c86f0b8b59b14 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/778682 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c55
1 files changed, 2 insertions, 53 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c
index 78132320..74e59527 100644
--- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c
+++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c
@@ -1,9 +1,9 @@
1/* 1/*
2 * drivers/video/tegra/host/gk20a/platform_gk20a_generic.c 2 * drivers/gpu/nvgpu/gk20a/platform_gk20a_generic.c
3 * 3 *
4 * GK20A Generic Platform Interface 4 * GK20A Generic Platform Interface
5 * 5 *
6 * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. 6 * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify it 8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License, 9 * under the terms and conditions of the GNU General Public License,
@@ -18,8 +18,6 @@
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */ 19 */
20 20
21#include <linux/tegra-powergate.h>
22#include <linux/tegra_pm_domains.h>
23#include <linux/clk.h> 21#include <linux/clk.h>
24 22
25#include "platform_gk20a.h" 23#include "platform_gk20a.h"
@@ -27,42 +25,6 @@
27#include "gk20a.h" 25#include "gk20a.h"
28 26
29/* 27/*
30 * gk20a_generic_is_railgated()
31 *
32 * Check status of gk20a power rail
33 */
34
35static bool gk20a_generic_is_railgated(struct platform_device *pdev)
36{
37 return !tegra_powergate_is_powered(TEGRA_POWERGATE_GPU);
38}
39
40/*
41 * gk20a_generic_railgate()
42 *
43 * Gate (disable) gk20a power rail
44 */
45
46static int gk20a_generic_railgate(struct platform_device *pdev)
47{
48 if (tegra_powergate_is_powered(TEGRA_POWERGATE_GPU))
49 tegra_powergate_partition(TEGRA_POWERGATE_GPU);
50 return 0;
51}
52
53/*
54 * gk20a_generic_unrailgate()
55 *
56 * Ungate (enable) gk20a power rail
57 */
58
59static int gk20a_generic_unrailgate(struct platform_device *pdev)
60{
61 tegra_unpowergate_partition(TEGRA_POWERGATE_GPU);
62 return 0;
63}
64
65/*
66 * gk20a_generic_get_clocks() 28 * gk20a_generic_get_clocks()
67 * 29 *
68 * This function finds clocks in tegra platform and populates 30 * This function finds clocks in tegra platform and populates
@@ -112,28 +74,15 @@ static int gk20a_generic_probe(struct platform_device *dev)
112 74
113static int gk20a_generic_late_probe(struct platform_device *dev) 75static int gk20a_generic_late_probe(struct platform_device *dev)
114{ 76{
115 struct generic_pm_domain *gpd = dev_to_genpd(&dev->dev);
116
117 /* Make gk20a power domain a subdomain of host1x */
118 tegra_pd_add_sd(gpd);
119
120 return 0; 77 return 0;
121} 78}
122 79
123static int gk20a_generic_remove(struct platform_device *dev) 80static int gk20a_generic_remove(struct platform_device *dev)
124{ 81{
125 struct generic_pm_domain *gpd = dev_to_genpd(&dev->dev);
126
127 tegra_pd_remove_sd(gpd);
128
129 return 0; 82 return 0;
130} 83}
131 84
132struct gk20a_platform gk20a_generic_platform = { 85struct gk20a_platform gk20a_generic_platform = {
133 .railgate = gk20a_generic_railgate,
134 .unrailgate = gk20a_generic_unrailgate,
135 .is_railgated = gk20a_generic_is_railgated,
136
137 .probe = gk20a_generic_probe, 86 .probe = gk20a_generic_probe,
138 .late_probe = gk20a_generic_late_probe, 87 .late_probe = gk20a_generic_late_probe,
139 .remove = gk20a_generic_remove, 88 .remove = gk20a_generic_remove,