diff options
| author | Mario Limonciello <mario.limonciello@amd.com> | 2023-03-11 00:19:50 +0300 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-03-17 06:16:43 +0300 |
| commit | d5812571f594b03438d0d7acd0dc044f73c1719e (patch) | |
| tree | 0cc20f90f769d891e6c8c11db007d6475d7e641f /include | |
| parent | 22351239247b30978d06eb2ab5c258e6b344949f (diff) | |
| download | linux-d5812571f594b03438d0d7acd0dc044f73c1719e.tar.xz | |
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')
| -rw-r--r-- | include/linux/psp-platform-access.h | 15 | ||||
| -rw-r--r-- | include/linux/psp.h | 3 |
2 files changed, 18 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 diff --git a/include/linux/psp.h b/include/linux/psp.h index d3424790a70e..92e60aeef21e 100644 --- a/include/linux/psp.h +++ b/include/linux/psp.h @@ -23,4 +23,7 @@ #define PSP_CMDRESP_RECOVERY BIT(30) #define PSP_CMDRESP_RESP BIT(31) +#define PSP_DRBL_MSG PSP_CMDRESP_CMD +#define PSP_DRBL_RING BIT(0) + #endif /* __PSP_H */ |
