diff options
author | Vijayakumar <vsubbu@nvidia.com> | 2015-04-09 07:17:13 -0400 |
---|---|---|
committer | Ishan Mittal <imittal@nvidia.com> | 2015-05-18 02:03:44 -0400 |
commit | d65a93b80c60bb677fbc13b7180e0f31b7f97f84 (patch) | |
tree | da92083e7565c8d82f4f8bd7d06dab20b4f61e1a /drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |
parent | 6a5cc111713cec1d0e1edf9b8a1e64eb17105d9c (diff) |
gpu: nvgpu: add secure gpccs boot support
bug 200080684
keeping it disabled by default
also trimming the code by removing redundant
variable to check recovery. pmu quick wait
now checks only for irqs which are serviced
by kernel. requests pmu to bit bang gpccs
ucode.
Change-Id: I12ef23d6d59b507e86a129b69eab65b21d0438c6
Signed-off-by: Vijayakumar <vsubbu@nvidia.com>
Reviewed-on: http://git-master/r/729622
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index 6313b9d5..2456c784 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -3333,12 +3333,16 @@ int pmu_wait_message_cond(struct pmu_gk20a *pmu, u32 timeout, | |||
3333 | struct gk20a *g = gk20a_from_pmu(pmu); | 3333 | struct gk20a *g = gk20a_from_pmu(pmu); |
3334 | unsigned long end_jiffies = jiffies + msecs_to_jiffies(timeout); | 3334 | unsigned long end_jiffies = jiffies + msecs_to_jiffies(timeout); |
3335 | unsigned long delay = GR_IDLE_CHECK_DEFAULT; | 3335 | unsigned long delay = GR_IDLE_CHECK_DEFAULT; |
3336 | u32 servicedpmuint; | ||
3336 | 3337 | ||
3338 | servicedpmuint = pwr_falcon_irqstat_halt_true_f() | | ||
3339 | pwr_falcon_irqstat_exterr_true_f() | | ||
3340 | pwr_falcon_irqstat_swgen0_true_f(); | ||
3337 | do { | 3341 | do { |
3338 | if (*var == val) | 3342 | if (*var == val) |
3339 | return 0; | 3343 | return 0; |
3340 | 3344 | ||
3341 | if (gk20a_readl(g, pwr_falcon_irqstat_r())) | 3345 | if (gk20a_readl(g, pwr_falcon_irqstat_r()) & servicedpmuint) |
3342 | gk20a_pmu_isr(g); | 3346 | gk20a_pmu_isr(g); |
3343 | 3347 | ||
3344 | usleep_range(delay, delay * 2); | 3348 | usleep_range(delay, delay * 2); |
@@ -4042,8 +4046,6 @@ int gk20a_pmu_destroy(struct gk20a *g) | |||
4042 | pmu->zbc_ready = false; | 4046 | pmu->zbc_ready = false; |
4043 | g->ops.pmu.lspmuwprinitdone = false; | 4047 | g->ops.pmu.lspmuwprinitdone = false; |
4044 | g->ops.pmu.fecsbootstrapdone = false; | 4048 | g->ops.pmu.fecsbootstrapdone = false; |
4045 | g->ops.pmu.fecsrecoveryinprogress = 0; | ||
4046 | |||
4047 | 4049 | ||
4048 | gk20a_dbg_fn("done"); | 4050 | gk20a_dbg_fn("done"); |
4049 | return 0; | 4051 | return 0; |