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

Commit 5945517e authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "qseecom: use scm_call2 when bus_scaling is enabled"

parents 04f09214 2641b830
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -460,6 +460,9 @@ static int __qseecom_scm_call2_locked(uint32_t smc_id, struct scm_desc *desc)
	int ret = 0;
	int retry_count = 0;

	if (qseecom.support_bus_scaling)
		return scm_call2(smc_id, desc);

	do {
		ret = scm_call2_noretry(smc_id, desc);
		if (ret == -EBUSY) {
@@ -1804,17 +1807,20 @@ static int __qseecom_decrease_clk_ref_count(enum qseecom_ce_hw_instance ce)
	else
		qclk = &qseecom.ce_drv;

	if (qclk->clk_access_cnt > 0) {
		qclk->clk_access_cnt--;
	} else {
	if (qclk->clk_access_cnt > 2) {
		pr_err("Invalid clock ref count %d\n", qclk->clk_access_cnt);
		ret = -EINVAL;
		goto err_dec_ref_cnt;
	}
	if (qclk->clk_access_cnt == 2)
		qclk->clk_access_cnt--;

err_dec_ref_cnt:
	mutex_unlock(&clk_access_lock);
	return ret;
}


static int qseecom_scale_bus_bandwidth_timer(uint32_t mode)
{
	int32_t ret = 0;