summaryrefslogtreecommitdiffstats
path: root/include/linux/psp-platform-access.h
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2023-03-10 15:19:50 -0600
committerHerbert Xu <herbert@gondor.apana.org.au>2023-03-17 11:16:43 +0800
commitd5812571f594b03438d0d7acd0dc044f73c1719e (patch)
tree0cc20f90f769d891e6c8c11db007d6475d7e641f /include/linux/psp-platform-access.h
parent22351239247b30978d06eb2ab5c258e6b344949f (diff)
downloadlinux-stable-d5812571f594b03438d0d7acd0dc044f73c1719e.tar.gz
linux-stable-d5812571f594b03438d0d7acd0dc044f73c1719e.tar.bz2
linux-stable-d5812571f594b03438d0d7acd0dc044f73c1719e.zip
crypto: ccp - Add support for ringing a platform doorbell
Some platforms support using a doorbell to communicate. Export this feature for other drivers to utilize as well. Link: https://lore.kernel.org/linux-i2c/20220916131854.687371-3-jsd@semihalf.com/ Suggested-by: Jan Dabros <jsd@semihalf.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/psp-platform-access.h')
-rw-r--r--include/linux/psp-platform-access.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/psp-platform-access.h b/include/linux/psp-platform-access.h
index 977df5cfd494..89df4549fada 100644
--- a/include/linux/psp-platform-access.h
+++ b/include/linux/psp-platform-access.h
@@ -35,6 +35,21 @@ struct psp_request {
int psp_send_platform_access_msg(enum psp_platform_access_msg, struct psp_request *req);
/**
+ * psp_ring_platform_doorbell() - Ring platform doorbell
+ *
+ * This function is intended to be used by drivers outside of ccp to ring the
+ * platform doorbell with a message.
+ *
+ * Returns:
+ * 0: success
+ * -%EBUSY: mailbox in recovery or in use
+ * -%ENODEV: driver not bound with PSP device
+ * -%ETIMEDOUT: request timed out
+ * -%EIO: unknown error (see kernel log)
+ */
+int psp_ring_platform_doorbell(int msg);
+
+/**
* psp_check_platform_access_status() - Checks whether platform features is ready
*
* This function is intended to be used by drivers outside of ccp to determine