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

This commit is contained in:
qctecmdr 2020-06-07 19:33:15 -07:00 • committed by Gerrit - the friendly Code Review server
commit e2e7b603cc

View file

@ -4132,7 +4132,23 @@ static void power_off_iris2(struct iris_hfi_device *device)
__write_register(device,
CVP_WRAPPER_DEBUG_BRIDGE_LPI_CONTROL, 0x7);
usleep_range(50, 100);
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,