summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/sec2_gp106.c
diff options
context:
space:
mode:
authorMahantesh Kumbar <mkumbar@nvidia.com>2017-06-28 07:23:41 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-04 02:44:30 -0400
commitfbeca4a8414c03a1564d7a370964187be51a3e6c (patch)
tree4ba412c53e52678b9e115fd1ec80655bd2380f46 /drivers/gpu/nvgpu/gp106/sec2_gp106.c
parent2f712e22303471b8dd2f9388c874d12b07aed258 (diff)
gpu: nvgpu: Falcon controller wait for halt
- Added nvgpu_flcn_wait_for_halt() interface to wait for falcon halt, which block till falcon halt or timeout expire for selected falcon controller - Replaced falcon wait for halt code with method nvgpu_flcn_wait_for_halt() NVGPU JIRA-99 Change-Id: Ie1809dc29ff65bddc7ef2859a9ee9b4f0003b127 Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: https://git-master/r/1510201 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/sec2_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/sec2_gp106.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gp106/sec2_gp106.c b/drivers/gpu/nvgpu/gp106/sec2_gp106.c
index 06f62a99..20171309 100644
--- a/drivers/gpu/nvgpu/gp106/sec2_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/sec2_gp106.c
@@ -57,20 +57,9 @@ int sec2_clear_halt_interrupt_status(struct gk20a *g, unsigned int timeout)
57int sec2_wait_for_halt(struct gk20a *g, unsigned int timeout) 57int sec2_wait_for_halt(struct gk20a *g, unsigned int timeout)
58{ 58{
59 u32 data = 0; 59 u32 data = 0;
60 int completion = -EBUSY; 60 int completion = 0;
61 struct nvgpu_timeout to;
62
63 nvgpu_timeout_init(g, &to, timeout, NVGPU_TIMER_CPU_TIMER);
64 do {
65 data = gk20a_readl(g, psec_falcon_cpuctl_r());
66 if (data & psec_falcon_cpuctl_halt_intr_m()) {
67 /*CPU is halted break*/
68 completion = 0;
69 break;
70 }
71 nvgpu_udelay(1);
72 } while (!nvgpu_timeout_expired(&to));
73 61
62 completion = nvgpu_flcn_wait_for_halt(&g->sec2_flcn, timeout);
74 if (completion) { 63 if (completion) {
75 nvgpu_err(g, "ACR boot timed out"); 64 nvgpu_err(g, "ACR boot timed out");
76 return completion; 65 return completion;