From ed0737ab60248c24dbd0099c605e1157a95c52ff Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 10 Sep 2015 18:05:21 +0530 Subject: gpu: nvgpu: support reset_control API Bug 200137963 Change-Id: I3197af905c945540b97ba191e5695d970d77af8e Signed-off-by: Deepak Nibade 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 Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.c | 5 +++++ drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'drivers') 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 @@ #include #include #include +#include #include @@ -1298,6 +1299,10 @@ static int gk20a_pm_init(struct platform_device *dev) if (IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) err = gk20a_pm_initialise_domain(dev); + platform->reset_control = devm_reset_control_get(&dev->dev, NULL); + if (IS_ERR(platform->reset_control)) + platform->reset_control = NULL; + return err; } 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 @@ * * GK20A Platform (SoC) Interface * - * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -55,6 +55,9 @@ struct gk20a_platform { struct clk *clk[3]; int num_clks; + /* Reset control for device */ + struct reset_control *reset_control; + /* Delay before rail gated */ int railgate_delay; -- cgit v1.2.2