1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2018 Ramon Fried <ramon.fried@gmail.com>
10 int smem_alloc(struct udevice *dev, unsigned int host,
11 unsigned int item, size_t size)
13 struct smem_ops *ops = smem_get_ops(dev);
18 return ops->alloc(host, item, size);
21 void *smem_get(struct udevice *dev, unsigned int host,
22 unsigned int item, size_t *size)
24 struct smem_ops *ops = smem_get_ops(dev);
29 return ops->get(host, item, size);
32 int smem_get_free_space(struct udevice *dev, unsigned int host)
34 struct smem_ops *ops = smem_get_ops(dev);
36 if (!ops->get_free_space)
39 return ops->get_free_space(host);
42 UCLASS_DRIVER(smem) = {