summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTekkamanV <tekkamanv@starfivetech.com>2021-09-19 09:12:45 +0300
committerTekkaman Ninja <tekkamanninja@163.com>2021-09-29 09:51:21 +0300
commitec56b4f5ea2f9a0a93047c20c5fe3b2c0cdf6f96 (patch)
treeec46c10d43ce1022ea0482fdfda042336f49c9d3 /include
parentd4362d5fabcc8e19d8143a7ffe0ee9da6ababd01 (diff)
downloadu-boot-ec56b4f5ea2f9a0a93047c20c5fe3b2c0cdf6f96.tar.xz
cache: add flush_range interface in cache_ops struct
Signed-off-by: TekkamanV <tekkamanv@starfivetech.com>
Diffstat (limited to 'include')
-rw-r--r--include/cache.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/cache.h b/include/cache.h
index ecb7956efd..03ce408a96 100644
--- a/include/cache.h
+++ b/include/cache.h
@@ -40,6 +40,17 @@ struct cache_ops {
* @return 0 if OK, -ve on error
*/
int (*disable)(struct udevice *dev);
+
+ /**
+ * flush_range() - Flush cache in a range
+ *
+ * @dev: Device to check (UCLASS_CACHE)
+ * @start: start address of the range
+ * @end: end address of the range
+ * @return 0 if OK, -ve on error
+ */
+ int (*flush_range)(struct udevice *dev,
+ unsigned long start, unsigned long end);
};
#define cache_get_ops(dev) ((struct cache_ops *)(dev)->driver->ops)
@@ -68,4 +79,14 @@ int cache_enable(struct udevice *dev);
* @return 0 if OK, -ve on error
*/
int cache_disable(struct udevice *dev);
+
+/**
+ * flush_range() - Flush cache
+ *
+ * @dev: Device to check (UCLASS_CACHE)
+ * @start: start address of the range
+ * @end: end address of the range
+ * @return 0 if OK, -ve on error
+ */
+int flush_range(struct udevice *dev, unsigned long start, unsigned long end);
#endif