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

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

Merge "qcrypto: Request BW before clock during suspend resume"

parents 27a557d4 770df7da
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -4877,15 +4877,12 @@ static int _qce_suspend(void *handle)
	if (handle == NULL)
		return -ENODEV;

	qce_enable_clk(pce_dev);

	sps_pipe_info = pce_dev->ce_bam_info.consumer.pipe;
	sps_disconnect(sps_pipe_info);

	sps_pipe_info = pce_dev->ce_bam_info.producer.pipe;
	sps_disconnect(sps_pipe_info);

	qce_disable_clk(pce_dev);
	return 0;
}

@@ -4899,8 +4896,6 @@ static int _qce_resume(void *handle)
	if (handle == NULL)
		return -ENODEV;

	qce_enable_clk(pce_dev);

	sps_pipe_info = pce_dev->ce_bam_info.consumer.pipe;
	sps_connect_info = &pce_dev->ce_bam_info.consumer.connect;
	memset(sps_connect_info->desc.base, 0x00, sps_connect_info->desc.size);
@@ -4923,7 +4918,6 @@ static int _qce_resume(void *handle)
	if (rc)
		pr_err("Producer callback registration failed rc = %d\n", rc);

	qce_disable_clk(pce_dev);
	return rc;
}

+8 −3
Original line number Diff line number Diff line
@@ -5371,8 +5371,11 @@ static int _qcrypto_suspend(struct platform_device *pdev, pm_message_t state)
	spin_unlock_irqrestore(&cp->lock, flags);
	if (ret)
		return ret;
	if (qce_pm_table.suspend)
	if (qce_pm_table.suspend) {
		qcrypto_ce_set_bus(pengine, true);
		qce_pm_table.suspend(pengine->qce);
		qcrypto_ce_set_bus(pengine, false);
	}
	return 0;
}

@@ -5393,9 +5396,11 @@ static int _qcrypto_resume(struct platform_device *pdev)
	spin_lock_irqsave(&cp->lock, flags);
	if (pengine->bw_state == BUS_SUSPENDED) {
		spin_unlock_irqrestore(&cp->lock, flags);
		if (qce_pm_table.resume)
		if (qce_pm_table.resume) {
			qcrypto_ce_set_bus(pengine, true);
			qce_pm_table.resume(pengine->qce);

			qcrypto_ce_set_bus(pengine, false);
		}
		spin_lock_irqsave(&cp->lock, flags);
		pengine->bw_state = BUS_NO_BANDWIDTH;
		pengine->active_seq++;