]> Git Repo - J-u-boot.git/blame - drivers/smem/sandbox_smem.c
tpm: refactor function names and macros for infineon v1.2 TPM
[J-u-boot.git] / drivers / smem / sandbox_smem.c
CommitLineData
7fd7e2cf
RF
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (c) 2018 Ramon Fried <[email protected]>
4 */
5
6#include <common.h>
7#include <dm.h>
8#include <errno.h>
9#include <smem.h>
10#include <asm/test.h>
11
12static int sandbox_smem_alloc(unsigned int host,
13 unsigned int item, size_t size)
14{
15 return 0;
16}
17
18static void *sandbox_smem_get(unsigned int host,
19 unsigned int item, size_t *size)
20{
21 return NULL;
22}
23
24static int sandbox_smem_get_free_space(unsigned int host)
25{
26 return 0;
27}
28
29static 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,
33};
34
35static const struct udevice_id sandbox_smem_ids[] = {
36 { .compatible = "sandbox,smem" },
37 { }
38};
39
40U_BOOT_DRIVER(smem_sandbox) = {
41 .name = "smem_sandbox",
42 .id = UCLASS_SMEM,
43 .of_match = sandbox_smem_ids,
44 .ops = &sandbox_smem_ops,
45};
This page took 0.127457 seconds and 4 git commands to generate.