mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
2f712e2230
commit
fbeca4a841
@@ -1488,22 +1488,11 @@ err_done:
|
||||
*/
|
||||
static int pmu_wait_for_halt(struct gk20a *g, unsigned int timeout_ms)
|
||||
{
|
||||
struct nvgpu_pmu *pmu = &g->pmu;
|
||||
u32 data = 0;
|
||||
int ret = -EBUSY;
|
||||
struct nvgpu_timeout timeout;
|
||||
|
||||
nvgpu_timeout_init(g, &timeout, timeout_ms, NVGPU_TIMER_CPU_TIMER);
|
||||
|
||||
do {
|
||||
data = gk20a_readl(g, pwr_falcon_cpuctl_r());
|
||||
if (data & pwr_falcon_cpuctl_halt_intr_m()) {
|
||||
/* CPU is halted break */
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
nvgpu_udelay(1);
|
||||
} while (!nvgpu_timeout_expired(&timeout));
|
||||
|
||||
ret = nvgpu_flcn_wait_for_halt(pmu->flcn, timeout_ms);
|
||||
if (ret) {
|
||||
nvgpu_err(g, "ACR boot timed out");
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user