summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/acr_gm20b.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/gm20b/acr_gm20b.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/gm20b/acr_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/acr_gm20b.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c
index 08a58abb..e440e179 100644
--- a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c
@@ -1488,22 +1488,11 @@ err_done:
1488*/ 1488*/
1489static int pmu_wait_for_halt(struct gk20a *g, unsigned int timeout_ms) 1489static int pmu_wait_for_halt(struct gk20a *g, unsigned int timeout_ms)
1490{ 1490{
1491 struct nvgpu_pmu *pmu = &g->pmu;
1491 u32 data = 0; 1492 u32 data = 0;
1492 int ret = -EBUSY; 1493 int ret = -EBUSY;
1493 struct nvgpu_timeout timeout;
1494
1495 nvgpu_timeout_init(g, &timeout, timeout_ms, NVGPU_TIMER_CPU_TIMER);
1496
1497 do {
1498 data = gk20a_readl(g, pwr_falcon_cpuctl_r());
1499 if (data & pwr_falcon_cpuctl_halt_intr_m()) {
1500 /* CPU is halted break */
1501 ret = 0;
1502 break;
1503 }
1504 nvgpu_udelay(1);
1505 } while (!nvgpu_timeout_expired(&timeout));
1506 1494
1495 ret = nvgpu_flcn_wait_for_halt(pmu->flcn, timeout_ms);
1507 if (ret) { 1496 if (ret) {
1508 nvgpu_err(g, "ACR boot timed out"); 1497 nvgpu_err(g, "ACR boot timed out");
1509 return ret; 1498 return ret;