diff options
author | Tom Rini <trini@konsulko.com> | 2019-05-05 12:25:39 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-05-05 12:25:39 -0400 |
commit | abad176da14c576b5126484b03cba73a3b2c6f16 (patch) | |
tree | 1baba7f9058acf8e41a043e6ce0f08dd1b94f644 /include/cache.h | |
parent | 86f578ee85a697afb980233312f9aac1d98816df (diff) | |
parent | 9337a08768dfa0a006382f1d05cf69b5f67f7844 (diff) |
Merge branch '2019-05-05-master-imports'
- Various assorted fixes
- btrfs zstd compression support
- Enable hardware DDR levelling on am43xx platforms.
- pl310 cache controller driver
Diffstat (limited to 'include/cache.h')
-rw-r--r-- | include/cache.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/cache.h b/include/cache.h new file mode 100644 index 00000000000..c6334ca27fb --- /dev/null +++ b/include/cache.h @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2019 Intel Corporation <www.intel.com> + */ + +#ifndef __CACHE_H +#define __CACHE_H + +/* + * Structure for the cache controller + */ +struct cache_info { + phys_addr_t base; /* Base physical address of cache device. */ +}; + +struct cache_ops { + /** + * get_info() - Get basic cache info + * + * @dev: Device to check (UCLASS_CACHE) + * @info: Place to put info + * @return 0 if OK, -ve on error + */ + int (*get_info)(struct udevice *dev, struct cache_info *info); +}; + +#define cache_get_ops(dev) ((struct cache_ops *)(dev)->driver->ops) + +/** + * cache_get_info() - Get information about a cache controller + * + * @dev: Device to check (UCLASS_CACHE) + * @info: Returns cache info + * @return 0 if OK, -ve on error + */ +int cache_get_info(struct udevice *dev, struct cache_info *info); + +#endif |