diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-03-08 12:05:41 -0500 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-03-16 17:29:24 -0400 |
commit | 704f29335f75a4e873f5106ad33fcf94b9fcaf2f (patch) | |
tree | 4936ffe456fc589da1dda25ca160cc4b9b421578 /drivers/gpu/nvgpu/gk20a | |
parent | 2a58d3c27b45ca9d0d9dc2136377b7a41b9ed82d (diff) |
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
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 2 |
2 files changed, 4 insertions, 0 deletions
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) | |||
1397 | 1397 | ||
1398 | spin_lock_init(&gk20a->mc_enable_lock); | 1398 | spin_lock_init(&gk20a->mc_enable_lock); |
1399 | 1399 | ||
1400 | #ifdef CONFIG_RESET_CONTROLLER | ||
1400 | platform->reset_control = devm_reset_control_get(&dev->dev, NULL); | 1401 | platform->reset_control = devm_reset_control_get(&dev->dev, NULL); |
1401 | if (IS_ERR(platform->reset_control)) | 1402 | if (IS_ERR(platform->reset_control)) |
1402 | platform->reset_control = NULL; | 1403 | platform->reset_control = NULL; |
1404 | #endif | ||
1403 | 1405 | ||
1404 | gk20a_debug_init(dev); | 1406 | gk20a_debug_init(dev); |
1405 | 1407 | ||
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 { | |||
59 | struct clk *clk[3]; | 59 | struct clk *clk[3]; |
60 | int num_clks; | 60 | int num_clks; |
61 | 61 | ||
62 | #ifdef CONFIG_RESET_CONTROLLER | ||
62 | /* Reset control for device */ | 63 | /* Reset control for device */ |
63 | struct reset_control *reset_control; | 64 | struct reset_control *reset_control; |
65 | #endif | ||
64 | 66 | ||
65 | /* Delay before rail gated */ | 67 | /* Delay before rail gated */ |
66 | int railgate_delay; | 68 | int railgate_delay; |