diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2015-09-10 08:35:21 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-10-06 16:29:37 -0400 |
commit | ed0737ab60248c24dbd0099c605e1157a95c52ff (patch) | |
tree | 73852a92fac6ad8bb25ca4075354c56d329d3dc9 /drivers/gpu | |
parent | c6b8f46f6d8144fb4d3c4894f78efdd40be0bc18 (diff) |
gpu: nvgpu: support reset_control API
Bug 200137963
Change-Id: I3197af905c945540b97ba191e5695d970d77af8e
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/797154
(cherry picked from commit 8a50245ea636deb87a3d9435fb115b4eac88fac9)
Reviewed-on: http://git-master/r/808247
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 93852c17..6f650a3b 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/clk/tegra.h> | 40 | #include <linux/clk/tegra.h> |
41 | #include <linux/kthread.h> | 41 | #include <linux/kthread.h> |
42 | #include <linux/platform/tegra/common.h> | 42 | #include <linux/platform/tegra/common.h> |
43 | #include <linux/reset.h> | ||
43 | 44 | ||
44 | #include <linux/sched.h> | 45 | #include <linux/sched.h> |
45 | 46 | ||
@@ -1298,6 +1299,10 @@ static int gk20a_pm_init(struct platform_device *dev) | |||
1298 | if (IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) | 1299 | if (IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) |
1299 | err = gk20a_pm_initialise_domain(dev); | 1300 | err = gk20a_pm_initialise_domain(dev); |
1300 | 1301 | ||
1302 | platform->reset_control = devm_reset_control_get(&dev->dev, NULL); | ||
1303 | if (IS_ERR(platform->reset_control)) | ||
1304 | platform->reset_control = NULL; | ||
1305 | |||
1301 | return err; | 1306 | return err; |
1302 | } | 1307 | } |
1303 | 1308 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index 29c88f44..46f83d6d 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * GK20A Platform (SoC) Interface | 4 | * GK20A Platform (SoC) 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, |
@@ -55,6 +55,9 @@ struct gk20a_platform { | |||
55 | struct clk *clk[3]; | 55 | struct clk *clk[3]; |
56 | int num_clks; | 56 | int num_clks; |
57 | 57 | ||
58 | /* Reset control for device */ | ||
59 | struct reset_control *reset_control; | ||
60 | |||
58 | /* Delay before rail gated */ | 61 | /* Delay before rail gated */ |
59 | int railgate_delay; | 62 | int railgate_delay; |
60 | 63 | ||