gpu: nvgpu: Make use of reset controller optional

Reset controller is not enabled in all builds, so make its use
optional.

Change-Id: I88df11d0aae0552eb4c7f3acee5be70885ea2901
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1028348
This commit is contained in:
Terje Bergstrom
2016-03-08 09:05:41 -08:00
parent 2a58d3c27b
commit 704f29335f
2 changed files with 4 additions and 0 deletions

View File

@@ -1397,9 +1397,11 @@ static int gk20a_probe(struct platform_device *dev)
spin_lock_init(&gk20a->mc_enable_lock);
#ifdef CONFIG_RESET_CONTROLLER
platform->reset_control = devm_reset_control_get(&dev->dev, NULL);
if (IS_ERR(platform->reset_control))
platform->reset_control = NULL;
#endif
gk20a_debug_init(dev);

View File

@@ -59,8 +59,10 @@ struct gk20a_platform {
struct clk *clk[3];
int num_clks;
#ifdef CONFIG_RESET_CONTROLLER
/* Reset control for device */
struct reset_control *reset_control;
#endif
/* Delay before rail gated */
int railgate_delay;