~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to drivers/staging/ath6kl/include/common/dbglog.h

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//------------------------------------------------------------------------------
2
 
// <copyright file="dbglog.h" company="Atheros">
3
 
//    Copyright (c) 2004-2010 Atheros Corporation.  All rights reserved.
4
 
// 
5
 
//
6
 
// Permission to use, copy, modify, and/or distribute this software for any
7
 
// purpose with or without fee is hereby granted, provided that the above
8
 
// copyright notice and this permission notice appear in all copies.
9
 
//
10
 
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
 
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
 
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
 
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
 
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
 
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
 
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
 
//
18
 
//
19
 
//------------------------------------------------------------------------------
20
 
//==============================================================================
21
 
// Author(s): ="Atheros"
22
 
//==============================================================================
23
 
 
24
 
#ifndef _DBGLOG_H_
25
 
#define _DBGLOG_H_
26
 
 
27
 
#ifdef __cplusplus
28
 
extern "C" {
29
 
#endif
30
 
 
31
 
#define DBGLOG_TIMESTAMP_OFFSET          0
32
 
#define DBGLOG_TIMESTAMP_MASK            0x0000FFFF /* Bit 0-15. Contains bit
33
 
                                                       8-23 of the LF0 timer */
34
 
#define DBGLOG_DBGID_OFFSET              16
35
 
#define DBGLOG_DBGID_MASK                0x03FF0000 /* Bit 16-25 */
36
 
#define DBGLOG_DBGID_NUM_MAX             256 /* Upper limit is width of mask */
37
 
 
38
 
#define DBGLOG_MODULEID_OFFSET           26
39
 
#define DBGLOG_MODULEID_MASK             0x3C000000 /* Bit 26-29 */
40
 
#define DBGLOG_MODULEID_NUM_MAX          16 /* Upper limit is width of mask */
41
 
 
42
 
/*
43
 
 * Please ensure that the definition of any new module introduced is captured
44
 
 * between the DBGLOG_MODULEID_START and DBGLOG_MODULEID_END defines. The 
45
 
 * structure is required for the parser to correctly pick up the values for
46
 
 * different modules.
47
 
 */
48
 
#define DBGLOG_MODULEID_START
49
 
#define DBGLOG_MODULEID_INF                   0
50
 
#define DBGLOG_MODULEID_WMI                   1
51
 
#define DBGLOG_MODULEID_MISC                  2
52
 
#define DBGLOG_MODULEID_PM                    3
53
 
#define DBGLOG_MODULEID_TXRX_MGMTBUF          4
54
 
#define DBGLOG_MODULEID_TXRX_TXBUF            5
55
 
#define DBGLOG_MODULEID_TXRX_RXBUF            6
56
 
#define DBGLOG_MODULEID_WOW                   7
57
 
#define DBGLOG_MODULEID_WHAL                  8
58
 
#define DBGLOG_MODULEID_DC                    9
59
 
#define DBGLOG_MODULEID_CO                    10
60
 
#define DBGLOG_MODULEID_RO                    11
61
 
#define DBGLOG_MODULEID_CM                    12
62
 
#define DBGLOG_MODULEID_MGMT                  13
63
 
#define DBGLOG_MODULEID_TMR                   14
64
 
#define DBGLOG_MODULEID_BTCOEX                15
65
 
#define DBGLOG_MODULEID_END
66
 
 
67
 
#define DBGLOG_NUM_ARGS_OFFSET             30
68
 
#define DBGLOG_NUM_ARGS_MASK               0xC0000000 /* Bit 30-31 */
69
 
#define DBGLOG_NUM_ARGS_MAX                2 /* Upper limit is width of mask */
70
 
 
71
 
#define DBGLOG_MODULE_LOG_ENABLE_OFFSET    0
72
 
#define DBGLOG_MODULE_LOG_ENABLE_MASK      0x0000FFFF
73
 
 
74
 
#define DBGLOG_REPORTING_ENABLED_OFFSET    16
75
 
#define DBGLOG_REPORTING_ENABLED_MASK      0x00010000
76
 
 
77
 
#define DBGLOG_TIMESTAMP_RESOLUTION_OFFSET 17
78
 
#define DBGLOG_TIMESTAMP_RESOLUTION_MASK   0x000E0000
79
 
 
80
 
#define DBGLOG_REPORT_SIZE_OFFSET          20
81
 
#define DBGLOG_REPORT_SIZE_MASK            0x3FF00000
82
 
 
83
 
#define DBGLOG_LOG_BUFFER_SIZE             1500
84
 
#define DBGLOG_DBGID_DEFINITION_LEN_MAX    90
85
 
 
86
 
PREPACK struct dbglog_buf_s {
87
 
    struct dbglog_buf_s *next;
88
 
    u8 *buffer;
89
 
    u32 bufsize;
90
 
    u32 length;
91
 
    u32 count;
92
 
    u32 free;
93
 
} POSTPACK;
94
 
 
95
 
PREPACK struct dbglog_hdr_s {
96
 
    struct dbglog_buf_s *dbuf;
97
 
    u32 dropped;
98
 
} POSTPACK;
99
 
 
100
 
PREPACK struct dbglog_config_s {
101
 
    u32 cfgvalid; /* Mask with valid config bits */
102
 
    union {
103
 
        /* TODO: Take care of endianness */
104
 
        struct {
105
 
            u32 mmask:16; /* Mask of modules with logging on */
106
 
            u32 rep:1; /* Reporting enabled or not */
107
 
            u32 tsr:3; /* Time stamp resolution. Def: 1 ms */
108
 
            u32 size:10; /* Report size in number of messages */
109
 
            u32 reserved:2;
110
 
        } dbglog_config;
111
 
 
112
 
        u32 value;
113
 
    } u;
114
 
} POSTPACK;
115
 
 
116
 
#define cfgmmask                   u.dbglog_config.mmask
117
 
#define cfgrep                     u.dbglog_config.rep
118
 
#define cfgtsr                     u.dbglog_config.tsr
119
 
#define cfgsize                    u.dbglog_config.size
120
 
#define cfgvalue                   u.value
121
 
 
122
 
#ifdef __cplusplus
123
 
}
124
 
#endif
125
 
 
126
 
#endif /* _DBGLOG_H_ */