Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: chromeos/drivers/ath6kl/include/dbglog.h

Issue 646055: Atheros AR600x driver + build glue (Closed)
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 //------------------------------------------------------------------------------
2 // <copyright file="dbglog.h" company="Atheros">
3 // Copyright (c) 2004-2007 Atheros Corporation. All rights reserved.
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License version 2 as
7 // published by the Free Software Foundation;
8 //
9 // Software distributed under the License is distributed on an "AS
10 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11 // implied. See the License for the specific language governing
12 // rights and limitations under the License.
13 //
14 //
15 //------------------------------------------------------------------------------
16 //==============================================================================
17 // Author(s): ="Atheros"
18 //==============================================================================
19
20 #ifndef _DBGLOG_H_
21 #define _DBGLOG_H_
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #define DBGLOG_TIMESTAMP_OFFSET 0
28 #define DBGLOG_TIMESTAMP_MASK 0x0000FFFF /* Bit 0-15. Contains bit
29 8-23 of the LF0 timer */
30 #define DBGLOG_DBGID_OFFSET 16
31 #define DBGLOG_DBGID_MASK 0x03FF0000 /* Bit 16-25 */
32 #define DBGLOG_DBGID_NUM_MAX 256 /* Upper limit is width of mask */
33
34 #define DBGLOG_MODULEID_OFFSET 26
35 #define DBGLOG_MODULEID_MASK 0x3C000000 /* Bit 26-29 */
36 #define DBGLOG_MODULEID_NUM_MAX 16 /* Upper limit is width of mask */
37
38 /*
39 * Please ensure that the definition of any new module intrduced is captured
40 * between the DBGLOG_MODULEID_START and DBGLOG_MODULEID_END defines. The
41 * structure is required for the parser to correctly pick up the values for
42 * different modules.
43 */
44 #define DBGLOG_MODULEID_START
45 #define DBGLOG_MODULEID_INF 0
46 #define DBGLOG_MODULEID_WMI 1
47 #define DBGLOG_MODULEID_MISC 2
48 #define DBGLOG_MODULEID_PM 3
49 #define DBGLOG_MODULEID_TXRX_MGMTBUF 4
50 #define DBGLOG_MODULEID_TXRX_TXBUF 5
51 #define DBGLOG_MODULEID_TXRX_RXBUF 6
52 #define DBGLOG_MODULEID_WOW 7
53 #define DBGLOG_MODULEID_WHAL 8
54 #define DBGLOG_MODULEID_DC 9
55 #define DBGLOG_MODULEID_CO 10
56 #define DBGLOG_MODULEID_RO 11
57 #define DBGLOG_MODULEID_CM 12
58 #define DBGLOG_MODULEID_MGMT 13
59 #define DBGLOG_MODULEID_TMR 14
60 #define DBGLOG_MODULEID_BTCOEX 15
61 #define DBGLOG_MODULEID_END
62
63 #define DBGLOG_NUM_ARGS_OFFSET 30
64 #define DBGLOG_NUM_ARGS_MASK 0xC0000000 /* Bit 30-31 */
65 #define DBGLOG_NUM_ARGS_MAX 2 /* Upper limit is width of mask */
66
67 #define DBGLOG_MODULE_LOG_ENABLE_OFFSET 0
68 #define DBGLOG_MODULE_LOG_ENABLE_MASK 0x0000FFFF
69
70 #define DBGLOG_REPORTING_ENABLED_OFFSET 16
71 #define DBGLOG_REPORTING_ENABLED_MASK 0x00010000
72
73 #define DBGLOG_TIMESTAMP_RESOLUTION_OFFSET 17
74 #define DBGLOG_TIMESTAMP_RESOLUTION_MASK 0x000E0000
75
76 #define DBGLOG_REPORT_SIZE_OFFSET 20
77 #define DBGLOG_REPORT_SIZE_MASK 0x3FF00000
78
79 #define DBGLOG_LOG_BUFFER_SIZE 1500
80 #define DBGLOG_DBGID_DEFINITION_LEN_MAX 90
81
82 struct dbglog_buf_s {
83 struct dbglog_buf_s *next;
84 A_UINT8 *buffer;
85 A_UINT32 bufsize;
86 A_UINT32 length;
87 A_UINT32 count;
88 A_UINT32 free;
89 };
90
91 struct dbglog_hdr_s {
92 struct dbglog_buf_s *dbuf;
93 A_UINT32 dropped;
94 };
95
96 struct dbglog_config_s {
97 A_UINT32 cfgvalid; /* Mask with valid config bits */
98 union {
99 /* TODO: Take care of endianness */
100 struct {
101 A_UINT32 mmask:16; /* Mask of modules with logging on */
102 A_UINT32 rep:1; /* Reporting enabled or not */
103 A_UINT32 tsr:3; /* Time stamp resolution. Def: 1 ms */
104 A_UINT32 size:10; /* Report size in number of messages */
105 A_UINT32 reserved:2;
106 } dbglog_config;
107
108 A_UINT32 value;
109 } u;
110 };
111
112 #define cfgmmask u.dbglog_config.mmask
113 #define cfgrep u.dbglog_config.rep
114 #define cfgtsr u.dbglog_config.tsr
115 #define cfgsize u.dbglog_config.size
116 #define cfgvalue u.value
117
118 #ifdef __cplusplus
119 }
120 #endif
121
122 #endif /* _DBGLOG_H_ */
OLDNEW
« no previous file with comments | « chromeos/drivers/ath6kl/include/common_drv.h ('k') | chromeos/drivers/ath6kl/include/dbglog_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698