aboutsummaryrefslogtreecommitdiff
path: root/include/tee/optee_service.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-09-15 09:59:47 -0400
committerTom Rini <trini@konsulko.com>2022-09-15 09:59:47 -0400
commitd9e85eeebabd5fc0c95be96bd70fa7362eb89f33 (patch)
treef3f4c2a9d5d19e8b548ce6ed98fbd5610d30bdd7 /include/tee/optee_service.h
parent1520af3f8450bb58168fe1cc827a56d435e9f74c (diff)
parent0cd933bb4bd74084d942c42098ebf9e07d9e0f63 (diff)
Merge branch '2022-09-15-general-improvements' into next
- Add uncompressed kernel image support to falcon mode, TEE improvements, make xyz-modem timeout configurable, gpio updates and other assorted improvements.
Diffstat (limited to 'include/tee/optee_service.h')
-rw-r--r--include/tee/optee_service.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/tee/optee_service.h b/include/tee/optee_service.h
new file mode 100644
index 0000000000..fca468af7c
--- /dev/null
+++ b/include/tee/optee_service.h
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+/*
+ * (C) Copyright 2022 Linaro Limited
+ */
+
+#ifndef _OPTEE_SERVICE_H
+#define _OPTEE_SERVICE_H
+
+/*
+ * struct optee_service - Discoverable OP-TEE service
+ *
+ * @driver_name - Name of the related driver
+ * @uuid - UUID of the OP-TEE service related to the driver
+ *
+ * Use macro OPTEE_SERVICE_DRIVER() to register a driver related to an
+ * OP-TEE service discovered when driver asks OP-TEE services enumaration.
+ */
+struct optee_service {
+ const char *driver_name;
+ const struct tee_optee_ta_uuid uuid;
+};
+
+#ifdef CONFIG_OPTEE_SERVICE_DISCOVERY
+#define OPTEE_SERVICE_DRIVER(__name, __uuid, __drv_name) \
+ ll_entry_declare(struct optee_service, __name, optee_service) = { \
+ .uuid = __uuid, \
+ .driver_name = __drv_name, \
+ }
+#else
+#define OPTEE_SERVICE_DRIVER(__name, __uuid, __drv_name) \
+ static int __name##__COUNTER__ __always_unused
+#endif
+
+#endif /* _OPTEE_SERVICE_H */