From 704f29335f75a4e873f5106ad33fcf94b9fcaf2f Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 8 Mar 2016 09:05:41 -0800 Subject: 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 Reviewed-on: http://git-master/r/1028348 --- drivers/gpu/nvgpu/gk20a/gk20a.c | 2 ++ drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 0fee58e8..0cc9564b 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -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); diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index 84b3fcaf..6bffed9e 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h @@ -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; -- cgit v1.2.2