blob: 14cc6b0c0ac1ff7dc5303a08741d1c218cc8ecb5 [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#include <common.h>
7#include <cache.h>
8#include <dm.h>
9#include <errno.h>
10
11DECLARE_GLOBAL_DATA_PTR;
12
13static int sandbox_get_info(struct udevice *dev, struct cache_info *info)
14{
15 info->base = 0x11223344;
16
17 return 0;
18}
19
20static const struct cache_ops sandbox_cache_ops = {
21 .get_info = sandbox_get_info,
22};
23
24static const struct udevice_id sandbox_cache_ids[] = {
25 { .compatible = "sandbox,cache" },
26 { }
27};
28
29U_BOOT_DRIVER(cache_sandbox) = {
30 .name = "cache_sandbox",
31 .id = UCLASS_CACHE,
32 .of_match = sandbox_cache_ids,
33 .ops = &sandbox_cache_ops,
34};