forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/hnd_debug.h
....@@ -1,15 +1,16 @@
1
-/* SPDX-License-Identifier: GPL-2.0 */
21 /*
32 * HND Run Time Environment debug info area
43 *
5
- * Copyright (C) 1999-2019, Broadcom Corporation
6
- *
4
+ * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation
5
+ *
6
+ * Copyright (C) 1999-2017, Broadcom Corporation
7
+ *
78 * Unless you and Broadcom execute a separate written software license
89 * agreement governing use of this software, this software is licensed to you
910 * under the terms of the GNU General Public License version 2 (the "GPL"),
1011 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
1112 * following added to such license:
12
- *
13
+ *
1314 * As a special exception, the copyright holders of this software give you
1415 * permission to link this software with independent modules, and to copy and
1516 * distribute the resulting executable under terms of your choice, provided that
....@@ -17,7 +18,7 @@
1718 * the license of that module. An independent module is a module which is not
1819 * derived from this software. The special exception does not apply to any
1920 * modifications of the software.
20
- *
21
+ *
2122 * Notwithstanding the above, under no circumstances may you combine this
2223 * software in any way with any other Broadcom software provided under a license
2324 * other than the GPL, without Broadcom's express prior written consent.
....@@ -25,7 +26,7 @@
2526 *
2627 * <<Broadcom-WL-IPTag/Open:>>
2728 *
28
- * $Id: hnd_debug.h 561108 2015-06-03 09:20:16Z $
29
+ * $Id: hnd_debug.h 688714 2017-03-07 12:15:33Z $
2930 */
3031
3132 #ifndef _HND_DEBUG_H
....@@ -48,7 +49,7 @@
4849
4950 #ifdef FWID
5051 extern uint32 gFWID;
51
-#endif
52
+#endif // endif
5253
5354 /* Define pointers for use on other systems */
5455 #define _HD_EVLOG_P uint32
....@@ -77,6 +78,9 @@
7778 uint32 ram_size;
7879 } hnd_ramsize_ptr_t;
7980
81
+#define HND_DEBUG_EPIVERS_MAX_STR_LEN 32
82
+#define HND_DEBUG_BUILD_SIGNATURE_FWID_LEN 17
83
+#define HND_DEBUG_BUILD_SIGNATURE_VER_LEN 22
8084 typedef struct hnd_debug {
8185 uint32 magic;
8286 #define HND_DEBUG_MAGIC 0x47424544 /* 'DEBG' */
....@@ -85,7 +89,7 @@
8589 #define HND_DEBUG_VERSION 1
8690
8791 uint32 fwid; /* 4 bytes of fw info */
88
- char epivers[32];
92
+ char epivers[HND_DEBUG_EPIVERS_MAX_STR_LEN];
8993
9094 _HD_TRAP_P trap_ptr; /* trap_t data struct */
9195 _HD_CONS_P console; /* Console */
....@@ -97,6 +101,12 @@
97101 uint32 rom_size;
98102
99103 _HD_EVLOG_P event_log_top;
104
+
105
+ /* To populated fields below,
106
+ * INCLUDE_BUILD_SIGNATURE_IN_SOCRAM needs to be enabled
107
+ */
108
+ char fwid_signature[HND_DEBUG_BUILD_SIGNATURE_FWID_LEN]; /* fwid=<FWID> */
109
+ char ver_signature[HND_DEBUG_BUILD_SIGNATURE_VER_LEN]; /* ver=abc.abc.abc.abc */
100110
101111 } hnd_debug_t;
102112
....@@ -111,7 +121,6 @@
111121 uint32 tv_sec; /* Seconds */
112122 uint32 tv_usec; /* Microseconds */
113123 } timeval_t;
114
-
115124
116125 /* Linux/ARM 32 prstatus for notes section */
117126 typedef struct prstatus {
....@@ -133,10 +142,6 @@
133142 uint32 uregs[18];
134143 int32 pr_fpvalid; /* True if math copro being used. */
135144 } prstatus_t;
136
-
137
-#ifdef __GNUC__
138
-extern hnd_debug_t *get_hnd_debug_info(void);
139
-#endif /* __GNUC__ */
140145
141146 /* for mkcore and other utilities use */
142147 #define DUMP_INFO_PTR_PTR_0 0x74