summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/sec2_gp106.c
diff options
context:
space:
mode:
authorMahantesh Kumbar <mkumbar@nvidia.com>2018-06-20 05:09:59 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-05 09:43:53 -0400
commit80bf7419179223e6893e3549fd0a192804149eda (patch)
tree575bf72cfc6de5f247d376bb92350e56a54b698b /drivers/gpu/nvgpu/gp106/sec2_gp106.c
parentbc05e0e0e5b7d00761472252e9f8c12886539746 (diff)
gpu: nvgpu: gp106 SEC2 falcon code update
- Added prefix gp106_ to sec2_wait_for_halt() & sec2_clear_halt_interrupt_status() for gp106 SEC2 HAL - Made changes to gp106_sec2_wait_for_halt() to read SEC2 falcon mailbox using common falcon mailbox access functions. - Add define for falcon mailbox - These changes are done to reuse gp106 HAL's for GPU_NEXT. Change-Id: Id32a7636d775b482684212ed4ef5d01c8ea65335 Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1755618 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/sec2_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/sec2_gp106.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gp106/sec2_gp106.c b/drivers/gpu/nvgpu/gp106/sec2_gp106.c
index 1c959022..d480d875 100644
--- a/drivers/gpu/nvgpu/gp106/sec2_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/sec2_gp106.c
@@ -34,7 +34,8 @@
34#define gm20b_dbg_pmu(g, fmt, arg...) \ 34#define gm20b_dbg_pmu(g, fmt, arg...) \
35 nvgpu_log(g, gpu_dbg_pmu, fmt, ##arg) 35 nvgpu_log(g, gpu_dbg_pmu, fmt, ##arg)
36 36
37int sec2_clear_halt_interrupt_status(struct gk20a *g, unsigned int timeout) 37int gp106_sec2_clear_halt_interrupt_status(struct gk20a *g,
38 unsigned int timeout)
38{ 39{
39 int status = 0; 40 int status = 0;
40 41
@@ -44,7 +45,7 @@ int sec2_clear_halt_interrupt_status(struct gk20a *g, unsigned int timeout)
44 return status; 45 return status;
45} 46}
46 47
47int sec2_wait_for_halt(struct gk20a *g, unsigned int timeout) 48int gp106_sec2_wait_for_halt(struct gk20a *g, unsigned int timeout)
48{ 49{
49 u32 data = 0; 50 u32 data = 0;
50 int completion = 0; 51 int completion = 0;
@@ -55,9 +56,10 @@ int sec2_wait_for_halt(struct gk20a *g, unsigned int timeout)
55 goto exit; 56 goto exit;
56 } 57 }
57 58
58 g->acr.capabilities = gk20a_readl(g, psec_falcon_mailbox1_r()); 59 g->acr.capabilities = nvgpu_flcn_mailbox_read(&g->sec2_flcn,
60 FALCON_MAILBOX_1);
59 gm20b_dbg_pmu(g, "ACR capabilities %x\n", g->acr.capabilities); 61 gm20b_dbg_pmu(g, "ACR capabilities %x\n", g->acr.capabilities);
60 data = gk20a_readl(g, psec_falcon_mailbox0_r()); 62 data = nvgpu_flcn_mailbox_read(&g->sec2_flcn, FALCON_MAILBOX_0);
61 if (data) { 63 if (data) {
62 nvgpu_err(g, "ACR boot failed, err %x", data); 64 nvgpu_err(g, "ACR boot failed, err %x", data);
63 completion = -EAGAIN; 65 completion = -EAGAIN;