forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/sbpcmcia.h
....@@ -1,15 +1,16 @@
1
-/* SPDX-License-Identifier: GPL-2.0 */
21 /*
32 * BCM43XX Sonics SiliconBackplane PCMCIA core hardware definitions.
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: sbpcmcia.h 521344 2014-12-17 10:03:55Z $
29
+ * $Id: sbpcmcia.h 647676 2016-07-07 02:59:05Z $
2930 */
3031
3132 #ifndef _SBPCMCIA_H
....@@ -61,12 +62,10 @@
6162 #define COR_BLREN 0x01
6263 #define COR_FUNEN 0x01
6364
64
-
6565 #define PCICIA_FCSR (2 / 2)
6666 #define PCICIA_PRR (4 / 2)
6767 #define PCICIA_SCR (6 / 2)
6868 #define PCICIA_ESR (8 / 2)
69
-
7069
7170 #define PCM_MEMOFF 0x0000
7271 #define F0_MEMOFF 0x1000
....@@ -106,6 +105,34 @@
106105 #define SRI_BLANK 0x04
107106 #define SRI_OTP 0x80
108107
108
+#define SROM16K_BANK_SEL_MASK (3 << 11)
109
+#define SROM16K_BANK_SHFT_MASK 11
110
+#define SROM16K_ADDR_SEL_MASK ((1 << SROM16K_BANK_SHFT_MASK) - 1)
111
+#define SROM_PRSNT_MASK 0x1
112
+#define SROM_SUPPORT_SHIFT_MASK 30
113
+#define SROM_SUPPORTED (0x1 << SROM_SUPPORT_SHIFT_MASK)
114
+#define SROM_SIZE_MASK 0x00000006
115
+#define SROM_SIZE_2K 2
116
+#define SROM_SIZE_512 1
117
+#define SROM_SIZE_128 0
118
+#define SROM_SIZE_SHFT_MASK 1
119
+
120
+/* Standard tuples we know about */
121
+
122
+#define CISTPL_NULL 0x00
123
+#define CISTPL_END 0xff /* End of the CIS tuple chain */
124
+#define CISTPL_OFFSET 0xC0
125
+
126
+#define CISTPL_BRCM_HNBU 0x80
127
+
128
+#define HNBU_BOARDREV 0x02 /* One byte board revision */
129
+
130
+#define HNBU_BOARDTYPE 0x1b /* 2 bytes; boardtype */
131
+
132
+#define HNBU_HNBUCIS 0x1d /* what follows is proprietary HNBU CIS format */
133
+
134
+#define HNBU_CUSTOM1 0x82 /* 4 byte; For non-BRCM post-mfg additions */
135
+#define HNBU_CUSTOM2 0x83 /* Reserved; For non-BRCM post-mfg additions */
109136
110137 /* sbtmstatelow */
111138 #define SBTML_INT_ACK 0x40000 /* ack the sb interrupt */
....@@ -113,5 +140,4 @@
113140
114141 /* sbtmstatehigh */
115142 #define SBTMH_INT_STATUS 0x40000 /* sb interrupt status */
116
-
117143 #endif /* _SBPCMCIA_H */