xref: /OK3568_Linux_fs/external/rkwifibt/drivers/infineon/include/event_log_set.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * EVENT_LOG system definitions
3  *
4  * Portions of this code are copyright (c) 2021 Cypress Semiconductor Corporation
5  *
6  * Copyright (C) 1999-2017, Broadcom Corporation
7  *
8  *      Unless you and Broadcom execute a separate written software license
9  * agreement governing use of this software, this software is licensed to you
10  * under the terms of the GNU General Public License version 2 (the "GPL"),
11  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
12  * following added to such license:
13  *
14  *      As a special exception, the copyright holders of this software give you
15  * permission to link this software with independent modules, and to copy and
16  * distribute the resulting executable under terms of your choice, provided that
17  * you also meet, for each linked independent module, the terms and conditions of
18  * the license of that module.  An independent module is a module which is not
19  * derived from this software.  The special exception does not apply to any
20  * modifications of the software.
21  *
22  *      Notwithstanding the above, under no circumstances may you combine this
23  * software in any way with any other Broadcom software provided under a license
24  * other than the GPL, without Broadcom's express prior written consent.
25  *
26  *
27  * <<Broadcom-WL-IPTag/Open:>>
28  *
29  * $Id$
30  */
31 
32 #ifndef _EVENT_LOG_SET_H_
33 #define _EVENT_LOG_SET_H_
34 
35 #ifndef NUM_EVENT_LOG_SETS
36 /* Set a maximum number of sets here.  It is not dynamic for
37  * efficiency of the EVENT_LOG calls. Old branches could define
38  * this to an appropriat enumber in their makefiles to reduce
39  * ROM invalidation
40  */
41 #define NUM_EVENT_LOG_SETS (24)
42 #endif // endif
43 
44 /* Set assignments */
45 #define EVENT_LOG_SET_BUS		(0u)
46 #define EVENT_LOG_SET_WL		(1u)
47 #define EVENT_LOG_SET_PSM		(2u)
48 #define EVENT_LOG_SET_ERROR		(3u)
49 
50 /* MSCH logging */
51 #define EVENT_LOG_SET_MSCH_PROFILER	(4u)
52 
53 #define EVENT_LOG_SET_5			(5u)
54 #define EVENT_LOG_SET_ECOUNTERS		(EVENT_LOG_SET_5)
55 #define EVENT_LOG_SET_6			(6u)
56 #define EVENT_LOG_SET_7			(7u)
57 
58 #define EVENT_LOG_SET_8			(8u)
59 #define EVENT_LOG_SET_PRSRV		(EVENT_LOG_SET_8)
60 
61 #define EVENT_LOG_SET_9			(9u)
62 /* General purpose preserve chatty.
63  * EVENT_LOG_SET_PRSRV_CHATTY log set should not be used by FW as it is
64  * used by customer host. FW should use EVENT_LOG_SET_GP_PRSRV_CHATTY
65  * for general purpose preserve chatty logs.
66  */
67 #define EVENT_LOG_SET_GP_PRSRV_CHATTY	(EVENT_LOG_SET_9)
68 #define EVENT_LOG_SET_PRSRV_CHATTY	(EVENT_LOG_SET_6)
69 
70 /* BUS preserve */
71 #define EVENT_LOG_SET_PRSRV_BUS		(10u)
72 
73 /* WL preserve */
74 #define EVENT_LOG_SET_PRSRV_WL		(11u)
75 
76 /* Slotted BSS set */
77 #define EVENT_LOG_SET_WL_SLOTTED_BSS    (12u)
78 
79 /* PHY entity logging */
80 #define EVENT_LOG_SET_PHY		(13u)
81 
82 /* PHY preserve */
83 #define EVENT_LOG_SET_PRSRV_PHY		(14u)
84 
85 /* RTE entity */
86 #define EVENT_LOG_SET_RTE		(15u)
87 
88 /* Malloc and free logging */
89 #define EVENT_LOG_SET_MEM_API		(16u)
90 
91 /* Console buffer */
92 #define EVENT_LOG_SET_RTE_CONS_BUF	(17u)
93 
94 /* three log sets for general debug purposes */
95 #define EVENT_LOG_SET_GENERAL_DBG_1	(18u)
96 #define EVENT_LOG_SET_GENERAL_DBG_2	(19u)
97 #define EVENT_LOG_SET_GENERAL_DBG_3	(20u)
98 
99 /* Log sets for capturing power related logs. Note that these sets
100  * are to be used across entire system and not just WL.
101  */
102 #define EVENT_LOG_SET_POWER_1		(21u)
103 #define EVENT_LOG_SET_POWER_2		(22u)
104 
105 /* Spare log sets for future assignments */
106 #define EVENT_LOG_SET_23		(23u)
107 
108 /* send delayed logs when >= 50% of buffer is full */
109 #ifndef ECOUNTERS_DELAYED_FLUSH_PERCENTAGE
110 #define ECOUNTERS_DELAYED_FLUSH_PERCENTAGE	(50)
111 #endif // endif
112 
113 #endif /* _EVENT_LOG_SET_H_ */
114