diff options
author | Aravind Batni | 2015-11-10 12:43:23 -0600 |
---|---|---|
committer | Aravind Batni | 2015-11-10 12:43:23 -0600 |
commit | d26b38c3a43e4d5c979b3f547291e730832768fc (patch) | |
tree | 43ec95d252ae50f2bef0f4408cbe15a88b658269 | |
parent | f81ea78a083abf207a958edd9bf2ab7ca984fa1f (diff) | |
download | pa-lld-d26b38c3a43e4d5c979b3f547291e730832768fc.tar.gz pa-lld-d26b38c3a43e4d5c979b3f547291e730832768fc.tar.xz pa-lld-d26b38c3a43e4d5c979b3f547291e730832768fc.zip |
added nss_device file for C6678EA.PA_LLD.03.00.01.06
-rw-r--r-- | device/c6678/src/nss_device.c | 245 |
1 files changed, 245 insertions, 0 deletions
diff --git a/device/c6678/src/nss_device.c b/device/c6678/src/nss_device.c new file mode 100644 index 0000000..7f5e7c1 --- /dev/null +++ b/device/c6678/src/nss_device.c | |||
@@ -0,0 +1,245 @@ | |||
1 | /** | ||
2 | * @file k2h/src/nss_device.c | ||
3 | * | ||
4 | * @brief | ||
5 | * This file contains the device specific configuration and initialization routines | ||
6 | * for NSS (Network Sub-System). These configurations are not used by PA LLD, SA LLD | ||
7 | * or CPSW CSL FL. Instaed, they may be included and used by the application modules | ||
8 | * which invoke NSS and those LLDs. | ||
9 | * | ||
10 | * \par | ||
11 | * ============================================================================ | ||
12 | * @n (C) Copyright 2014, Texas Instruments, Inc. | ||
13 | * | ||
14 | * Redistribution and use in source and binary forms, with or without | ||
15 | * modification, are permitted provided that the following conditions | ||
16 | * are met: | ||
17 | * | ||
18 | * Redistributions of source code must retain the above copyright | ||
19 | * notice, this list of conditions and the following disclaimer. | ||
20 | * | ||
21 | * Redistributions in binary form must reproduce the above copyright | ||
22 | * notice, this list of conditions and the following disclaimer in the | ||
23 | * documentation and/or other materials provided with the | ||
24 | * distribution. | ||
25 | * | ||
26 | * Neither the name of Texas Instruments Incorporated nor the names of | ||
27 | * its contributors may be used to endorse or promote products derived | ||
28 | * from this software without specific prior written permission. | ||
29 | * | ||
30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
31 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
32 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
33 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
34 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
35 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
36 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
37 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
38 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
39 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
40 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
41 | * | ||
42 | * \par | ||
43 | */ | ||
44 | |||
45 | /* System includes */ | ||
46 | #include <stdint.h> | ||
47 | #include <stdlib.h> | ||
48 | |||
49 | /* NSS includes */ | ||
50 | #include <ti/drv/pa/nss_if.h> | ||
51 | #include <ti/drv/pa/nss_cfg.h> | ||
52 | |||
53 | /* CSL RL includes */ | ||
54 | #include <ti/csl/cslr_device.h> | ||
55 | #include <ti/csl/csl_qm_queue.h> | ||
56 | |||
57 | /* PDSP images */ | ||
58 | #include <ti/drv/pa/fw/v0/pafw.h> | ||
59 | #include <ti/drv/pa/fw/v0/classify1_0_bin.c> | ||
60 | #include <ti/drv/pa/fw/v0/classify1_1_bin.c> | ||
61 | #include <ti/drv/pa/fw/v0/classify1_2_bin.c> | ||
62 | #include <ti/drv/pa/fw/v0/classify2_bin.c> | ||
63 | #include <ti/drv/pa/fw/v0/pam_bin.c> | ||
64 | |||
65 | #include <ti/drv/sa/fw/v0/safw.h> | ||
66 | #include <ti/drv/sa/fw/v0/saphp1_bin.c> | ||
67 | #include <ti/drv/sa/fw/v0/saphp2_bin.c> | ||
68 | |||
69 | /** @brief NSS initialization parameters */ | ||
70 | nssGlobalConfigParams_t nssGblCfgParams = | ||
71 | { | ||
72 | /** NSS Layout parameters */ | ||
73 | { | ||
74 | /** 1: NSS Gen2 device */ | ||
75 | FALSE, | ||
76 | |||
77 | /** Number of PacketDMA Rx channels */ | ||
78 | NSS_NUM_RX_PKTDMA_CHANNELS_GEN1, | ||
79 | |||
80 | /** Number of PacketDMA Tx channels */ | ||
81 | NSS_NUM_TX_PKTDMA_CHANNELS_GEN1, | ||
82 | |||
83 | /** Number of Transmit Queues */ | ||
84 | NSS_NUM_TX_QUEUES_GEN1, | ||
85 | |||
86 | /** Transmit Queue base */ | ||
87 | QMSS_PASS_QUEUE_BASE, | ||
88 | |||
89 | /** Local Transmit Queue base (NSS Gen2 only) */ | ||
90 | NSS_LAYOUT_PARAM_NA, | ||
91 | |||
92 | /** Index to the PASS packet input queue */ | ||
93 | NSS_PA_QUEUE_INPUT_INDEX_GEN1, | ||
94 | |||
95 | /** Index to the PASS Mac queue for MAC/SRIO configuration packets */ | ||
96 | NSS_PA_QUEUE_MAC_INDEX_GEN1, | ||
97 | |||
98 | /** Index to the PASS IP queue for (outer) IP configuration packets */ | ||
99 | NSS_PA_QUEUE_OUTER_IP_INDEX_GEN1, | ||
100 | |||
101 | /** Index to the PASS Inner IP queue for inner IP configuration packets and | ||
102 | IPSEC Tunnel re-entry packets from SASS */ | ||
103 | NSS_PA_QUEUE_INNER_IP_INDEX_GEN1, | ||
104 | |||
105 | /** Index to the PASS LUT2 queue for LUT2 configuration packets and | ||
106 | IPSEC Transport mode re-entry packets from SASS */ | ||
107 | NSS_PA_QUEUE_LUT2_INDEX_GEN1, | ||
108 | |||
109 | /** Index to the PASS IPSEC queue for (outer) IP/IPSEC configuration packets */ | ||
110 | NSS_PA_QUEUE_IPSEC_INDEX_GEN1, | ||
111 | |||
112 | /** Index to the PASS IPSEC2 queue for inner IP/IPSEC configuration packets */ | ||
113 | NSS_PA_QUEUE_IPSEC2_INDEX_GEN1, | ||
114 | |||
115 | /** Index to the PASS Post-Classification queue for Post-Classification | ||
116 | related configuration packets */ | ||
117 | NSS_PA_QUEUE_POST_INDEX_GEN1, | ||
118 | |||
119 | /** Index to the PASS Tx command queue for Egress Packets */ | ||
120 | NSS_PA_QUEUE_TXCMD_INDEX_GEN1, | ||
121 | |||
122 | /** Index to the PASS (outer) IP firewall queue for (outer) IP firewall configuration | ||
123 | packets (NSS Gen2 only) */ | ||
124 | NSS_LAYOUT_PARAM_NA, | ||
125 | |||
126 | /** Index to the PASS Inner IP firewall queue for inner IP firewall configuration | ||
127 | packets (NSS Gen2 only)*/ | ||
128 | NSS_LAYOUT_PARAM_NA, | ||
129 | |||
130 | /** Index to the PASS Egress stage 0 queue (NSS Gen2 only)*/ | ||
131 | NSS_LAYOUT_PARAM_NA, | ||
132 | |||
133 | /** Index to the PASS Egress stage 1 queue (NSS Gen2 only)*/ | ||
134 | NSS_LAYOUT_PARAM_NA, | ||
135 | |||
136 | /** Index to the PASS Egress stage 2 queue (NSS Gen2 only)*/ | ||
137 | NSS_LAYOUT_PARAM_NA, | ||
138 | |||
139 | /** Index to the SASS input 1 queue for IPSEC and SRTP packets*/ | ||
140 | NSS_SA_QUEUE_SASS_INDEX_GEN1, | ||
141 | |||
142 | /** Index to the SASS input 2 queue for Air-Ciphering and data mode packets */ | ||
143 | NSS_SA_QUEUE_SASS2_INDEX_GEN1, | ||
144 | |||
145 | /** Index to the CPSW CPPI port transmit queue */ | ||
146 | NSS_CPSW_QUEUE_ETH_INDEX_GEN1, | ||
147 | |||
148 | /** Index to the CPSW CPPI port transmit queue of priority 0 packets */ | ||
149 | NSS_CPSW_QUEUE_ETH_PRI0_INDEX_GEN1, | ||
150 | |||
151 | /** Index to the CPSW CPPI port transmit queue of priority 1 packets */ | ||
152 | NSS_CPSW_QUEUE_ETH_PRI1_INDEX_GEN1, | ||
153 | |||
154 | /** Index to the CPSW CPPI port transmit queue of priority 2 packets */ | ||
155 | NSS_CPSW_QUEUE_ETH_PRI2_INDEX_GEN1, | ||
156 | |||
157 | /** Index to the CPSW CPPI port transmit queue of priority 3 packets */ | ||
158 | NSS_CPSW_QUEUE_ETH_PRI3_INDEX_GEN1, | ||
159 | |||
160 | /** Index to the CPSW CPPI port transmit queue of priority 4 packets */ | ||
161 | NSS_CPSW_QUEUE_ETH_PRI4_INDEX_GEN1, | ||
162 | |||
163 | /** Index to the CPSW CPPI port transmit queue of priority 5 packets */ | ||
164 | NSS_CPSW_QUEUE_ETH_PRI5_INDEX_GEN1, | ||
165 | |||
166 | /** Index to the CPSW CPPI port transmit queue of priority 6 packets */ | ||
167 | NSS_CPSW_QUEUE_ETH_PRI6_INDEX_GEN1, | ||
168 | |||
169 | /** Index to the CPSW CPPI port transmit queue of priority 7 packets */ | ||
170 | NSS_CPSW_QUEUE_ETH_PRI7_INDEX_GEN1, | ||
171 | |||
172 | /** Number of PASS PDSPs */ | ||
173 | NSS_PA_NUM_PDSPS_GEN1, | ||
174 | |||
175 | /** Number of SASS PDSPs */ | ||
176 | NSS_SA_NUM_PDSPS_GEN1, | ||
177 | |||
178 | /** PA PDSP images */ | ||
179 | { | ||
180 | /* LUT1_0: Classify1 image */ | ||
181 | c1_0, | ||
182 | |||
183 | /* LUT1_1: Classify1 image */ | ||
184 | c1_1, | ||
185 | |||
186 | /* LUT1_2: Classify1 image */ | ||
187 | c1_2, | ||
188 | |||
189 | /* Classify2 image */ | ||
190 | c2, | ||
191 | |||
192 | /* Post Processing: Modifier image */ | ||
193 | m, | ||
194 | |||
195 | /* Tx Commad Processing: Modifier image */ | ||
196 | m | ||
197 | }, | ||
198 | |||
199 | /** PA PDSP image sizes */ | ||
200 | { | ||
201 | /* LUT1_0: Classify1 image */ | ||
202 | sizeof(c1_0), | ||
203 | |||
204 | /* LUT1_1: Classify1 image */ | ||
205 | sizeof(c1_1), | ||
206 | |||
207 | /* LUT1_2: Classify1 image */ | ||
208 | sizeof(c1_2), | ||
209 | |||
210 | /* Classify2 image */ | ||
211 | sizeof(c2), | ||
212 | |||
213 | /* Post Processing: Modifier image */ | ||
214 | sizeof(m), | ||
215 | |||
216 | /* Tx Commad Processing: Modifier image */ | ||
217 | sizeof(m) | ||
218 | }, | ||
219 | |||
220 | /** SA PDSP images */ | ||
221 | { | ||
222 | /* Packet Header Processing 1 image */ | ||
223 | Sa_php1, | ||
224 | |||
225 | /* Packet Header Processing 2 image */ | ||
226 | Sa_php2 | ||
227 | }, | ||
228 | |||
229 | |||
230 | /** SA PDSP image sizes */ | ||
231 | { | ||
232 | /* Packet Header Processing 1 image */ | ||
233 | sizeof(Sa_php1), | ||
234 | |||
235 | /* Packet Header Processing 2 image */ | ||
236 | sizeof(Sa_php2) | ||
237 | } | ||
238 | |||
239 | } | ||
240 | }; | ||
241 | |||
242 | /** | ||
243 | @} | ||
244 | */ | ||
245 | |||