1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2018 Ramon Fried <ramon.fried@gmail.com>
12 static int sandbox_smem_alloc(unsigned int host,
13 unsigned int item, size_t size)
18 static void *sandbox_smem_get(unsigned int host,
19 unsigned int item, size_t *size)
24 static int sandbox_smem_get_free_space(unsigned int host)
29 static const struct smem_ops sandbox_smem_ops = {
30 .alloc = sandbox_smem_alloc,
31 .get = sandbox_smem_get,
32 .get_free_space = sandbox_smem_get_free_space,
35 static const struct udevice_id sandbox_smem_ids[] = {
36 { .compatible = "sandbox,smem" },
40 U_BOOT_DRIVER(smem_sandbox) = {
41 .name = "smem_sandbox",
43 .of_match = sandbox_smem_ids,
44 .ops = &sandbox_smem_ops,