Merge tag 'tpm-030822' of https://source.denx.de/u-boot/custodians/u-boot-tpm
[platform/kernel/u-boot.git] / include / cache.h
index c6334ca..b12fec2 100644 (file)
@@ -6,6 +6,8 @@
 #ifndef __CACHE_H
 #define __CACHE_H
 
+struct udevice;
+
 /*
  * Structure for the cache controller
  */
@@ -22,6 +24,22 @@ struct cache_ops {
         * @return 0 if OK, -ve on error
         */
        int (*get_info)(struct udevice *dev, struct cache_info *info);
+
+       /**
+        * enable() - Enable cache
+        *
+        * @dev:        Device to check (UCLASS_CACHE)
+        * @return 0 if OK, -ve on error
+        */
+       int (*enable)(struct udevice *dev);
+
+       /**
+        * disable() - Flush and disable cache
+        *
+        * @dev:        Device to check (UCLASS_CACHE)
+        * @return 0 if OK, -ve on error
+        */
+       int (*disable)(struct udevice *dev);
 };
 
 #define cache_get_ops(dev)     ((struct cache_ops *)(dev)->driver->ops)
@@ -31,8 +49,23 @@ struct cache_ops {
  *
  * @dev:       Device to check (UCLASS_CACHE)
  * @info:      Returns cache info
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
  */
 int cache_get_info(struct udevice *dev, struct cache_info *info);
 
+/**
+ * cache_enable() - Enable cache
+ *
+ * @dev:       Device to check (UCLASS_CACHE)
+ * Return: 0 if OK, -ve on error
+ */
+int cache_enable(struct udevice *dev);
+
+/**
+ * cache_disable() - Flush and disable cache
+ *
+ * @dev:       Device to check (UCLASS_CACHE)
+ * Return: 0 if OK, -ve on error
+ */
+int cache_disable(struct udevice *dev);
 #endif