hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/sbsdpcmdev.h
....@@ -1,16 +1,17 @@
1
-/* SPDX-License-Identifier: GPL-2.0 */
21 /*
32 * Broadcom SiliconBackplane SDIO/PCMCIA hardware-specific
43 * device core support
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,7 +27,7 @@
2627 *
2728 * <<Broadcom-WL-IPTag/Open:>>
2829 *
29
- * $Id: sbsdpcmdev.h 514727 2014-11-12 03:02:48Z $
30
+ * $Id: sbsdpcmdev.h 616398 2016-02-01 09:37:52Z $
3031 */
3132
3233 #ifndef _sbsdpcmdev_h_
....@@ -39,7 +40,6 @@
3940 #define PAD _XSTR(__LINE__)
4041 #endif /* PAD */
4142
42
-
4343 typedef volatile struct {
4444 dma64regs_t xmt; /* dma tx */
4545 uint32 PAD[2];
....@@ -51,21 +51,21 @@
5151 typedef volatile struct {
5252 dma64p_t dma64regs[2];
5353 dma64diag_t dmafifo; /* DMA Diagnostic Regs, 0x280-0x28c */
54
- uint32 PAD[92];
54
+ uint32 PAD[28];
5555 } sdiodma64_t;
5656
5757 /* dma32 sdiod corerev == 0 */
5858 typedef volatile struct {
5959 dma32regp_t dma32regs[2]; /* dma tx & rx, 0x200-0x23c */
6060 dma32diag_t dmafifo; /* DMA Diagnostic Regs, 0x240-0x24c */
61
- uint32 PAD[108];
61
+ uint32 PAD[44];
6262 } sdiodma32_t;
6363
6464 /* dma32 regs for pcmcia core */
6565 typedef volatile struct {
6666 dma32regp_t dmaregs; /* DMA Regs, 0x200-0x21c, rev8 */
6767 dma32diag_t dmafifo; /* DMA Diagnostic Regs, 0x220-0x22c */
68
- uint32 PAD[116];
68
+ uint32 PAD[52];
6969 } pcmdma32_t;
7070
7171 /* core registers */
....@@ -100,7 +100,9 @@
100100
101101 /* synchronized access to registers in SDIO clock domain */
102102 uint32 sdioaccess; /* SdioAccess, 0x050, rev8 */
103
- uint32 PAD[3];
103
+ uint32 PAD[1];
104
+ uint32 MiscHostAccessIntEn;
105
+ uint32 PAD[1];
104106
105107 /* PCMCIA frame control */
106108 uint8 pcmciaframectrl; /* pcmciaFrameCtrl, 0x060, rev8 */
....@@ -127,7 +129,9 @@
127129 uint32 writeterm; /* WriteTermCount, 0x13c, rev8, SDIO: wr frm terminates */
128130 uint32 PAD[40];
129131 uint32 clockctlstatus; /* ClockCtlStatus, 0x1e0, rev8 */
130
- uint32 PAD[7];
132
+ uint32 PAD[1];
133
+ uint32 powerctl; /* 0x1e8 */
134
+ uint32 PAD[5];
131135
132136 /* DMA engines */
133137 volatile union {
....@@ -135,6 +139,11 @@
135139 sdiodma32_t sdiod32;
136140 sdiodma64_t sdiod64;
137141 } dma;
142
+
143
+ uint32 PAD[12]; /* 0x300-0x32c */
144
+ uint32 chipid; /* SDIO ChipID Register, 0x330, rev31 */
145
+ uint32 eromptr; /* SDIO EromPtrOffset Register, 0x334, rev31 */
146
+ uint32 PAD[50];
138147
139148 /* SDIO/PCMCIA CIS region */
140149 char cis[512]; /* 512 byte CIS, 0x400-0x5ff, rev6 */
....@@ -234,6 +243,7 @@
234243 #define SDA_F1_FBR_SPACE 0x100 /* sdioAccess F1 FBR register space */
235244 #define SDA_F2_FBR_SPACE 0x200 /* sdioAccess F2 FBR register space */
236245 #define SDA_F1_REG_SPACE 0x300 /* sdioAccess F1 core-specific register space */
246
+#define SDA_F3_FBR_SPACE 0x400 /* sdioAccess F3 FBR register space */
237247
238248 /* SDA_F1_REG_SPACE sdioaccess-accessible F1 reg space register offsets */
239249 #define SDA_CHIPCONTROLDATA 0x006 /* ChipControlData */
....@@ -250,6 +260,13 @@
250260 #define SDA_SDIOWRFRAMEBCHIGH 0x01a /* SdioWrFrameBCHigh */
251261 #define SDA_SDIORDFRAMEBCLOW 0x01b /* SdioRdFrameBCLow */
252262 #define SDA_SDIORDFRAMEBCHIGH 0x01c /* SdioRdFrameBCHigh */
263
+#define SDA_MESBUSYCNTRL 0x01d /* mesBusyCntrl */
264
+#define SDA_WAKEUPCTRL 0x01e /* WakeupCtrl */
265
+#define SDA_SLEEPCSR 0x01f /* sleepCSR */
266
+
267
+/* SDA_F1_REG_SPACE register bits */
268
+/* sleepCSR register */
269
+#define SDA_SLEEPCSR_KEEP_SDIO_ON 0x1
253270
254271 /* SDA_F2WATERMARK */
255272 #define SDA_F2WATERMARK_MASK 0x7f /* F2Watermark Mask */