blob: 537960b8373fe3486e2ece0aa371b50b1a184693 [file] [log] [blame]
Shalabh Jain10f5f432012-01-11 11:45:44 +05301/* Copyright (c) 2008-2012, Code Aurora Forum. 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 Jain69890aa2011-10-10 12:59:16 -070021#define USER_SPACE_LOG_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
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070027
28/* different values that go in for diag_data_type */
29#define DATA_TYPE_EVENT 0
30#define DATA_TYPE_F3 1
31#define DATA_TYPE_LOG 2
32#define DATA_TYPE_RESPONSE 3
33
34/* Different IOCTL values */
35#define DIAG_IOCTL_COMMAND_REG 0
36#define DIAG_IOCTL_SWITCH_LOGGING 7
37#define DIAG_IOCTL_GET_DELAYED_RSP_ID 8
38#define DIAG_IOCTL_LSM_DEINIT 9
Shalabh Jain1c99e4c2012-03-26 18:47:59 -070039#define DIAG_IOCTL_DCI_INIT 20
40#define DIAG_IOCTL_DCI_DEINIT 21
41#define DIAG_IOCTL_DCI_SUPPORT 22
42#define DIAG_IOCTL_DCI_REG 23
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070043
Dixon Petersonb4618a42012-02-29 18:56:31 -080044/* PC Tools IDs */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070045#define APQ8060_TOOLS_ID 4062
46#define AO8960_TOOLS_ID 4064
Shalabh Jainfb8e3c12011-10-19 17:29:42 -070047#define APQ8064_TOOLS_ID 4072
Dixon Petersonb4618a42012-02-29 18:56:31 -080048#define MSM8625_TOOLS_ID 4075
Shalabh Jaina7557842012-02-01 20:25:03 +053049#define MSM8930_TOOLS_ID 4076
50#define MSM8630_TOOLS_ID 4077
51#define MSM8230_TOOLS_ID 4078
52#define APQ8030_TOOLS_ID 4079
53#define MSM8627_TOOLS_ID 4080
54#define MSM8227_TOOLS_ID 4081
Dixon Petersona2dd7352012-05-21 17:37:10 -070055#define MSM8974_TOOLS_ID 4083
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070056
57#define MSG_MASK_0 (0x00000001)
58#define MSG_MASK_1 (0x00000002)
59#define MSG_MASK_2 (0x00000004)
60#define MSG_MASK_3 (0x00000008)
61#define MSG_MASK_4 (0x00000010)
62#define MSG_MASK_5 (0x00000020)
63#define MSG_MASK_6 (0x00000040)
64#define MSG_MASK_7 (0x00000080)
65#define MSG_MASK_8 (0x00000100)
66#define MSG_MASK_9 (0x00000200)
67#define MSG_MASK_10 (0x00000400)
68#define MSG_MASK_11 (0x00000800)
69#define MSG_MASK_12 (0x00001000)
70#define MSG_MASK_13 (0x00002000)
71#define MSG_MASK_14 (0x00004000)
72#define MSG_MASK_15 (0x00008000)
73#define MSG_MASK_16 (0x00010000)
74#define MSG_MASK_17 (0x00020000)
75#define MSG_MASK_18 (0x00040000)
76#define MSG_MASK_19 (0x00080000)
77#define MSG_MASK_20 (0x00100000)
78#define MSG_MASK_21 (0x00200000)
79#define MSG_MASK_22 (0x00400000)
80#define MSG_MASK_23 (0x00800000)
81#define MSG_MASK_24 (0x01000000)
82#define MSG_MASK_25 (0x02000000)
83#define MSG_MASK_26 (0x04000000)
84#define MSG_MASK_27 (0x08000000)
85#define MSG_MASK_28 (0x10000000)
86#define MSG_MASK_29 (0x20000000)
87#define MSG_MASK_30 (0x40000000)
88#define MSG_MASK_31 (0x80000000)
89
90/* These masks are to be used for support of all legacy messages in the sw.
91The user does not need to remember the names as they will be embedded in
92the appropriate macros. */
93#define MSG_LEGACY_LOW MSG_MASK_0
94#define MSG_LEGACY_MED MSG_MASK_1
95#define MSG_LEGACY_HIGH MSG_MASK_2
96#define MSG_LEGACY_ERROR MSG_MASK_3
97#define MSG_LEGACY_FATAL MSG_MASK_4
98
99/* Legacy Message Priorities */
100#define MSG_LVL_FATAL (MSG_LEGACY_FATAL)
101#define MSG_LVL_ERROR (MSG_LEGACY_ERROR | MSG_LVL_FATAL)
102#define MSG_LVL_HIGH (MSG_LEGACY_HIGH | MSG_LVL_ERROR)
103#define MSG_LVL_MED (MSG_LEGACY_MED | MSG_LVL_HIGH)
104#define MSG_LVL_LOW (MSG_LEGACY_LOW | MSG_LVL_MED)
105
106#define MSG_LVL_NONE 0
107
108/* This needs to be modified manually now, when we add
109 a new RANGE of SSIDs to the msg_mask_tbl */
Shalabh Jain321c8b52012-02-22 12:37:06 -0800110#define MSG_MASK_TBL_CNT 23
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700111#define EVENT_LAST_ID 0x083F
112
113#define MSG_SSID_0 0
Shalabh Jain321c8b52012-02-22 12:37:06 -0800114#define MSG_SSID_0_LAST 90
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700115#define MSG_SSID_1 500
116#define MSG_SSID_1_LAST 506
117#define MSG_SSID_2 1000
118#define MSG_SSID_2_LAST 1007
119#define MSG_SSID_3 2000
120#define MSG_SSID_3_LAST 2008
121#define MSG_SSID_4 3000
Shalabh Jain321c8b52012-02-22 12:37:06 -0800122#define MSG_SSID_4_LAST 3014
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700123#define MSG_SSID_5 4000
124#define MSG_SSID_5_LAST 4010
125#define MSG_SSID_6 4500
126#define MSG_SSID_6_LAST 4526
127#define MSG_SSID_7 4600
Shalabh Jain321c8b52012-02-22 12:37:06 -0800128#define MSG_SSID_7_LAST 4612
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700129#define MSG_SSID_8 5000
Shalabh Jain321c8b52012-02-22 12:37:06 -0800130#define MSG_SSID_8_LAST 5029
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700131#define MSG_SSID_9 5500
Shalabh Jain321c8b52012-02-22 12:37:06 -0800132#define MSG_SSID_9_LAST 5516
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700133#define MSG_SSID_10 6000
Shalabh Jain321c8b52012-02-22 12:37:06 -0800134#define MSG_SSID_10_LAST 6072
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700135#define MSG_SSID_11 6500
136#define MSG_SSID_11_LAST 6521
137#define MSG_SSID_12 7000
138#define MSG_SSID_12_LAST 7003
139#define MSG_SSID_13 7100
140#define MSG_SSID_13_LAST 7111
141#define MSG_SSID_14 7200
142#define MSG_SSID_14_LAST 7201
143#define MSG_SSID_15 8000
144#define MSG_SSID_15_LAST 8000
145#define MSG_SSID_16 8500
146#define MSG_SSID_16_LAST 8523
147#define MSG_SSID_17 9000
148#define MSG_SSID_17_LAST 9008
149#define MSG_SSID_18 9500
150#define MSG_SSID_18_LAST 9509
Shalabh Jain321c8b52012-02-22 12:37:06 -0800151#define MSG_SSID_19 10200
152#define MSG_SSID_19_LAST 10210
153#define MSG_SSID_20 10251
154#define MSG_SSID_20_LAST 10255
155#define MSG_SSID_21 10300
156#define MSG_SSID_21_LAST 10300
157#define MSG_SSID_22 10350
158#define MSG_SSID_22_LAST 10361
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700159
160struct diagpkt_delay_params {
161 void *rsp_ptr;
162 int size;
163 int *num_bytes_ptr;
164};
165
166static const uint32_t msg_bld_masks_0[] = {
167 MSG_LVL_LOW,
168 MSG_LVL_MED,
169 MSG_LVL_MED,
170 MSG_LVL_ERROR,
171 MSG_LVL_LOW,
172 MSG_LVL_MED,
173 MSG_LVL_MED,
174 MSG_LVL_HIGH,
175 MSG_LVL_ERROR,
176 MSG_LVL_LOW,
177 MSG_LVL_ERROR,
178 MSG_LVL_ERROR,
179 MSG_LVL_MED,
180 MSG_LVL_MED,
181 MSG_LVL_MED,
182 MSG_LVL_HIGH,
183 MSG_LVL_HIGH,
184 MSG_LVL_HIGH,
185 MSG_LVL_LOW,
186 MSG_LVL_ERROR,
187 MSG_LVL_LOW,
188 MSG_LVL_MED,
189 MSG_LVL_MED,
190 MSG_LVL_MED,
191 MSG_LVL_MED,
192 MSG_LVL_LOW,
193 MSG_LVL_MED,
194 MSG_LVL_MED,
195 MSG_LVL_MED,
196 MSG_LVL_MED,
197 MSG_LVL_MED|MSG_MASK_7 | \
198 MSG_MASK_8|MSG_MASK_9|MSG_MASK_10|MSG_MASK_11|MSG_MASK_12 | \
199 MSG_MASK_13|MSG_MASK_14|MSG_MASK_15|MSG_MASK_16 | \
200 MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20|MSG_MASK_21,
201 MSG_LVL_MED|MSG_MASK_5 | \
202 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10| \
203 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14| \
204 MSG_MASK_15|MSG_MASK_16|MSG_MASK_17,
205 MSG_LVL_MED,
206 MSG_LVL_MED,
207 MSG_LVL_HIGH,
208 MSG_LVL_HIGH,
209 MSG_LVL_HIGH,
210 MSG_LVL_HIGH,
211 MSG_LVL_MED,
212 MSG_LVL_MED,
213 MSG_LVL_MED|MSG_MASK_5 | \
214 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8,
215 MSG_LVL_LOW,
216 MSG_LVL_LOW,
217 MSG_LVL_HIGH,
218 MSG_LVL_HIGH,
219 MSG_LVL_HIGH,
220 MSG_LVL_MED,
221 MSG_LVL_MED|MSG_MASK_5 | \
222 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10| \
223 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14|MSG_MASK_15| \
224 MSG_MASK_16|MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20| \
225 MSG_MASK_21|MSG_MASK_22|MSG_MASK_23|MSG_MASK_24|MSG_MASK_25,
226 MSG_LVL_MED|MSG_MASK_5 | \
227 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10,
228 MSG_LVL_MED,
229 MSG_LVL_MED,
230 MSG_LVL_LOW,
231 MSG_LVL_MED,
232 MSG_LVL_LOW,
233 MSG_LVL_LOW,
234 MSG_LVL_LOW,
235 MSG_LVL_HIGH,
236 MSG_LVL_LOW,
237 MSG_LVL_LOW,
238 MSG_LVL_LOW | MSG_MASK_5 | \
239 MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8,
240 MSG_LVL_LOW | MSG_MASK_5 | \
241 MSG_MASK_6,
242 MSG_LVL_MED,
243 MSG_LVL_MED,
244 MSG_LVL_LOW,
245 MSG_LVL_MED | MSG_MASK_5 | \
246 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10| \
247 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14|MSG_MASK_15 | \
248 MSG_MASK_16|MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20,
249 MSG_LVL_LOW,
250 MSG_LVL_MED,
251 MSG_LVL_LOW,
252 MSG_LVL_LOW,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800253 MSG_LVL_LOW,
254 MSG_LVL_HIGH,
255 MSG_LVL_HIGH,
256 MSG_LVL_LOW,
257 MSG_LVL_LOW,
258 MSG_LVL_LOW,
259 MSG_LVL_LOW,
260 MSG_LVL_LOW,
261 MSG_LVL_HIGH,
262 MSG_LVL_HIGH,
263 MSG_LVL_LOW,
264 MSG_LVL_LOW,
265 MSG_LVL_LOW,
266 MSG_LVL_LOW,
267 MSG_LVL_LOW,
268 MSG_LVL_LOW,
269 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
270 MSG_LVL_MED,
271 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
272 MSG_LVL_LOW,
273 MSG_LVL_MED,
274 MSG_LVL_LOW
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700275};
276
277static const uint32_t msg_bld_masks_1[] = {
278 MSG_LVL_MED,
279 MSG_LVL_HIGH,
280 MSG_LVL_HIGH,
281 MSG_LVL_LOW,
282 MSG_LVL_HIGH,
283 MSG_LVL_HIGH,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800284 MSG_LVL_HIGH
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700285};
286
287static const uint32_t msg_bld_masks_2[] = {
288 MSG_LVL_MED,
289 MSG_LVL_MED,
290 MSG_LVL_MED,
291 MSG_LVL_MED,
292 MSG_LVL_MED,
293 MSG_LVL_MED|MSG_MASK_5,
294 MSG_LVL_MED,
295 MSG_LVL_MED
296};
297
298static const uint32_t msg_bld_masks_3[] = {
299 MSG_LVL_MED,
300 MSG_LVL_MED,
301 MSG_LVL_MED,
302 MSG_LVL_MED,
303 MSG_LVL_MED,
304 MSG_LVL_MED,
305 MSG_LVL_MED,
306 MSG_LVL_MED,
307 MSG_LVL_MED
308};
309
310static const uint32_t msg_bld_masks_4[] = {
311 MSG_LVL_HIGH,
312 MSG_LVL_HIGH,
313 MSG_LVL_HIGH,
314 MSG_LVL_HIGH,
315 MSG_LVL_HIGH,
316 MSG_LVL_HIGH,
317 MSG_LVL_HIGH,
318 MSG_LVL_HIGH,
319 MSG_LVL_HIGH,
320 MSG_LVL_HIGH,
321 MSG_LVL_HIGH,
322 MSG_LVL_HIGH,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800323 MSG_LVL_HIGH,
324 MSG_LVL_LOW,
325 MSG_LVL_LOW
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700326};
327
328static const uint32_t msg_bld_masks_5[] = {
329 MSG_LVL_HIGH,
330 MSG_LVL_MED,
331 MSG_LVL_HIGH,
332 MSG_LVL_MED,
333 MSG_LVL_MED,
334 MSG_LVL_MED,
335 MSG_LVL_MED,
336 MSG_LVL_MED,
337 MSG_LVL_MED,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800338 MSG_LVL_MED|MSG_LVL_MED|MSG_MASK_5|MSG_MASK_6|MSG_MASK_7| \
339 MSG_MASK_8|MSG_MASK_9,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700340 MSG_LVL_MED
341};
342
343static const uint32_t msg_bld_masks_6[] = {
344 MSG_LVL_MED,
345 MSG_LVL_MED,
346 MSG_LVL_MED,
347 MSG_LVL_MED,
348 MSG_LVL_MED,
349 MSG_LVL_MED,
350 MSG_LVL_MED,
351 MSG_LVL_LOW,
352 MSG_LVL_LOW,
353 MSG_LVL_LOW,
354 MSG_LVL_LOW,
355 MSG_LVL_LOW,
356 MSG_LVL_LOW,
357 MSG_LVL_LOW,
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};
372
373static const uint32_t msg_bld_masks_7[] = {
374 MSG_LVL_MED,
375 MSG_LVL_MED,
376 MSG_LVL_MED,
377 MSG_LVL_MED,
378 MSG_LVL_MED,
379 MSG_LVL_MED,
380 MSG_LVL_MED,
381 MSG_LVL_MED,
382 MSG_LVL_MED,
383 MSG_LVL_MED,
384 MSG_LVL_MED,
385 MSG_LVL_MED,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800386 MSG_LVL_LOW
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700387};
388
389static const uint32_t msg_bld_masks_8[] = {
390 MSG_LVL_MED,
391 MSG_LVL_MED,
392 MSG_LVL_MED,
393 MSG_LVL_MED,
394 MSG_LVL_MED,
395 MSG_LVL_MED,
396 MSG_LVL_MED,
397 MSG_LVL_MED,
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_LOW,
407 MSG_LVL_LOW,
408 MSG_LVL_LOW,
409 MSG_LVL_MED,
410 MSG_LVL_MED,
411 MSG_LVL_MED,
412 MSG_LVL_MED,
413 MSG_LVL_MED,
414 MSG_LVL_MED,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800415 MSG_LVL_MED,
416 MSG_LVL_MED,
417 MSG_LVL_MED,
418 MSG_LVL_MED,
419 MSG_LVL_MED
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700420};
421
422static const uint32_t msg_bld_masks_9[] = {
423 MSG_LVL_MED|MSG_MASK_5,
424 MSG_LVL_MED|MSG_MASK_5,
425 MSG_LVL_MED|MSG_MASK_5,
426 MSG_LVL_MED|MSG_MASK_5,
427 MSG_LVL_MED|MSG_MASK_5,
428 MSG_LVL_MED|MSG_MASK_5,
429 MSG_LVL_MED|MSG_MASK_5,
430 MSG_LVL_MED|MSG_MASK_5,
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,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800438 MSG_LVL_MED|MSG_MASK_5,
439 MSG_LVL_MED|MSG_MASK_5
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700440};
441
442static const uint32_t msg_bld_masks_10[] = {
443 MSG_LVL_MED,
444 MSG_LVL_ERROR,
445 MSG_LVL_LOW,
446 MSG_LVL_LOW|MSG_MASK_5 | \
447 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10| \
448 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14|MSG_MASK_15| \
449 MSG_MASK_16|MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20| \
450 MSG_MASK_21|MSG_MASK_22,
451 MSG_LVL_LOW|MSG_MASK_5,
452 MSG_LVL_LOW,
453 MSG_LVL_LOW,
454 MSG_LVL_LOW,
455 MSG_LVL_LOW,
456 MSG_LVL_LOW,
457 MSG_LVL_LOW,
458 MSG_LVL_LOW,
459 MSG_LVL_LOW,
460 MSG_LVL_LOW|MSG_MASK_5,
461 MSG_LVL_LOW|MSG_MASK_5,
462 MSG_LVL_LOW|MSG_MASK_5,
463 MSG_LVL_LOW|MSG_MASK_5,
464 MSG_LVL_LOW|MSG_MASK_5,
465 MSG_LVL_LOW|MSG_MASK_5,
466 MSG_LVL_LOW|MSG_MASK_5,
467 MSG_LVL_LOW|MSG_MASK_5,
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,
480 MSG_LVL_MED,
481 MSG_LVL_HIGH,
482 MSG_LVL_LOW,
483 MSG_LVL_LOW,
484 MSG_LVL_LOW|MSG_MASK_5,
485 MSG_LVL_LOW|MSG_MASK_0 | MSG_MASK_1 | MSG_MASK_2 | \
486 MSG_MASK_3 | MSG_MASK_4 | MSG_MASK_5 | MSG_MASK_6,
487 MSG_LVL_HIGH,
488 MSG_LVL_LOW,
489 MSG_LVL_LOW,
490 MSG_LVL_LOW,
491 MSG_LVL_LOW,
492 MSG_LVL_LOW,
493 MSG_LVL_LOW,
494 MSG_LVL_LOW,
495 MSG_LVL_LOW,
496 MSG_LVL_LOW,
497 MSG_LVL_LOW,
498 MSG_LVL_LOW,
Shalabh Jain321c8b52012-02-22 12:37:06 -0800499 MSG_LVL_LOW,
500 MSG_LVL_MED,
501 MSG_LVL_MED,
502 MSG_LVL_MED,
503 MSG_LVL_MED,
504 MSG_LVL_MED,
505 MSG_LVL_MED,
506 MSG_LVL_MED,
507 MSG_LVL_MED,
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_LOW
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700521};
522
523static const uint32_t msg_bld_masks_11[] = {
524 MSG_LVL_LOW,
525 MSG_LVL_LOW,
526 MSG_LVL_LOW,
527 MSG_LVL_LOW,
528 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,
536 MSG_LVL_LOW,
537 MSG_LVL_LOW,
538 MSG_LVL_LOW,
539 MSG_LVL_LOW,
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};
547
548static const uint32_t msg_bld_masks_12[] = {
549 MSG_LVL_MED,
550 MSG_LVL_MED,
551 MSG_LVL_MED,
552 MSG_LVL_MED,
553};
554
555static const uint32_t msg_bld_masks_13[] = {
556 MSG_LVL_MED,
557 MSG_LVL_MED,
558 MSG_LVL_MED,
559 MSG_LVL_MED,
560 MSG_LVL_MED,
561 MSG_LVL_MED,
562 MSG_LVL_MED,
563 MSG_LVL_MED,
564 MSG_LVL_MED,
565 MSG_LVL_MED,
566 MSG_LVL_MED,
567 MSG_LVL_MED,
568};
569
570static const uint32_t msg_bld_masks_14[] = {
571 MSG_LVL_MED,
572 MSG_LVL_MED,
573};
574
575static const uint32_t msg_bld_masks_15[] = {
576 MSG_LVL_MED
577};
578
579static const uint32_t msg_bld_masks_16[] = {
580 MSG_LVL_LOW,
581 MSG_LVL_LOW,
582 MSG_LVL_LOW,
583 MSG_LVL_LOW,
584 MSG_LVL_LOW,
585 MSG_LVL_LOW,
586 MSG_LVL_LOW,
587 MSG_LVL_LOW,
588 MSG_LVL_LOW,
589 MSG_LVL_LOW,
590 MSG_LVL_LOW,
591 MSG_LVL_LOW,
592 MSG_LVL_LOW,
593 MSG_LVL_LOW,
594 MSG_LVL_LOW,
595 MSG_LVL_LOW,
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};
605
606static const uint32_t msg_bld_masks_17[] = {
607 MSG_LVL_MED,
608 MSG_LVL_MED,
609 MSG_LVL_MED,
610 MSG_LVL_MED | MSG_MASK_6 | \
611 MSG_MASK_7 | MSG_MASK_8 | MSG_MASK_9,
612 MSG_LVL_MED | MSG_MASK_5 | \
613 MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 | MSG_MASK_9 | \
614 MSG_MASK_10 | MSG_MASK_11 | MSG_MASK_12 | MSG_MASK_13 | \
615 MSG_MASK_14 | MSG_MASK_15 | MSG_MASK_16 | MSG_MASK_17,
616 MSG_LVL_MED,
617 MSG_LVL_MED | MSG_MASK_5 | \
618 MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 | MSG_MASK_9 | \
619 MSG_MASK_10 | MSG_MASK_11 | MSG_MASK_12 | MSG_MASK_13 | \
620 MSG_MASK_14 | MSG_MASK_15 | MSG_MASK_16 | MSG_MASK_17 | \
621 MSG_MASK_18 | MSG_MASK_19 | MSG_MASK_20 | MSG_MASK_21 | \
622 MSG_MASK_22,
623 MSG_LVL_MED,
624 MSG_LVL_MED,
625};
626
627static const uint32_t msg_bld_masks_18[] = {
628 MSG_LVL_LOW,
629 MSG_LVL_LOW | MSG_MASK_8 | MSG_MASK_9 | MSG_MASK_10 | \
630 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14|MSG_MASK_15 | \
631 MSG_MASK_16|MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20,
632 MSG_LVL_LOW | MSG_MASK_5 | MSG_MASK_6,
633 MSG_LVL_LOW | MSG_MASK_5,
634 MSG_LVL_LOW | MSG_MASK_5 | MSG_MASK_6,
635 MSG_LVL_LOW,
636 MSG_LVL_LOW | MSG_MASK_5 | \
637 MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 | MSG_MASK_9,
638 MSG_LVL_LOW,
639 MSG_LVL_LOW,
640 MSG_LVL_LOW
641};
642
Shalabh Jain321c8b52012-02-22 12:37:06 -0800643static const uint32_t msg_bld_masks_19[] = {
644 MSG_LVL_LOW,
645 MSG_LVL_LOW,
646 MSG_LVL_LOW,
647 MSG_LVL_LOW,
648 MSG_LVL_LOW,
649 MSG_LVL_LOW,
650 MSG_LVL_LOW,
651 MSG_LVL_LOW,
652 MSG_LVL_LOW,
653 MSG_LVL_LOW,
654 MSG_LVL_LOW
655};
656
657static const uint32_t msg_bld_masks_20[] = {
658 MSG_LVL_LOW,
659 MSG_LVL_LOW,
660 MSG_LVL_LOW,
661 MSG_LVL_LOW,
662 MSG_LVL_LOW
663};
664
665static const uint32_t msg_bld_masks_21[] = {
666 MSG_LVL_HIGH
667};
668
669static const uint32_t msg_bld_masks_22[] = {
670 MSG_LVL_HIGH,
671 MSG_LVL_HIGH,
672 MSG_LVL_HIGH,
673 MSG_LVL_HIGH,
674 MSG_LVL_HIGH,
675 MSG_LVL_HIGH,
676 MSG_LVL_HIGH,
677 MSG_LVL_HIGH,
678 MSG_LVL_HIGH,
679 MSG_LVL_HIGH,
680 MSG_LVL_HIGH,
681 MSG_LVL_HIGH
682};
683
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700684/* LOG CODES */
685
686#define LOG_0 0x0
Shalabh Jainfbf3bdc2012-03-16 21:02:50 -0700687#define LOG_1 0x15A7
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700688#define LOG_2 0x0
689#define LOG_3 0x0
690#define LOG_4 0x4910
691#define LOG_5 0x5420
692#define LOG_6 0x0
693#define LOG_7 0x74FF
694#define LOG_8 0x0
695#define LOG_9 0x0
696#define LOG_10 0xA38A
697#define LOG_11 0xB201
698#define LOG_12 0x0
699#define LOG_13 0x0
700#define LOG_14 0x0
701#define LOG_15 0x0
702
703#define LOG_GET_ITEM_NUM(xx_code) (xx_code & 0x0FFF)
704
705#endif