forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/spid.h
....@@ -1,15 +1,16 @@
1
-/* SPDX-License-Identifier: GPL-2.0 */
21 /*
32 * SPI device spec header file
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.
....@@ -100,6 +101,10 @@
100101 #define RESET_ON_BT_BP_RESET 0x8 /* enable reset for BT backplane */
101102 #define RESET_SPI 0x80 /* reset the above enabled logic */
102103
104
+/* Bit mask for card capability */
105
+#define SPID_CHIPID_PRESENT 0x20 /* duplicate of cardcapability chipid present */
106
+#define SPID_SECURE_MODE 0x40 /* duplicate of cardcapability secure mode */
107
+
103108 /* Bit mask for SPID_INTR_REG device register */
104109 #define DATA_UNAVAILABLE 0x0001 /* Requested data not available; Clear by writing a "1" */
105110 #define F2_F3_FIFO_RD_UNDERFLOW 0x0002
....@@ -163,7 +168,12 @@
163168 #define SPI_FUNC_2 2
164169 #define SPI_FUNC_3 3
165170
166
-#define WAIT_F2RXFIFORDY 100
167
-#define WAIT_F2RXFIFORDY_DELAY 20
171
+#ifdef BCMQT
172
+#define WAIT_F2RXFIFORDY 200
173
+#define WAIT_F2RXFIFORDY_DELAY 100
174
+#else
175
+#define WAIT_F2RXFIFORDY 100
176
+#define WAIT_F2RXFIFORDY_DELAY 20
177
+#endif // endif
168178
169179 #endif /* _SPI_H */