blob: c6334ca27fb3db63c192b7a927e980a89f0da42c [file] [log] [blame]
Dinh Nguyen84b124d2019-04-23 16:55:03 -05001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2019 Intel Corporation <www.intel.com>
4 */
5
6#ifndef __CACHE_H
7#define __CACHE_H
8
9/*
10 * Structure for the cache controller
11 */
12struct cache_info {
13 phys_addr_t base; /* Base physical address of cache device. */
14};
15
16struct cache_ops {
17 /**
18 * get_info() - Get basic cache info
19 *
20 * @dev: Device to check (UCLASS_CACHE)
21 * @info: Place to put info
22 * @return 0 if OK, -ve on error
23 */
24 int (*get_info)(struct udevice *dev, struct cache_info *info);
25};
26
27#define cache_get_ops(dev) ((struct cache_ops *)(dev)->driver->ops)
28
29/**
30 * cache_get_info() - Get information about a cache controller
31 *
32 * @dev: Device to check (UCLASS_CACHE)
33 * @info: Returns cache info
34 * @return 0 if OK, -ve on error
35 */
36int cache_get_info(struct udevice *dev, struct cache_info *info);
37
38#endif