mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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>
This commit is contained in:
committed by
Terje Bergstrom
parent
c6b8f46f6d
commit
ed0737ab60
@@ -40,6 +40,7 @@
|
||||
#include <linux/clk/tegra.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/platform/tegra/common.h>
|
||||
#include <linux/reset.h>
|
||||
|
||||
#include <linux/sched.h>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user