blob: 586432412eb8d2726450f5f495dd9371266c516f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __QCOM_SMEM_H__
#define __QCOM_SMEM_H__
#include <linux/err.h>
#include <stdbool.h>
#define QCOM_SMEM_HOST_ANY -1
#if defined(CONFIG_QCOM_SMEM)
int qcom_smem_init(void);
int qcom_socinfo_init(void);
bool qcom_smem_is_available(void);
int qcom_smem_alloc(unsigned host, unsigned item, size_t size);
void *qcom_smem_get(unsigned host, unsigned item, size_t *size);
int qcom_smem_get_free_space(unsigned host);
#else
static int qcom_smem_init(void) { return -ENOSYS; }
static bool qcom_smem_is_available(void) { return false; }
int qcom_smem_alloc(unsigned host, unsigned item, size_t size)
{
return -ENOSYS;
}
void *qcom_smem_get(unsigned host, unsigned item, size_t *size)
{
return ERR_PTR(-ENOSYS);
}
int qcom_smem_get_free_space(unsigned host);
#endif
#endif
|