Commit 8cbc3448 authored by Thara Gopinath's avatar Thara Gopinath Committed by Herbert Xu

crypto: qce - Enable support for crypto engine on sdm845

Add support Qualcomm Crypto Engine accelerated encryption and
authentication algorithms on sdm845.
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarThara Gopinath <thara.gopinath@linaro.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ac50aec4
...@@ -159,7 +159,21 @@ static int qce_check_version(struct qce_device *qce) ...@@ -159,7 +159,21 @@ static int qce_check_version(struct qce_device *qce)
return -ENODEV; return -ENODEV;
qce->burst_size = QCE_BAM_BURST_SIZE; qce->burst_size = QCE_BAM_BURST_SIZE;
qce->pipe_pair_id = 1;
/*
* Rx and tx pipes are treated as a pair inside CE.
* Pipe pair number depends on the actual BAM dma pipe
* that is used for transfers. The BAM dma pipes are passed
* from the device tree and used to derive the pipe pair
* id in the CE driver as follows.
* BAM dma pipes(rx, tx) CE pipe pair id
* 0,1 0
* 2,3 1
* 4,5 2
* 6,7 3
* ...
*/
qce->pipe_pair_id = qce->dma.rxchan->chan_id >> 1;
dev_dbg(qce->dev, "Crypto device found, version %d.%d.%d\n", dev_dbg(qce->dev, "Crypto device found, version %d.%d.%d\n",
major, minor, step); major, minor, step);
...@@ -260,6 +274,7 @@ static int qce_crypto_remove(struct platform_device *pdev) ...@@ -260,6 +274,7 @@ static int qce_crypto_remove(struct platform_device *pdev)
static const struct of_device_id qce_crypto_of_match[] = { static const struct of_device_id qce_crypto_of_match[] = {
{ .compatible = "qcom,crypto-v5.1", }, { .compatible = "qcom,crypto-v5.1", },
{ .compatible = "qcom,crypto-v5.4", },
{} {}
}; };
MODULE_DEVICE_TABLE(of, qce_crypto_of_match); MODULE_DEVICE_TABLE(of, qce_crypto_of_match);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment