summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/sec2_gp106.c
diff options
context:
space:
mode:
authorMahantesh Kumbar <mkumbar@nvidia.com>2017-06-30 02:12:17 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-04 02:44:30 -0400
commit2cf964d175abc0f3eae9ed0e01e6eeed5cd6b4da (patch)
treedc91c30fdfcf4ee37ff830dcffc7b15c8b5add14 /drivers/gpu/nvgpu/gp106/sec2_gp106.c
parentfbeca4a8414c03a1564d7a370964187be51a3e6c (diff)
gpu: nvgpu: Falcon controller halt interrupt status clear
- Added nvgpu_flcn_clear_halt_intr_status() to Wait for halt interrupt status clear by clear_halt_interrupt_status() HAL within timeout - Added gk20a_flcn_clear_halt_interrupt_status() to clear falcon controller halt interrupt status - Replaced flacon halt interrupt clear with nvgpu_flcn_clear_halt_intr_status() method NVGPU JIRA-99 Change-Id: I762a3c01cd1d02028eb6aaa9898a50be94376619 Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: https://git-master/r/1511333 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.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/gpu/nvgpu/gp106/sec2_gp106.c b/drivers/gpu/nvgpu/gp106/sec2_gp106.c
index 20171309..0f265710 100644
--- a/drivers/gpu/nvgpu/gp106/sec2_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/sec2_gp106.c
@@ -34,24 +34,12 @@
34 34
35int sec2_clear_halt_interrupt_status(struct gk20a *g, unsigned int timeout) 35int sec2_clear_halt_interrupt_status(struct gk20a *g, unsigned int timeout)
36{ 36{
37 u32 data = 0; 37 int status = 0;
38 struct nvgpu_timeout to; 38
39 39 if (nvgpu_flcn_clear_halt_intr_status(&g->sec2_flcn, timeout))
40 nvgpu_timeout_init(g, &to, timeout, NVGPU_TIMER_CPU_TIMER); 40 status = -EBUSY;
41 do { 41
42 gk20a_writel(g, psec_falcon_irqsclr_r(), 42 return status;
43 gk20a_readl(g, psec_falcon_irqsclr_r()) | (0x10));
44 data = gk20a_readl(g, psec_falcon_irqstat_r());
45 if ((data & psec_falcon_irqstat_halt_true_f()) !=
46 psec_falcon_irqstat_halt_true_f())
47 /*halt irq is clear*/
48 break;
49 nvgpu_udelay(1);
50 } while (!nvgpu_timeout_expired(&to));
51
52 if (nvgpu_timeout_peek_expired(&to))
53 return -EBUSY;
54 return 0;
55} 43}
56 44
57int sec2_wait_for_halt(struct gk20a *g, unsigned int timeout) 45int sec2_wait_for_halt(struct gk20a *g, unsigned int timeout)