blob: 0fb767e43399c95175d8140cbd41d87e5014aa9f [file] [log] [blame]
Dinh Nguyend94e18e2019-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>
Simon Glass3ba929a2020-10-30 21:38:53 -060010#include <asm/global_data.h>
Dinh Nguyend94e18e2019-04-23 16:55:03 -050011
12DECLARE_GLOBAL_DATA_PTR;
13
14static int sandbox_get_info(struct udevice *dev, struct cache_info *info)
15{
16 info->base = 0x11223344;
17
18 return 0;
19}
20
Rick Chena7af2862019-08-28 18:46:05 +080021static int sandbox_enable(struct udevice *dev)
22{
23 return 0;
24}
25
26static int snadbox_disable(struct udevice *dev)
27{
28 return 0;
29}
30
31
Dinh Nguyend94e18e2019-04-23 16:55:03 -050032static const struct cache_ops sandbox_cache_ops = {
33 .get_info = sandbox_get_info,
Rick Chena7af2862019-08-28 18:46:05 +080034 .enable = sandbox_enable,
35 .disable = snadbox_disable,
Dinh Nguyend94e18e2019-04-23 16:55:03 -050036};
37
38static const struct udevice_id sandbox_cache_ids[] = {
39 { .compatible = "sandbox,cache" },
40 { }
41};
42
43U_BOOT_DRIVER(cache_sandbox) = {
44 .name = "cache_sandbox",
45 .id = UCLASS_CACHE,
46 .of_match = sandbox_cache_ids,
47 .ops = &sandbox_cache_ops,
48};