hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/sbsdio.h
....@@ -1,18 +1,19 @@
1
-/* SPDX-License-Identifier: GPL-2.0 */
21 /*
32 * SDIO device core hardware definitions.
43 * sdio is a portion of the pcmcia core in core rev 3 - rev 8
54 *
65 * SDIO core support 1bit, 4 bit SDIO mode as well as SPI mode.
76 *
8
- * Copyright (C) 1999-2019, Broadcom Corporation
9
- *
7
+ * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation
8
+ *
9
+ * Copyright (C) 1999-2017, Broadcom Corporation
10
+ *
1011 * Unless you and Broadcom execute a separate written software license
1112 * agreement governing use of this software, this software is licensed to you
1213 * under the terms of the GNU General Public License version 2 (the "GPL"),
1314 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
1415 * following added to such license:
15
- *
16
+ *
1617 * As a special exception, the copyright holders of this software give you
1718 * permission to link this software with independent modules, and to copy and
1819 * distribute the resulting executable under terms of your choice, provided that
....@@ -20,7 +21,7 @@
2021 * the license of that module. An independent module is a module which is not
2122 * derived from this software. The special exception does not apply to any
2223 * modifications of the software.
23
- *
24
+ *
2425 * Notwithstanding the above, under no circumstances may you combine this
2526 * software in any way with any other Broadcom software provided under a license
2627 * other than the GPL, without Broadcom's express prior written consent.
....@@ -28,7 +29,7 @@
2829 *
2930 * <<Broadcom-WL-IPTag/Open:>>
3031 *
31
- * $Id: sbsdio.h 514727 2014-11-12 03:02:48Z $
32
+ * $Id: sbsdio.h 665717 2016-10-18 23:29:25Z $
3233 */
3334
3435 #ifndef _SBSDIO_H
....@@ -90,11 +91,6 @@
9091 #define SROM_BLANK 0x04 /* depreciated in corerev 6 */
9192 #define SROM_OTP 0x80 /* OTP present */
9293
93
-/* SBSDIO_CHIP_CTRL */
94
-#define SBSDIO_CHIP_CTRL_XTAL 0x01 /* or'd with onchip xtal_pu,
95
- * 1: power on oscillator
96
- * (for 4318 only)
97
- */
9894 /* SBSDIO_WATERMARK */
9995 #define SBSDIO_WATERMARK_MASK 0x7f /* number of words - 1 for sd device
10096 * to wait before sending data to host
....@@ -121,9 +117,9 @@
121117 * external pads in tri-state; requires
122118 * sdio bus power cycle to clear (rev 9)
123119 */
124
-#define SBSDIO_DEVCTL_EN_F2_BLK_WATERMARK 0x10 /* Enable function 2 tx for each block */
125120 #define SBSDIO_DEVCTL_F2WM_ENAB 0x10 /* Enable F2 Watermark */
126121 #define SBSDIO_DEVCTL_NONDAT_PADS_ISO 0x20 /* Isolate sdio clk and cmd (non-data) */
122
+#define SBSDIO_DEVCTL_ADDR_RESET 0x40 /* Reset SB Address to default value */
127123
128124 /* SBSDIO_FUNC1_CHIPCLKCSR */
129125 #define SBSDIO_FORCE_ALP 0x01 /* Force ALP request to backplane */
....@@ -167,7 +163,11 @@
167163
168164 /* direct(mapped) cis space */
169165 #define SBSDIO_CIS_BASE_COMMON 0x1000 /* MAPPED common CIS address */
166
+#ifdef BCMSPI
167
+#define SBSDIO_CIS_SIZE_LIMIT 0x100 /* maximum bytes in one spi CIS */
168
+#else
170169 #define SBSDIO_CIS_SIZE_LIMIT 0x200 /* maximum bytes in one CIS */
170
+#endif /* !BCMSPI */
171171 #define SBSDIO_OTP_CIS_SIZE_LIMIT 0x078 /* maximum bytes OTP CIS */
172172
173173 #define SBSDIO_CIS_OFT_ADDR_MASK 0x1FFFF /* cis offset addr is < 17 bits */