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