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

Commit 79360db9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: bgcom: prevent BG status checking while SPI is busy"

parents df7629e9 8c03a34c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -745,11 +745,18 @@ static int is_bg_resume(void *handle)
	uint8_t rx_buf[8] = {0};
	uint32_t cmnd_reg = 0;

	if (spi_state == BGCOM_SPI_BUSY) {
		printk_ratelimited("SPI is held by TZ\n");
		goto ret_err;
	}

	txn_len = 0x08;
	tx_buf[0] = 0x05;
	ret = bgcom_transfer(handle, tx_buf, rx_buf, txn_len);
	if (!ret)
		memcpy(&cmnd_reg, rx_buf+BG_SPI_READ_LEN, 0x04);

ret_err:
	return cmnd_reg & BIT(31);
}