• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Data structures required for the firmware tracing support on Linux.
3  *
4  * Broadcom Proprietary and Confidential. Copyright (C) 2020,
5  * All Rights Reserved.
6  *
7  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom;
8  * the contents of this file may not be disclosed to third parties,
9  * copied or duplicated in any form, in whole or in part, without
10  * the prior written permission of Broadcom.
11  *
12  *
13  * <<Broadcom-WL-IPTag/Proprietary:>>
14  *
15  * $Id$
16  */
17 
18 #ifndef _DHD_FWTRACE_H
19 #define _DHD_FWTRACE_H
20 
21 #ifdef BCMINTERNAL
22 #ifdef DHD_FWTRACE              /* firmware tracing */
23 
24 #include <dngl_stats.h>
25 #include <dhd.h>
26 #include <dhd_proto.h>
27 #include <dhd_dbg.h>
28 #include <dhd_debug.h>
29 #include <dhd_fwtrace.h>
30 
31 #include <linux/mutex.h>
32 #include <bcm_fwtrace.h>
33 
34 #define TRACE_FILE_NAME_LEN             128u /* bytes */
35 #define TRACE_FILE_SIZE                 (1024u * 1024u) /* Trace file size is 1 MB */
36 
37 /* Prototypes */
38 void dhd_event_logtrace_enqueue_fwtrace(dhd_pub_t *dhdp);
39 int dhd_fwtrace_attach(dhd_pub_t *dhdinfo);
40 int dhd_fwtrace_detach(dhd_pub_t *dhdinfo);
41 
42 void process_fw_trace_data(dhd_pub_t *dhdp);
43 uint32 dhd_bus_get_bp_base(dhd_pub_t *dhdp);
44 int fwtrace_init(dhd_pub_t *dhdp);
45 int fw_trace_start(dhd_pub_t *dhdp, uint32 fw_trace_enabled);
46 int fw_trace_stop(dhd_pub_t *dhdp);
47 int handle_set_fwtrace(dhd_pub_t *dhdp, uint32 val);
48 uint16 get_fw_trace_overflow_counter(dhd_pub_t *dhdp);
49 int fwtrace_get_haddr(dhd_pub_t *dhdp, fwtrace_hostaddr_info_t *haddr_info);
50 
51 #endif  /* DHD_FWTRACE */
52 
53 #endif	/* BCMINTERNAL */
54 
55 #endif	/* _DHD_FWTRACE_H */
56