blob: d3ee879d1b70599a7db40df47e67c24cfe5d055b [file] [log] [blame]
Dixon Peterson0181d662013-01-07 19:27:35 -08001/* Copyright (c) 2008-2013, The Linux Foundation. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef DIAGCHAR_SHARED
14#define DIAGCHAR_SHARED
15
16#define MSG_MASKS_TYPE 1
17#define LOG_MASKS_TYPE 2
18#define EVENT_MASKS_TYPE 4
19#define PKT_TYPE 8
20#define DEINIT_TYPE 16
Shalabh Jain84e30342012-10-16 16:16:08 -070021#define USER_SPACE_DATA_TYPE 32
Shalabh Jain1c99e4c2012-03-26 18:47:59 -070022#define DCI_DATA_TYPE 64
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070023#define USB_MODE 1
24#define MEMORY_DEVICE_MODE 2
25#define NO_LOGGING_MODE 3
Shalabh Jain69890aa2011-10-10 12:59:16 -070026#define UART_MODE 4
Dixon Peterson625ee652012-06-21 22:03:49 -070027#define SOCKET_MODE 5
Shalabh Jain84e30342012-10-16 16:16:08 -070028#define CALLBACK_MODE 6
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070029/* different values that go in for diag_data_type */
30#define DATA_TYPE_EVENT 0
31#define DATA_TYPE_F3 1
32#define DATA_TYPE_LOG 2
33#define DATA_TYPE_RESPONSE 3
34
35/* Different IOCTL values */
36#define DIAG_IOCTL_COMMAND_REG 0
37#define DIAG_IOCTL_SWITCH_LOGGING 7
38#define DIAG_IOCTL_GET_DELAYED_RSP_ID 8
39#define DIAG_IOCTL_LSM_DEINIT 9
Shalabh Jain1c99e4c2012-03-26 18:47:59 -070040#define DIAG_IOCTL_DCI_INIT 20
41#define DIAG_IOCTL_DCI_DEINIT 21
42#define DIAG_IOCTL_DCI_SUPPORT 22
43#define DIAG_IOCTL_DCI_REG 23
Shalabh Jain16794902012-09-14 10:56:49 -070044#define DIAG_IOCTL_DCI_STREAM_INIT 24
Shalabh Jaina1c69a42012-10-23 12:51:30 -070045#define DIAG_IOCTL_DCI_HEALTH_STATS 25
Dixon Peterson70170f72012-11-05 20:25:11 -080046#define DIAG_IOCTL_REMOTE_DEV 32
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070047
Dixon Petersonb4618a42012-02-29 18:56:31 -080048/* PC Tools IDs */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070049#define APQ8060_TOOLS_ID 4062
50#define AO8960_TOOLS_ID 4064
Shalabh Jainfb8e3c12011-10-19 17:29:42 -070051#define APQ8064_TOOLS_ID 4072
Dixon Petersonb4618a42012-02-29 18:56:31 -080052#define MSM8625_TOOLS_ID 4075
Shalabh Jaina7557842012-02-01 20:25:03 +053053#define MSM8930_TOOLS_ID 4076
54#define MSM8630_TOOLS_ID 4077
55#define MSM8230_TOOLS_ID 4078
56#define APQ8030_TOOLS_ID 4079
57#define MSM8627_TOOLS_ID 4080
58#define MSM8227_TOOLS_ID 4081
Dixon Petersona2dd7352012-05-21 17:37:10 -070059#define MSM8974_TOOLS_ID 4083
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070060
61#define MSG_MASK_0 (0x00000001)
62#define MSG_MASK_1 (0x00000002)
63#define MSG_MASK_2 (0x00000004)
64#define MSG_MASK_3 (0x00000008)
65#define MSG_MASK_4 (0x00000010)
66#define MSG_MASK_5 (0x00000020)
67#define MSG_MASK_6 (0x00000040)
68#define MSG_MASK_7 (0x00000080)
69#define MSG_MASK_8 (0x00000100)
70#define MSG_MASK_9 (0x00000200)
71#define MSG_MASK_10 (0x00000400)
72#define MSG_MASK_11 (0x00000800)
73#define MSG_MASK_12 (0x00001000)
74#define MSG_MASK_13 (0x00002000)
75#define MSG_MASK_14 (0x00004000)
76#define MSG_MASK_15 (0x00008000)
77#define MSG_MASK_16 (0x00010000)
78#define MSG_MASK_17 (0x00020000)
79#define MSG_MASK_18 (0x00040000)
80#define MSG_MASK_19 (0x00080000)
81#define MSG_MASK_20 (0x00100000)
82#define MSG_MASK_21 (0x00200000)
83#define MSG_MASK_22 (0x00400000)
84#define MSG_MASK_23 (0x00800000)
85#define MSG_MASK_24 (0x01000000)
86#define MSG_MASK_25 (0x02000000)
87#define MSG_MASK_26 (0x04000000)
88#define MSG_MASK_27 (0x08000000)
89#define MSG_MASK_28 (0x10000000)
90#define MSG_MASK_29 (0x20000000)
91#define MSG_MASK_30 (0x40000000)
92#define MSG_MASK_31 (0x80000000)
93
94/* These masks are to be used for support of all legacy messages in the sw.
95The user does not need to remember the names as they will be embedded in
96the appropriate macros. */
97#define MSG_LEGACY_LOW MSG_MASK_0
98#define MSG_LEGACY_MED MSG_MASK_1
99#define MSG_LEGACY_HIGH MSG_MASK_2
100#define MSG_LEGACY_ERROR MSG_MASK_3
101#define MSG_LEGACY_FATAL MSG_MASK_4
102
103/* Legacy Message Priorities */
104#define MSG_LVL_FATAL (MSG_LEGACY_FATAL)
105#define MSG_LVL_ERROR (MSG_LEGACY_ERROR | MSG_LVL_FATAL)
106#define MSG_LVL_HIGH (MSG_LEGACY_HIGH | MSG_LVL_ERROR)
107#define MSG_LVL_MED (MSG_LEGACY_MED | MSG_LVL_HIGH)
108#define MSG_LVL_LOW (MSG_LEGACY_LOW | MSG_LVL_MED)
109
110#define MSG_LVL_NONE 0
111
112/* This needs to be modified manually now, when we add
113 a new RANGE of SSIDs to the msg_mask_tbl */
Shalabh Jain44b79b72012-06-15 13:39:27 -0700114#define MSG_MASK_TBL_CNT 24
Dixon Peterson0181d662013-01-07 19:27:35 -0800115#define EVENT_LAST_ID 0x099F
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700116
117#define MSG_SSID_0 0
Shalabh Jainb557a8c2012-08-13 17:07:36 -0700118#define MSG_SSID_0_LAST 93
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700119#define MSG_SSID_1 500
120#define MSG_SSID_1_LAST 506
121#define MSG_SSID_2 1000
122#define MSG_SSID_2_LAST 1007
123#define MSG_SSID_3 2000
124#define MSG_SSID_3_LAST 2008
125#define MSG_SSID_4 3000
Shalabh Jain321c8b52012-02-22 12:37:06 -0800126#define MSG_SSID_4_LAST 3014
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700127#define MSG_SSID_5 4000
128#define MSG_SSID_5_LAST 4010
129#define MSG_SSID_6 4500
130#define MSG_SSID_6_LAST 4526
131#define MSG_SSID_7 4600
Shalabh Jainc00dd9b2012-06-23 14:34:18 -0700132#define MSG_SSID_7_LAST 4613
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700133#define MSG_SSID_8 5000
Shalabh Jain321c8b52012-02-22 12:37:06 -0800134#define MSG_SSID_8_LAST 5029
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700135#define MSG_SSID_9 5500
Shalabh Jain321c8b52012-02-22 12:37:06 -0800136#define MSG_SSID_9_LAST 5516
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700137#define MSG_SSID_10 6000
Ravi Aravamudhanfebd62a2013-02-04 18:57:32 -0800138#define MSG_SSID_10_LAST 6080
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700139#define MSG_SSID_11 6500
140#define MSG_SSID_11_LAST 6521
141#define MSG_SSID_12 7000
142#define MSG_SSID_12_LAST 7003
143#define MSG_SSID_13 7100
144#define MSG_SSID_13_LAST 7111
145#define MSG_SSID_14 7200
146#define MSG_SSID_14_LAST 7201
147#define MSG_SSID_15 8000
148#define MSG_SSID_15_LAST 8000
149#define MSG_SSID_16 8500
150#define MSG_SSID_16_LAST 8523
151#define MSG_SSID_17 9000
152#define MSG_SSID_17_LAST 9008
153#define MSG_SSID_18 9500
154#define MSG_SSID_18_LAST 9509
Shalabh Jain321c8b52012-02-22 12:37:06 -0800155#define MSG_SSID_19 10200
156#define MSG_SSID_19_LAST 10210
157#define MSG_SSID_20 10251
158#define MSG_SSID_20_LAST 10255
159#define MSG_SSID_21 10300
160#define MSG_SSID_21_LAST 10300
161#define MSG_SSID_22 10350
Ravi Aravamudhanfebd62a2013-02-04 18:57:32 -0800162#define MSG_SSID_22_LAST 10374
Shalabh Jain44b79b72012-06-15 13:39:27 -0700163#define MSG_SSID_23 0xC000
164#define MSG_SSID_23_LAST 0xC063
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700165
166struct diagpkt_delay_params {
167 void *rsp_ptr;
168 int size;
169 int *num_bytes_ptr;
170};
171
172static const uint32_t msg_bld_masks_0[] = {
173 MSG_LVL_LOW,
174 MSG_LVL_MED,
175 MSG_LVL_MED,
176 MSG_LVL_ERROR,
177 MSG_LVL_LOW,
178 MSG_LVL_MED,
179 MSG_LVL_MED,
180 MSG_LVL_HIGH,
181 MSG_LVL_ERROR,
182 MSG_LVL_LOW,
183 MSG_LVL_ERROR,
184 MSG_LVL_ERROR,
185 MSG_LVL_MED,
186 MSG_LVL_MED,
187 MSG_LVL_MED,
188 MSG_LVL_HIGH,
189 MSG_LVL_HIGH,
190 MSG_LVL_HIGH,
191 MSG_LVL_LOW,
192 MSG_LVL_ERROR,
193 MSG_LVL_LOW,
194 MSG_LVL_MED,
195 MSG_LVL_MED,
196 MSG_LVL_MED,
197 MSG_LVL_MED,
198 MSG_LVL_LOW,
199 MSG_LVL_MED,
200 MSG_LVL_MED,
201 MSG_LVL_MED,
202 MSG_LVL_MED,
203 MSG_LVL_MED|MSG_MASK_7 | \
204 MSG_MASK_8|MSG_MASK_9|MSG_MASK_10|MSG_MASK_11|MSG_MASK_12 | \
205 MSG_MASK_13|MSG_MASK_14|MSG_MASK_15|MSG_MASK_16 | \
206 MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20|MSG_MASK_21,
207 MSG_LVL_MED|MSG_MASK_5 | \
208 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10| \
209 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14| \
210 MSG_MASK_15|MSG_MASK_16|MSG_MASK_17,
211 MSG_LVL_MED,
212 MSG_LVL_MED,
213 MSG_LVL_HIGH,
214 MSG_LVL_HIGH,
215 MSG_LVL_HIGH,
216 MSG_LVL_HIGH,
217 MSG_LVL_MED,
218 MSG_LVL_MED,
219 MSG_LVL_MED|MSG_MASK_5 | \
220 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8,
221 MSG_LVL_LOW,
222 MSG_LVL_LOW,
223 MSG_LVL_HIGH,
224 MSG_LVL_HIGH,
225 MSG_LVL_HIGH,
226 MSG_LVL_MED,
227 MSG_LVL_MED|MSG_MASK_5 | \
228 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10| \
229 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14|MSG_MASK_15| \
230 MSG_MASK_16|MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20| \
231 MSG_MASK_21|MSG_MASK_22|MSG_MASK_23|MSG_MASK_24|MSG_MASK_25,
232 MSG_LVL_MED|MSG_MASK_5 | \
233 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10,
234 MSG_LVL_MED,
235 MSG_LVL_MED,
236 MSG_LVL_LOW,
237 MSG_LVL_MED,
238 MSG_LVL_LOW,
239 MSG_LVL_LOW,
240 MSG_LVL_LOW,
241 MSG_LVL_HIGH,
242 MSG_LVL_LOW,
243 MSG_LVL_LOW,
244 MSG_LVL_LOW | MSG_MASK_5 | \
245 MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8,
246 MSG_LVL_LOW | MSG_MASK_5 | \
247 MSG_MASK_6,
248 MSG_LVL_MED,
249 MSG_LVL_MED,
250 MSG_LVL_LOW,
251 MSG_LVL_MED | MSG_MASK_5 | \
252 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10| \
253 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14|MSG_MASK_15 | \
254 MSG_MASK_16|MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20,
255 MSG_LVL_LOW,
256 MSG_LVL_MED,
257 MSG_LVL_LOW,
258 MSG_LVL_LOW,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800259 MSG_LVL_LOW,
260 MSG_LVL_HIGH,
261 MSG_LVL_HIGH,
262 MSG_LVL_LOW,
263 MSG_LVL_LOW,
264 MSG_LVL_LOW,
265 MSG_LVL_LOW,
266 MSG_LVL_LOW,
267 MSG_LVL_HIGH,
268 MSG_LVL_HIGH,
269 MSG_LVL_LOW,
270 MSG_LVL_LOW,
271 MSG_LVL_LOW,
272 MSG_LVL_LOW,
273 MSG_LVL_LOW,
274 MSG_LVL_LOW,
275 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
276 MSG_LVL_MED,
277 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
278 MSG_LVL_LOW,
279 MSG_LVL_MED,
Shalabh Jainc00dd9b2012-06-23 14:34:18 -0700280 MSG_LVL_LOW,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800281 MSG_LVL_LOW
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700282};
283
284static const uint32_t msg_bld_masks_1[] = {
285 MSG_LVL_MED,
286 MSG_LVL_HIGH,
287 MSG_LVL_HIGH,
288 MSG_LVL_LOW,
289 MSG_LVL_HIGH,
290 MSG_LVL_HIGH,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800291 MSG_LVL_HIGH
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700292};
293
294static const uint32_t msg_bld_masks_2[] = {
295 MSG_LVL_MED,
296 MSG_LVL_MED,
297 MSG_LVL_MED,
298 MSG_LVL_MED,
299 MSG_LVL_MED,
300 MSG_LVL_MED|MSG_MASK_5,
301 MSG_LVL_MED,
302 MSG_LVL_MED
303};
304
305static const uint32_t msg_bld_masks_3[] = {
306 MSG_LVL_MED,
307 MSG_LVL_MED,
308 MSG_LVL_MED,
309 MSG_LVL_MED,
310 MSG_LVL_MED,
311 MSG_LVL_MED,
312 MSG_LVL_MED,
313 MSG_LVL_MED,
314 MSG_LVL_MED
315};
316
317static const uint32_t msg_bld_masks_4[] = {
318 MSG_LVL_HIGH,
319 MSG_LVL_HIGH,
320 MSG_LVL_HIGH,
321 MSG_LVL_HIGH,
322 MSG_LVL_HIGH,
323 MSG_LVL_HIGH,
324 MSG_LVL_HIGH,
325 MSG_LVL_HIGH,
326 MSG_LVL_HIGH,
327 MSG_LVL_HIGH,
328 MSG_LVL_HIGH,
329 MSG_LVL_HIGH,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800330 MSG_LVL_HIGH,
331 MSG_LVL_LOW,
332 MSG_LVL_LOW
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700333};
334
335static const uint32_t msg_bld_masks_5[] = {
336 MSG_LVL_HIGH,
337 MSG_LVL_MED,
338 MSG_LVL_HIGH,
339 MSG_LVL_MED,
340 MSG_LVL_MED,
341 MSG_LVL_MED,
342 MSG_LVL_MED,
343 MSG_LVL_MED,
344 MSG_LVL_MED,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800345 MSG_LVL_MED|MSG_LVL_MED|MSG_MASK_5|MSG_MASK_6|MSG_MASK_7| \
346 MSG_MASK_8|MSG_MASK_9,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700347 MSG_LVL_MED
348};
349
350static const uint32_t msg_bld_masks_6[] = {
351 MSG_LVL_MED,
352 MSG_LVL_MED,
353 MSG_LVL_MED,
354 MSG_LVL_MED,
355 MSG_LVL_MED,
356 MSG_LVL_MED,
357 MSG_LVL_MED,
358 MSG_LVL_LOW,
359 MSG_LVL_LOW,
360 MSG_LVL_LOW,
361 MSG_LVL_LOW,
362 MSG_LVL_LOW,
363 MSG_LVL_LOW,
364 MSG_LVL_LOW,
365 MSG_LVL_LOW,
366 MSG_LVL_LOW,
367 MSG_LVL_LOW,
368 MSG_LVL_LOW,
369 MSG_LVL_LOW,
370 MSG_LVL_LOW,
371 MSG_LVL_LOW,
372 MSG_LVL_LOW,
373 MSG_LVL_LOW,
374 MSG_LVL_LOW,
375 MSG_LVL_LOW,
376 MSG_LVL_LOW,
377 MSG_LVL_LOW
378};
379
380static const uint32_t msg_bld_masks_7[] = {
381 MSG_LVL_MED,
382 MSG_LVL_MED,
383 MSG_LVL_MED,
384 MSG_LVL_MED,
385 MSG_LVL_MED,
386 MSG_LVL_MED,
387 MSG_LVL_MED,
388 MSG_LVL_MED,
389 MSG_LVL_MED,
390 MSG_LVL_MED,
391 MSG_LVL_MED,
392 MSG_LVL_MED,
Shalabh Jainc00dd9b2012-06-23 14:34:18 -0700393 MSG_LVL_LOW,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800394 MSG_LVL_LOW
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700395};
396
397static const uint32_t msg_bld_masks_8[] = {
398 MSG_LVL_MED,
399 MSG_LVL_MED,
400 MSG_LVL_MED,
401 MSG_LVL_MED,
402 MSG_LVL_MED,
403 MSG_LVL_MED,
404 MSG_LVL_MED,
405 MSG_LVL_MED,
406 MSG_LVL_MED,
407 MSG_LVL_MED,
408 MSG_LVL_MED,
409 MSG_LVL_MED,
410 MSG_LVL_MED,
411 MSG_LVL_MED,
412 MSG_LVL_MED,
413 MSG_LVL_MED,
414 MSG_LVL_LOW,
415 MSG_LVL_LOW,
416 MSG_LVL_LOW,
417 MSG_LVL_MED,
418 MSG_LVL_MED,
419 MSG_LVL_MED,
420 MSG_LVL_MED,
421 MSG_LVL_MED,
422 MSG_LVL_MED,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800423 MSG_LVL_MED,
424 MSG_LVL_MED,
425 MSG_LVL_MED,
426 MSG_LVL_MED,
427 MSG_LVL_MED
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700428};
429
430static const uint32_t msg_bld_masks_9[] = {
431 MSG_LVL_MED|MSG_MASK_5,
432 MSG_LVL_MED|MSG_MASK_5,
433 MSG_LVL_MED|MSG_MASK_5,
434 MSG_LVL_MED|MSG_MASK_5,
435 MSG_LVL_MED|MSG_MASK_5,
436 MSG_LVL_MED|MSG_MASK_5,
437 MSG_LVL_MED|MSG_MASK_5,
438 MSG_LVL_MED|MSG_MASK_5,
439 MSG_LVL_MED|MSG_MASK_5,
440 MSG_LVL_MED|MSG_MASK_5,
441 MSG_LVL_MED|MSG_MASK_5,
442 MSG_LVL_MED|MSG_MASK_5,
443 MSG_LVL_MED|MSG_MASK_5,
444 MSG_LVL_MED|MSG_MASK_5,
445 MSG_LVL_MED|MSG_MASK_5,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800446 MSG_LVL_MED|MSG_MASK_5,
447 MSG_LVL_MED|MSG_MASK_5
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700448};
449
450static const uint32_t msg_bld_masks_10[] = {
451 MSG_LVL_MED,
452 MSG_LVL_ERROR,
453 MSG_LVL_LOW,
454 MSG_LVL_LOW|MSG_MASK_5 | \
455 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10| \
456 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14|MSG_MASK_15| \
457 MSG_MASK_16|MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20| \
458 MSG_MASK_21|MSG_MASK_22,
459 MSG_LVL_LOW|MSG_MASK_5,
460 MSG_LVL_LOW,
461 MSG_LVL_LOW,
462 MSG_LVL_LOW,
463 MSG_LVL_LOW,
464 MSG_LVL_LOW,
465 MSG_LVL_LOW,
466 MSG_LVL_LOW,
467 MSG_LVL_LOW,
468 MSG_LVL_LOW|MSG_MASK_5,
469 MSG_LVL_LOW|MSG_MASK_5,
470 MSG_LVL_LOW|MSG_MASK_5,
471 MSG_LVL_LOW|MSG_MASK_5,
472 MSG_LVL_LOW|MSG_MASK_5,
473 MSG_LVL_LOW|MSG_MASK_5,
474 MSG_LVL_LOW|MSG_MASK_5,
475 MSG_LVL_LOW|MSG_MASK_5,
476 MSG_LVL_LOW|MSG_MASK_5,
477 MSG_LVL_LOW|MSG_MASK_5,
478 MSG_LVL_LOW|MSG_MASK_5,
479 MSG_LVL_LOW|MSG_MASK_5,
480 MSG_LVL_LOW|MSG_MASK_5,
481 MSG_LVL_LOW|MSG_MASK_5,
482 MSG_LVL_LOW|MSG_MASK_5,
483 MSG_LVL_LOW|MSG_MASK_5,
484 MSG_LVL_LOW|MSG_MASK_5,
485 MSG_LVL_LOW|MSG_MASK_5,
486 MSG_LVL_LOW|MSG_MASK_5,
487 MSG_LVL_LOW,
488 MSG_LVL_MED,
489 MSG_LVL_HIGH,
490 MSG_LVL_LOW,
491 MSG_LVL_LOW,
492 MSG_LVL_LOW|MSG_MASK_5,
493 MSG_LVL_LOW|MSG_MASK_0 | MSG_MASK_1 | MSG_MASK_2 | \
494 MSG_MASK_3 | MSG_MASK_4 | MSG_MASK_5 | MSG_MASK_6,
495 MSG_LVL_HIGH,
496 MSG_LVL_LOW,
497 MSG_LVL_LOW,
498 MSG_LVL_LOW,
499 MSG_LVL_LOW,
500 MSG_LVL_LOW,
501 MSG_LVL_LOW,
502 MSG_LVL_LOW,
503 MSG_LVL_LOW,
504 MSG_LVL_LOW,
505 MSG_LVL_LOW,
506 MSG_LVL_LOW,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800507 MSG_LVL_LOW,
508 MSG_LVL_MED,
509 MSG_LVL_MED,
510 MSG_LVL_MED,
511 MSG_LVL_MED,
512 MSG_LVL_MED,
513 MSG_LVL_MED,
514 MSG_LVL_MED,
515 MSG_LVL_MED,
516 MSG_LVL_MED,
517 MSG_LVL_MED,
518 MSG_LVL_MED,
519 MSG_LVL_MED,
520 MSG_LVL_MED,
521 MSG_LVL_MED,
522 MSG_LVL_MED,
523 MSG_LVL_MED,
524 MSG_LVL_MED,
525 MSG_LVL_MED,
526 MSG_LVL_MED,
527 MSG_LVL_MED,
Ravi Aravamudhanfebd62a2013-02-04 18:57:32 -0800528 MSG_LVL_LOW,
529 MSG_LVL_LOW,
530 MSG_LVL_LOW,
531 MSG_LVL_LOW,
532 MSG_LVL_LOW,
533 MSG_LVL_LOW,
534 MSG_LVL_LOW,
535 MSG_LVL_LOW,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800536 MSG_LVL_LOW
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700537};
538
539static const uint32_t msg_bld_masks_11[] = {
540 MSG_LVL_LOW,
541 MSG_LVL_LOW,
542 MSG_LVL_LOW,
543 MSG_LVL_LOW,
544 MSG_LVL_LOW,
545 MSG_LVL_LOW,
546 MSG_LVL_LOW,
547 MSG_LVL_LOW,
548 MSG_LVL_LOW,
549 MSG_LVL_LOW,
550 MSG_LVL_LOW,
551 MSG_LVL_LOW,
552 MSG_LVL_LOW,
553 MSG_LVL_LOW,
554 MSG_LVL_LOW,
555 MSG_LVL_LOW,
556 MSG_LVL_LOW,
557 MSG_LVL_LOW,
558 MSG_LVL_LOW,
559 MSG_LVL_LOW,
560 MSG_LVL_LOW,
561 MSG_LVL_LOW,
562};
563
564static const uint32_t msg_bld_masks_12[] = {
565 MSG_LVL_MED,
566 MSG_LVL_MED,
567 MSG_LVL_MED,
568 MSG_LVL_MED,
569};
570
571static const uint32_t msg_bld_masks_13[] = {
572 MSG_LVL_MED,
573 MSG_LVL_MED,
574 MSG_LVL_MED,
575 MSG_LVL_MED,
576 MSG_LVL_MED,
577 MSG_LVL_MED,
578 MSG_LVL_MED,
579 MSG_LVL_MED,
580 MSG_LVL_MED,
581 MSG_LVL_MED,
582 MSG_LVL_MED,
583 MSG_LVL_MED,
584};
585
586static const uint32_t msg_bld_masks_14[] = {
587 MSG_LVL_MED,
588 MSG_LVL_MED,
589};
590
591static const uint32_t msg_bld_masks_15[] = {
592 MSG_LVL_MED
593};
594
595static const uint32_t msg_bld_masks_16[] = {
596 MSG_LVL_LOW,
597 MSG_LVL_LOW,
598 MSG_LVL_LOW,
599 MSG_LVL_LOW,
600 MSG_LVL_LOW,
601 MSG_LVL_LOW,
602 MSG_LVL_LOW,
603 MSG_LVL_LOW,
604 MSG_LVL_LOW,
605 MSG_LVL_LOW,
606 MSG_LVL_LOW,
607 MSG_LVL_LOW,
608 MSG_LVL_LOW,
609 MSG_LVL_LOW,
610 MSG_LVL_LOW,
611 MSG_LVL_LOW,
612 MSG_LVL_LOW,
613 MSG_LVL_LOW,
614 MSG_LVL_LOW,
615 MSG_LVL_LOW,
616 MSG_LVL_LOW,
617 MSG_LVL_LOW,
618 MSG_LVL_LOW,
619 MSG_LVL_LOW,
620};
621
622static const uint32_t msg_bld_masks_17[] = {
623 MSG_LVL_MED,
624 MSG_LVL_MED,
625 MSG_LVL_MED,
626 MSG_LVL_MED | MSG_MASK_6 | \
627 MSG_MASK_7 | MSG_MASK_8 | MSG_MASK_9,
628 MSG_LVL_MED | MSG_MASK_5 | \
629 MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 | MSG_MASK_9 | \
630 MSG_MASK_10 | MSG_MASK_11 | MSG_MASK_12 | MSG_MASK_13 | \
631 MSG_MASK_14 | MSG_MASK_15 | MSG_MASK_16 | MSG_MASK_17,
632 MSG_LVL_MED,
633 MSG_LVL_MED | MSG_MASK_5 | \
634 MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 | MSG_MASK_9 | \
635 MSG_MASK_10 | MSG_MASK_11 | MSG_MASK_12 | MSG_MASK_13 | \
636 MSG_MASK_14 | MSG_MASK_15 | MSG_MASK_16 | MSG_MASK_17 | \
637 MSG_MASK_18 | MSG_MASK_19 | MSG_MASK_20 | MSG_MASK_21 | \
638 MSG_MASK_22,
639 MSG_LVL_MED,
640 MSG_LVL_MED,
641};
642
643static const uint32_t msg_bld_masks_18[] = {
644 MSG_LVL_LOW,
645 MSG_LVL_LOW | MSG_MASK_8 | MSG_MASK_9 | MSG_MASK_10 | \
646 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14|MSG_MASK_15 | \
647 MSG_MASK_16|MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20,
648 MSG_LVL_LOW | MSG_MASK_5 | MSG_MASK_6,
649 MSG_LVL_LOW | MSG_MASK_5,
650 MSG_LVL_LOW | MSG_MASK_5 | MSG_MASK_6,
651 MSG_LVL_LOW,
652 MSG_LVL_LOW | MSG_MASK_5 | \
653 MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 | MSG_MASK_9,
654 MSG_LVL_LOW,
655 MSG_LVL_LOW,
656 MSG_LVL_LOW
657};
658
Shalabh Jain321c8b52012-02-22 12:37:06 -0800659static const uint32_t msg_bld_masks_19[] = {
660 MSG_LVL_LOW,
661 MSG_LVL_LOW,
662 MSG_LVL_LOW,
663 MSG_LVL_LOW,
664 MSG_LVL_LOW,
665 MSG_LVL_LOW,
666 MSG_LVL_LOW,
667 MSG_LVL_LOW,
668 MSG_LVL_LOW,
669 MSG_LVL_LOW,
670 MSG_LVL_LOW
671};
672
673static const uint32_t msg_bld_masks_20[] = {
674 MSG_LVL_LOW,
675 MSG_LVL_LOW,
676 MSG_LVL_LOW,
677 MSG_LVL_LOW,
678 MSG_LVL_LOW
679};
680
681static const uint32_t msg_bld_masks_21[] = {
682 MSG_LVL_HIGH
683};
684
685static const uint32_t msg_bld_masks_22[] = {
Dixon Peterson826d7792012-11-11 21:06:04 -0800686 MSG_LVL_LOW,
687 MSG_LVL_LOW,
688 MSG_LVL_LOW,
689 MSG_LVL_LOW,
690 MSG_LVL_LOW,
691 MSG_LVL_LOW,
692 MSG_LVL_LOW,
693 MSG_LVL_LOW,
694 MSG_LVL_LOW,
695 MSG_LVL_LOW,
696 MSG_LVL_LOW,
Ravi Aravamudhanfebd62a2013-02-04 18:57:32 -0800697 MSG_LVL_LOW,
698 MSG_LVL_LOW,
699 MSG_LVL_LOW,
700 MSG_LVL_LOW,
701 MSG_LVL_LOW,
702 MSG_LVL_LOW,
703 MSG_LVL_LOW,
704 MSG_LVL_LOW,
705 MSG_LVL_LOW,
706 MSG_LVL_LOW,
707 MSG_LVL_LOW,
708 MSG_LVL_LOW,
709 MSG_LVL_LOW,
Dixon Peterson826d7792012-11-11 21:06:04 -0800710 MSG_LVL_LOW
Shalabh Jain321c8b52012-02-22 12:37:06 -0800711};
712
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700713/* LOG CODES */
714
715#define LOG_0 0x0
Dixon Peterson0181d662013-01-07 19:27:35 -0800716#define LOG_1 0x1750
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700717#define LOG_2 0x0
718#define LOG_3 0x0
719#define LOG_4 0x4910
720#define LOG_5 0x5420
721#define LOG_6 0x0
722#define LOG_7 0x74FF
723#define LOG_8 0x0
724#define LOG_9 0x0
725#define LOG_10 0xA38A
726#define LOG_11 0xB201
727#define LOG_12 0x0
728#define LOG_13 0x0
729#define LOG_14 0x0
730#define LOG_15 0x0
731
732#define LOG_GET_ITEM_NUM(xx_code) (xx_code & 0x0FFF)
Shalabh Jain16794902012-09-14 10:56:49 -0700733#define LOG_GET_EQUIP_ID(xx_code) ((xx_code & 0xF000) >> 12)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700734
735#endif