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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __MSM_TZ_SMMU_H__
#define __MSM_TZ_SMMU_H__
#include <linux/device.h>
enum tz_smmu_device_id {
TZ_DEVICE_START = 0,
TZ_DEVICE_VIDEO = 0,
TZ_DEVICE_MDSS,
TZ_DEVICE_LPASS,
TZ_DEVICE_MDSS_BOOT,
TZ_DEVICE_USB1_HS,
TZ_DEVICE_OCMEM,
TZ_DEVICE_LPASS_CORE,
TZ_DEVICE_VPU,
TZ_DEVICE_COPSS_SMMU,
TZ_DEVICE_USB3_0,
TZ_DEVICE_USB3_1,
TZ_DEVICE_PCIE_0,
TZ_DEVICE_PCIE_1,
TZ_DEVICE_BCSS,
TZ_DEVICE_VCAP,
TZ_DEVICE_PCIE20,
TZ_DEVICE_IPA,
TZ_DEVICE_APPS,
TZ_DEVICE_GPU,
TZ_DEVICE_UFS,
TZ_DEVICE_ICE,
TZ_DEVICE_ROT,
TZ_DEVICE_VFE,
TZ_DEVICE_ANOC0,
TZ_DEVICE_ANOC1,
TZ_DEVICE_ANOC2,
TZ_DEVICE_CPP,
TZ_DEVICE_JPEG,
TZ_DEVICE_MAX,
};
#ifdef CONFIG_MSM_TZ_SMMU
int msm_tz_smmu_atos_start(struct device *dev, int cb_num);
int msm_tz_smmu_atos_end(struct device *dev, int cb_num);
enum tz_smmu_device_id msm_dev_to_device_id(struct device *dev);
void msm_tz_set_cb_format(enum tz_smmu_device_id sec_id, int cbndx);
#else
static inline int msm_tz_smmu_atos_start(struct device *dev, int cb_num)
{
return 0;
}
static inline int msm_tz_smmu_atos_end(struct device *dev, int cb_num)
{
return 0;
}
static inline enum tz_smmu_device_id msm_dev_to_device_id(struct device *dev)
{
return -EINVAL;
}
static inline void msm_tz_set_cb_format(enum tz_smmu_device_id sec_id,
int cbndx)
{
}
#endif /* CONFIG_MSM_TZ_SMMU */
#endif /* __MSM_TZ_SMMU_H__ */
|