diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2017-06-30 02:12:17 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-04 02:44:30 -0400 |
commit | 2cf964d175abc0f3eae9ed0e01e6eeed5cd6b4da (patch) | |
tree | dc91c30fdfcf4ee37ff830dcffc7b15c8b5add14 /drivers/gpu/nvgpu/gm20b/acr_gm20b.c | |
parent | fbeca4a8414c03a1564d7a370964187be51a3e6c (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/gm20b/acr_gm20b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/acr_gm20b.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c index e440e179..ee861933 100644 --- a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c | |||
@@ -1517,23 +1517,11 @@ static int pmu_wait_for_halt(struct gk20a *g, unsigned int timeout_ms) | |||
1517 | */ | 1517 | */ |
1518 | static int clear_halt_interrupt_status(struct gk20a *g, unsigned int timeout_ms) | 1518 | static int clear_halt_interrupt_status(struct gk20a *g, unsigned int timeout_ms) |
1519 | { | 1519 | { |
1520 | u32 data = 0; | 1520 | struct nvgpu_pmu *pmu = &g->pmu; |
1521 | struct nvgpu_timeout timeout; | 1521 | int status = 0; |
1522 | |||
1523 | nvgpu_timeout_init(g, &timeout, timeout_ms, NVGPU_TIMER_CPU_TIMER); | ||
1524 | |||
1525 | do { | ||
1526 | gk20a_writel(g, pwr_falcon_irqsclr_r(), | ||
1527 | gk20a_readl(g, pwr_falcon_irqsclr_r()) | (0x10)); | ||
1528 | data = gk20a_readl(g, (pwr_falcon_irqstat_r())); | ||
1529 | |||
1530 | if ((data & pwr_falcon_irqstat_halt_true_f()) != | ||
1531 | pwr_falcon_irqstat_halt_true_f()) | ||
1532 | /*halt irq is clear*/ | ||
1533 | return 0; | ||
1534 | 1522 | ||
1535 | nvgpu_udelay(1); | 1523 | if (nvgpu_flcn_clear_halt_intr_status(pmu->flcn, timeout_ms)) |
1536 | } while (!nvgpu_timeout_expired(&timeout)); | 1524 | status = -EBUSY; |
1537 | 1525 | ||
1538 | return -ETIMEDOUT; | 1526 | return status; |
1539 | } | 1527 | } |