forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/bcmsdbus.h
....@@ -1,16 +1,17 @@
1
-/* SPDX-License-Identifier: GPL-2.0 */
21 /*
32 * Definitions for API from sdio common code (bcmsdh) to individual
43 * host controller drivers.
54 *
6
- * Copyright (C) 1999-2019, Broadcom Corporation
7
- *
5
+ * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation
6
+ *
7
+ * Copyright (C) 1999-2017, Broadcom Corporation
8
+ *
89 * Unless you and Broadcom execute a separate written software license
910 * agreement governing use of this software, this software is licensed to you
1011 * under the terms of the GNU General Public License version 2 (the "GPL"),
1112 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
1213 * following added to such license:
13
- *
14
+ *
1415 * As a special exception, the copyright holders of this software give you
1516 * permission to link this software with independent modules, and to copy and
1617 * distribute the resulting executable under terms of your choice, provided that
....@@ -18,7 +19,7 @@
1819 * the license of that module. An independent module is a module which is not
1920 * derived from this software. The special exception does not apply to any
2021 * modifications of the software.
21
- *
22
+ *
2223 * Notwithstanding the above, under no circumstances may you combine this
2324 * software in any way with any other Broadcom software provided under a license
2425 * other than the GPL, without Broadcom's express prior written consent.
....@@ -26,12 +27,15 @@
2627 *
2728 * <<Broadcom-WL-IPTag/Open:>>
2829 *
29
- * $Id: bcmsdbus.h 514727 2014-11-12 03:02:48Z $
30
+ * $Id: bcmsdbus.h 689948 2017-03-14 05:21:03Z $
3031 */
3132
3233 #ifndef _sdio_api_h_
3334 #define _sdio_api_h_
3435
36
+#if defined(BT_OVER_SDIO)
37
+#include <linux/mmc/sdio_func.h>
38
+#endif /* defined (BT_OVER_SDIO) */
3539
3640 #define SDIOH_API_RC_SUCCESS (0x00)
3741 #define SDIOH_API_RC_FAIL (0x01)
....@@ -70,7 +74,7 @@
7074 #warning "SDPCM_DEFGLOM_SIZE cannot be higher than SDPCM_MAXGLOM_SIZE!!"
7175 #undef SDPCM_DEFGLOM_SIZE
7276 #define SDPCM_DEFGLOM_SIZE SDPCM_MAXGLOM_SIZE
73
-#endif
77
+#endif // endif
7478
7579 typedef int SDIOH_API_RC;
7680
....@@ -79,6 +83,10 @@
7983
8084 /* callback function, taking one arg */
8185 typedef void (*sdioh_cb_fn_t)(void *);
86
+#if defined(BT_OVER_SDIO) && defined(BCMLXSDMMC)
87
+extern
88
+void sdioh_sdmmc_card_enable_func_f3(sdioh_info_t *sd, struct sdio_func *func);
89
+#endif /* defined (BT_OVER_SDIO) */
8290
8391 extern SDIOH_API_RC sdioh_interrupt_register(sdioh_info_t *si, sdioh_cb_fn_t fn, void *argh);
8492 extern SDIOH_API_RC sdioh_interrupt_deregister(sdioh_info_t *si);
....@@ -91,7 +99,7 @@
9199
92100 #if defined(DHD_DEBUG)
93101 extern bool sdioh_interrupt_pending(sdioh_info_t *si);
94
-#endif
102
+#endif // endif
95103
96104 /* read or write one byte using cmd52 */
97105 extern SDIOH_API_RC sdioh_request_byte(sdioh_info_t *si, uint rw, uint fnc, uint addr, uint8 *byte);
....@@ -131,11 +139,18 @@
131139 /* Reset and re-initialize the device */
132140 extern int sdioh_sdio_reset(sdioh_info_t *si);
133141
142
+#ifdef BCMSPI
143
+/* Function to pass gSPI specific device-status bits to dhd. */
144
+extern uint32 sdioh_get_dstatus(sdioh_info_t *si);
134145
146
+/* chipid and chiprev info for lower layers to control sw WAR's for hw bugs. */
147
+extern void sdioh_chipinfo(sdioh_info_t *si, uint32 chip, uint32 chiprev);
148
+extern void sdioh_dwordmode(sdioh_info_t *si, bool set);
149
+#endif /* BCMSPI */
135150
136151 #if defined(BCMSDIOH_STD)
137152 #define SDIOH_SLEEP_ENABLED
138
-#endif
153
+#endif // endif
139154 extern SDIOH_API_RC sdioh_sleep(sdioh_info_t *si, bool enab);
140155
141156 /* GPIO support */