video: tegra: host: gk20a: ELPG cmds use polling
authorArto Merilainen <amerilainen@nvidia.com>
Fri, 13 Sep 2013 07:58:55 +0000 (10:58 +0300)
committerDan Willemsen <dwillemsen@nvidia.com>
Fri, 27 Sep 2013 02:45:52 +0000 (19:45 -0700)
commiteaea76f0478ede6d5e7736bb3666b4ec2acbfa03
treeddfab6a40e7c7e14c7c081ad4ff06bf9610b8a69
parent97acd04c5ce10172e8414cf8e88000a851818fe6
video: tegra: host: gk20a: ELPG cmds use polling

ELPG disable/enable may be used in interrupt handlers to prevent
hardware from sleeping (i.e. while resetting hw units). However,
as ELPG is handled from PMU, we must be able to communicate with
PMU in threaded interrupt context.

This patch adds a separate function for waiting until PMU has
answered to a request. The function polls for PMU interrupt
register and calls the PMU isr if an event has occurred.

Bug 1365804

Change-Id: I752fd4b64ea209d8e7430301b217941a59313377
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/274295
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Prashant Malani <pmalani@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/video/tegra/host/gk20a/pmu_gk20a.c
drivers/video/tegra/host/gk20a/pmu_gk20a.h