scsi: firmware: qcom_scm: Add support for programming inline crypto keys
authorEric Biggers <ebiggers@google.com>
Fri, 10 Jul 2020 07:20:08 +0000 (00:20 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 25 Jul 2020 02:09:54 +0000 (22:09 -0400)
commit0f206514749be9988a083ca364b889a7fcff7f78
treebf9f7ba1962a8642ac8bca5c9dbab7acee77cfeb
parent3eef38a14370c673134600130094472e2c3f4041
scsi: firmware: qcom_scm: Add support for programming inline crypto keys

Add support for the Inline Crypto Engine (ICE) key programming interface
that's needed for the ufs-qcom driver to use inline encryption on
Snapdragon SoCs.  This interface consists of two SCM calls: one to program
a key into a keyslot, and one to invalidate a keyslot.

Although the UFS specification defines a standard way to do this, on these
SoCs the Linux kernel isn't permitted to access the needed crypto
configuration registers directly; these SCM calls must be used instead.

Link: https://lore.kernel.org/r/20200710072013.177481-2-ebiggers@kernel.org
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/firmware/qcom_scm.c
drivers/firmware/qcom_scm.h
include/linux/qcom_scm.h