Merge branch 'master' of git://git.denx.de/u-boot
[platform/kernel/u-boot.git] / include / tee.h
index 8207d0c..44e9cd4 100644 (file)
@@ -7,6 +7,8 @@
 #define __TEE_H
 
 #include <linux/bitops.h>
+#include <linux/list.h>
+
 #define TEE_UUID_LEN           16
 
 #define TEE_GEN_CAP_GP          BIT(0) /* GlobalPlatform compliant TEE */
@@ -305,11 +307,22 @@ bool tee_shm_is_registered(struct tee_shm *shm, struct udevice *dev);
  * Returns a probed TEE device of the first TEE device matched by the
  * match() callback or NULL.
  */
+#if CONFIG_IS_ENABLED(TEE)
 struct udevice *tee_find_device(struct udevice *start,
                                int (*match)(struct tee_version_data *vers,
                                             const void *data),
                                const void *data,
                                struct tee_version_data *vers);
+#else
+static inline struct udevice *tee_find_device(struct udevice *start,
+                                             int (*match)(struct tee_version_data *vers,
+                                                          const void *data),
+                                             const void *data,
+                                             struct tee_version_data *vers)
+{
+       return NULL;
+}
+#endif
 
 /**
  * tee_get_version() - Query capabilities of TEE device
@@ -375,4 +388,10 @@ void tee_optee_ta_uuid_from_octets(struct tee_optee_ta_uuid *d,
 void tee_optee_ta_uuid_to_octets(u8 d[TEE_UUID_LEN],
                                 const struct tee_optee_ta_uuid *s);
 
+/**
+ * tee_flush_all_shm_dcache() - Flush data cache for all shared memories
+ * @dev:       The TEE device
+ */
+void tee_flush_all_shm_dcache(struct udevice *dev);
+
 #endif /* __TEE_H */