summaryrefslogtreecommitdiff
path: root/drivers/mxc/security/sahara2/include/fsl_platform.h
blob: e7a6fd1718b24815049a3e85fa5678fc47fc707c (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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*
 * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved.
 */

/*
 * The code contained herein is licensed under the GNU General Public
 * License. You may obtain a copy of the GNU General Public License
 * Version 2 or later at the following locations:
 *
 * http://www.opensource.org/licenses/gpl-license.html
 * http://www.gnu.org/copyleft/gpl.html
 */

/*!
 * @file fsl_platform.h
 *
 * Header file to isolate code which might be platform-dependent
 */

#ifndef FSL_PLATFORM_H
#define FSL_PLATFORM_H

#ifdef __KERNEL__
#include "portable_os.h"
#endif

#if defined(FSL_PLATFORM_OTHER)

/* Have Makefile or other method of setting FSL_HAVE_* flags */

#elif defined(CONFIG_ARCH_MX3)	/* i.MX31 */

#define FSL_HAVE_SCC
#define FSL_HAVE_RTIC
#define FSL_HAVE_RNGA

#elif defined(CONFIG_ARCH_MX21)

#define FSL_HAVE_HAC
#define FSL_HAVE_RNGA
#define FSL_HAVE_SCC

#elif defined(CONFIG_ARCH_MX25)

#define FSL_HAVE_SCC
#define FSL_HAVE_RNGB
#define FSL_HAVE_RTIC3
#define FSL_HAVE_DRYICE

#elif defined(CONFIG_ARCH_MX27)

#define FSL_HAVE_SAHARA2
#define SUBMIT_MULTIPLE_DARS
#define FSL_HAVE_RTIC
#define FSL_HAVE_SCC
#define ALLOW_LLO_DESCRIPTORS

#elif defined(CONFIG_ARCH_MX35)

#define FSL_HAVE_SCC
#define FSL_HAVE_RNGC
#define FSL_HAVE_RTIC

#elif defined(CONFIG_ARCH_MX37)

#define FSL_HAVE_SCC2
#define FSL_HAVE_RNGC
#define FSL_HAVE_RTIC2
#define FSL_HAVE_SRTC

#elif defined(CONFIG_ARCH_MX51)

#define FSL_HAVE_SCC2
#define FSL_HAVE_SAHARA4
#define FSL_HAVE_RTIC3
#define FSL_HAVE_SRTC
#define NO_RESEED_WORKAROUND
#define NEED_CTR_WORKAROUND
#define USE_S2_CCM_ENCRYPT_CHAIN
#define USE_S2_CCM_DECRYPT_CHAIN
#define ALLOW_LLO_DESCRIPTORS

#elif defined(CONFIG_ARCH_MXC91131)

#define FSL_HAVE_SCC
#define FSL_HAVE_RNGC
#define FSL_HAVE_HAC

#elif defined(CONFIG_ARCH_MXC91221)

#define FSL_HAVE_SCC
#define FSL_HAVE_RNGC
#define FSL_HAVE_RTIC2

#elif defined(CONFIG_ARCH_MXC91231)

#define FSL_HAVE_SAHARA2
#define FSL_HAVE_RTIC
#define FSL_HAVE_SCC
#define NO_OUTPUT_1K_CROSSING

#elif defined(CONFIG_ARCH_MXC91311)

#define FSL_HAVE_SCC
#define FSL_HAVE_RNGC

#elif defined(CONFIG_ARCH_MXC91314)

#define FSL_HAVE_SCC
#define FSL_HAVE_SAHAR4
#define FSL_HAVE_RTIC3
#define NO_RESEED_WORKAROUND
#define NEED_CTR_WORKAROUND
#define USE_S2_CCM_ENCRYPT_CHAIN
#define USE_S2_CCM_DECRYPT_CHAIN
#define ALLOW_LLO_DESCRIPTORS

#elif defined(CONFIG_ARCH_MXC91321)

#define FSL_HAVE_SAHARA2
#define FSL_HAVE_RTIC
#define FSL_HAVE_SCC
#define SCC_CLOCK_NOT_GATED
#define NO_OUTPUT_1K_CROSSING

#elif defined(CONFIG_ARCH_MXC92323)

#define FSL_HAVE_SCC2
#define FSL_HAVE_SAHARA4
#define FSL_HAVE_PKHA
#define FSL_HAVE_RTIC2
#define NO_1K_CROSSING
#define NO_RESEED_WORKAROUND
#define NEED_CTR_WORKAROUND
#define USE_S2_CCM_ENCRYPT_CHAIN
#define USE_S2_CCM_DECRYPT_CHAIN
#define ALLOW_LLO_DESCRIPTORS


#elif  defined(CONFIG_ARCH_MXC91331)

#define FSL_HAVE_SCC
#define FSL_HAVE_RNGA
#define FSL_HAVE_HAC
#define FSL_HAVE_RTIC

#elif defined(CONFIG_8548)

#define FSL_HAVE_SEC2x

#elif defined(CONFIG_MPC8374)

#define FSL_HAVE_SEC3x

#else

#error UNKNOWN_PLATFORM

#endif				/* platform checks */

#endif				/* FSL_PLATFORM_H */