Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 927d34f7 authored by Yu SI's avatar Yu SI
Browse files

msm: cvp: poll on cvp lpi status during power down



polling on cvp lpi status check during power down

Change-Id: I21129746cd4841af7e7a577946c543146bc9d6fc
Signed-off-by: default avatarYu SI <ysi@codeaurora.org>
parent e5734f37
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -4132,7 +4132,23 @@ static void power_off_iris2(struct iris_hfi_device *device)
	__write_register(device,
		CVP_WRAPPER_DEBUG_BRIDGE_LPI_CONTROL, 0x7);

	reg_status = 0;
	count = 0;
	while ((reg_status != 0x7) && count < max_count) {
		lpi_status = __read_register(device,
			CVP_WRAPPER_DEBUG_BRIDGE_LPI_STATUS);
		reg_status = lpi_status & 0x7;
		/* Wait for debug bridge lpi status to be set */
		usleep_range(50, 100);
		count++;
	}
	dprintk(CVP_PWR,
		"DBLP Set : lpi_status %d reg_status %d (count %d)\n",
		lpi_status, reg_status, count);
	if (count == max_count) {
		dprintk(CVP_WARN,
			"DBLP Set: status %x %x\n", reg_status, lpi_status);
	}

	/* HPG 6.1.2 Step 4, debug bridge to lpi release */
	__write_register(device,